/*********************************************************************
* I.MX6 U-boot Kernel backlight setting
* 说明:
* 本文主要记录I.MX6 U-boot、Kernel中如何打开、关闭背光设置。
*
* 2016-3-7 深圳 南山平山村 曾剑锋
********************************************************************/ . cat bootable/bootloader/uboot-imx/board/freescale/mx6q_sabresd/mx6q_sabresd.c
......
#ifdef CONFIG_LCD
void lcd_enable(void)
{
......
/*
* Set LVDS panel CABC_EN0 to low to disable
* CABC function. This function will turn backlight
* automatically according to display content, so
* simply disable it to get rid of annoying unstable
* backlight phenomena.
*
* • GPIO direction register (GPIO_GDIR)
* • Data register (GPIO_DR)
*
* 2015-10-8 zengjf modify fot lvds backlight
*/
reg = readl(GPIO6_BASE_ADDR + GPIO_GDIR);
reg |= ( << );
writel(reg, GPIO6_BASE_ADDR + GPIO_GDIR); reg = readl(GPIO6_BASE_ADDR + GPIO_DR);
//reg &= ~(1 << 15);
reg |= ( << );
writel(reg, GPIO6_BASE_ADDR + GPIO_DR); /*
* Set LVDS panel CABC_EN1 to low to disable
* CABC function.
*/
reg = readl(GPIO6_BASE_ADDR + GPIO_GDIR);
reg |= ( << );
writel(reg, GPIO6_BASE_ADDR + GPIO_GDIR); reg = readl(GPIO6_BASE_ADDR + GPIO_DR);
//reg &= ~(1 << 16);
reg |= ( << );
writel(reg, GPIO6_BASE_ADDR + GPIO_DR);
......
}
...... . cat arch/arm/mach-mx6/board-mx6q_sabresd.c
......
/*!
* Board specific initialization.
*/
static void __init mx6_sabresd_board_init(void)
{
......
/*
* Disable HannStar touch panel CABC function,
* this function turns the panel's backlight automatically
* according to the content shown on the panel which
* may cause annoying unstable backlight issue.
*
* zengjf 2015-10-8 this also has down in uboot
*/
gpio_request(SABRESD_CABC_EN0, "cabc-en0");
gpio_direction_output(SABRESD_CABC_EN0, 1);
gpio_request(SABRESD_CABC_EN1, "cabc-en1");
gpio_direction_output(SABRESD_CABC_EN1, 1); ......
}
......

I.MX6 U-boot Kernel backlight setting的更多相关文章

  1. I.MX6 change boot partition 1 to User area

    /************************************************************************************ * I.MX6 change ...

  2. spring boot 遇到 supported setting property http://xml.org/sax/properties/lexical-handler

    解决链接:http://apache-fop.1065347.n5.nabble.com/org-xml-sax-SAXNotSupportedException-thrown-by-FOP-td11 ...

  3. 深入linux kernel内核配置选项

    ============================================================================== 深入linux kernel内核配置选项 ...

  4. Linux - 升级+编译kernel

    For upgrading present kernel to linux-next kernel, we need to follow below steps. 1. Check present k ...

  5. 快速编译system.img、userdata.img、boot.img的方法

    快速编译system.img和boot.img的方法 快速编译system.img,可以使用这个命令: #make systemimage 快速编译boot.img,可以使用以下命令: #make b ...

  6. Raspberry Pi Kernel Compilation 内核编译官方文档

    elinux.org/Raspberry_Pi_Kernel_Compilation#Use_the_provided_compiler Software & Distributions: S ...

  7. RPi Kernel Compilation

    Overview This page explains how to rebuild the kernel image for the RPi. There are two possible rout ...

  8. kernel笔记——内核编译与进程管理

    内核与操作系统 由于一些商业操作系统设计上的缺陷以及日益庞杂,“操作系统”的概念对很多人而言变得含糊不清.在进一步讨论Linux内核的话题前,我们先区分“内核”与“操作系统”这两个概念. 操作系统:指 ...

  9. 解决Ubuntu启动错误——kernel panic not syncing vfs unable to mount root fs on unknown-block 0 0 – error

    最近在倒腾Ubuntu,然后想着怎么美化一下界面,于是照着网上的教程整了一下Flatabulous这个软件,然后好像/boot就满了.关机之后再开机就出现了如题所述的错误,无法开机,也无法进入reco ...

随机推荐

  1. Android导入Cocos2D的Sample项目

    导入Cocos2D项目到Android的Eclipse时注意以下几点 1. Set up Variables: Eclipse->Windows->Preferences->Gene ...

  2. bnuoj 27987 Record of the Attack at the Orbit (模拟)

    http://www.bnuoj.com/bnuoj/problem_show.php?pid=27987 [题意]:给定坐标输出图形 [题解]:处理坐标上的小技巧 [code]: #include ...

  3. asp.net中js和jquery调用ashx的不同方法分享

    代码如下: var xhr = new XMLHttpRequest();            xhr.open("get", 'Controls/gengCart.ashx?C ...

  4. PAT-乙级-1017. A除以B (20)

    1017. A除以B (20) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 本题要求计算A/B,其中A是不超过 ...

  5. uva 825

    这个......小学生就会的  坑在输入输出了  两个数之间可能不止一个空格....wa了好几遍啊 #include <cstdio> #include <cstring> # ...

  6. KafkaSpout的处理流程

    基于0.93版本Storm 首先,如果自己写KafkaSpout,该怎么办?有哪些地方需要考虑呢 1. 得实现Storm指定的接口.这样Storm才能够使用它.那么需要实现什么接口?需要提供什么功能给 ...

  7. C++函数中那些不可以被声明为虚函数的函数

    转自C++函数中那些不可以被声明为虚函数的函数 常见的不不能声明为虚函数的有:普通函数(非成员函数):静态成员函数:内联成员函数:构造函数:友元函数. 1.为什么C++不支持普通函数为虚函数? 普通函 ...

  8. ie6 iframe src="javascript:" 报安全警报问题

    <iframe id="shuaka_iframe" class="embed-page-iframe" data-src="https://w ...

  9. Shell命令合集

    Ccat zdd 浏览文件zdd的内容cat zdd1 zdd2 浏览多个文件的内容cat -n zdd浏览文件zdd的内容并显示行号 cd 回到起始目录,也即刚登陆到系统的目录,cd后面无参数cd ...

  10. poj 2454 Jersey Politics 随机化

    随机化算法+贪心! 将3*k排序后分成3分,将第二第三份的和分别加起来,让和与500*k比较,都大于则输出,否则,随机生成2个数,在第二第三份中交换! 代码如下: #include<iostre ...