I.MX6 U-boot Kernel backlight setting
2016-03-07 09:24
323 查看
/********************************************************************* * I.MX6 U-boot Kernel backlight setting * 说明: * 本文主要记录I.MX6 U-boot、Kernel中如何打开、关闭背光设置。 * * 2016-3-7 深圳 南山平山村 曾剑锋 ********************************************************************/ 1. 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 |= (1 << 15); writel(reg, GPIO6_BASE_ADDR + GPIO_GDIR); reg = readl(GPIO6_BASE_ADDR + GPIO_DR); //reg &= ~(1 << 15); reg |= (1 << 15); 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 |= (1 << 16); writel(reg, GPIO6_BASE_ADDR + GPIO_GDIR); reg = readl(GPIO6_BASE_ADDR + GPIO_DR); //reg &= ~(1 << 16); reg |= (1 << 16); writel(reg, GPIO6_BASE_ADDR + GPIO_DR); ...... } ...... 2. 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); ...... } ......
相关文章推荐
- jquery ui draggable
- oracle相关连接
- 详解C++文件读写操作
- ubuntu-15.10-desktop-amd64 体验
- Android开发笔记(七十六)线程池管理
- 2016.03.06回顾
- 迭代效果评价指标
- 二叉树分析(两点最大距离)
- 背水一战 Windows 10 (1) - C# 6.0 新特性
- Histograms of Oriented Gradients for Human Detection论文翻译
- page、request、session和application区别 及各自作用域
- 类的修饰符
- 实用的工具 —— 百度云、everything(全局搜索)、Everest(硬件检测)、TechPowerUp GPU-Z
- 桶排序
- htonl ntohl htons ntohs 函数实现
- Oracle 如何修改表名, Oracle 如何修改列名 ,Oracle 如何修改字段类型语句
- 设置MySQL开机自动启动的方法
- HTML+CSS D07 边框、div
- 使用Java构造和解析Json数据的两种方法(详解一)
- 过滤器