/*************************************************************************** * I.MX6 Linux kernel LVDS backlight enable * 说明: * 由于目前U-boot阶段屏出现反白的现象,所以在U-boot阶段关闭了背光,之前 * 尝试在板级文件中打开背光,但由于那个地方Linux LVDS驱动还没有工作,导致 * 反白的现象还是存在,仅仅是时间变短了,于是最后将enable信号放在驱动的probe * 末尾,主要是考虑到这个位置表示控制器已经基本配置完成,图像输出会正常输出, * 事实情况也是如此。 **************************************************************************/ cat drivers/video/mxc/ldb.c ...... #include <linux/gpio.h> ...... #define SABRESD_CABC_EN0 IMX_GPIO_NR(6, 15) #define SABRESD_CABC_EN1 IMX_GPIO_NR(6, 16) ...... static int ldb_probe(struct platform_device *pdev) { ...... /* * 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 2016-3-14 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); alloc_failed: return ret; } ......
时间: 2024-10-24 21:55:44