/*********************************************************************
* 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. 对vector等STL标准容器的排序操作

    [+] STL提供的Sort 算法 所有sort算法介绍 sort 中的比较函数 sort 的稳定性 全排序 局部排序 nth_element 指定元素排序 partition 和stable_par ...

  2. C/C++错误分析errno,perror,strerror和GetLastError()函数返回的错误代码的意义

    在C语言编译中,经常会出现一些系统的错误,这些错误如果在编译的时候不能很好的“预见”,会使系统“崩溃”,常见的捕获错误函数有: errno #include<errno.h> 这个变量是程 ...

  3. Get the item a SharePoint workflow task is associated with

    This is handy. SharePoint helpfully populates the meta data with the GUID of the list and the ID of  ...

  4. sharepoint 2010 masterpage中必须的Content PlaceHolder

    Professional SharePoint 2010 Branding and Use

  5. Qt的gzip模块实现

    一直没找到Qt中方便的gzip模块,于是自己动手,调用zlib模块实现了一份. 目标:  1.gzip的压缩与解压 2.内存中操作 3.方便的Qt接口   实现分析: gzip 压缩算法为 defla ...

  6. hdu 4707 Pet(DFS水过)

    http://acm.hdu.edu.cn/showproblem.php?pid=4707 [题目大意]: Lin Ji 的宠物鼠丢了,在校园里寻找,已知Lin Ji 在0的位置,输入N D,N表示 ...

  7. 使用SqlDataAdapter时,需要注意的几点

    1.SqlDataAdapter内部通过SqlDataReader获取数据,而默认情况下SqlDataReader不能获知其查询语句对应的数据库表名,所以下面的代码: string strConn,s ...

  8. [Windows Azure] Querying Tables and Entities

    Constructing Filter Strings When constructing a filter string, keep these rules in mind: Use the log ...

  9. ExtJS4.2学习(10)分组表格控件--GroupingGrid(转)

    鸣谢网址:http://www.shuyangyang.com.cn/jishuliangongfang/qianduanjishu/2013-11-17/179.html ------------- ...

  10. [转载]自定义ASP.NET MVC Html辅助方法 TagBuilder

    在ASP.NET MVC中,Html辅助方法给我们程序员带来很多方便,其重要性也就不言自明.有时候,我们不想重复地写一些HTML代码,或者MS没有提供我们想要的那个HTML标签的Html辅助方法,那么 ...