From 05c4cc0f95772364989dd58457e42b0566d1f156 Mon Sep 17 00:00:00 2001 From: Peter Griffin Date: Thu, 24 Apr 2014 13:28:24 +0100 Subject: video/backlight: LM3630A needs PWM The LM3630A driver cannot be successfully built if we don't enable the PWM subsystem. This patch makes that dependency explicit in Kconfig and prevents broken randconfig builds. Based on Arnd Bergmann patch but split out into seperate commits per driver based on feedback. Signed-off-by: Arnd Bergmann Signed-off-by: Peter Griffin Acked-by: Jingoo Han Acked-by: Bryan Wu Signed-off-by: Lee Jones --- drivers/video/backlight/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig index 5a3eb2ecb525..4791af7b8036 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig @@ -370,7 +370,7 @@ config BACKLIGHT_AAT2870 config BACKLIGHT_LM3630A tristate "Backlight Driver for LM3630A" - depends on BACKLIGHT_CLASS_DEVICE && I2C + depends on BACKLIGHT_CLASS_DEVICE && I2C && PWM select REGMAP_I2C help This supports TI LM3630A Backlight Driver -- cgit v1.2.3-58-ga151 From e6162f3ece4a3e60adb732a6b842a22cb76bc6da Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 24 Apr 2014 13:28:26 +0100 Subject: video/pxa: LCD_CORGI needs BACKLIGHT_CLASS_DEVICE This fixes a randconfig build error when BACKLIGHT_CLASS_DEVICE is disabled, by describing the dependency in Kconfig, as we do for the other drivers in this directory. Signed-off-by: Arnd Bergmann Signed-off-by: Peter Griffin Acked-by: Jingoo Han Acked-by: Bryan Wu Signed-off-by: Lee Jones --- drivers/video/backlight/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig index 4791af7b8036..88f95581f1ad 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig @@ -29,7 +29,7 @@ if LCD_CLASS_DEVICE config LCD_CORGI tristate "LCD Panel support for SHARP corgi/spitz model" - depends on SPI_MASTER && PXA_SHARPSL + depends on SPI_MASTER && PXA_SHARPSL && BACKLIGHT_CLASS_DEVICE help Say y here to support the LCD panels usually found on SHARP corgi (C7x0) and spitz (Cxx00) models. -- cgit v1.2.3-58-ga151 From 91a57dc1345c524f349aa6a0ec24b1b2ba9b0904 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 24 Apr 2014 13:28:28 +0100 Subject: video/backlight: LP855X needs PWM The LP855X driver cannot be successfully built if we don't enable the PWM subsystem. This patch makes that dependency explicit in Kconfig and prevents broken randconfig builds. Signed-off-by: Arnd Bergmann Signed-off-by: Peter Griffin Acked-by: Jingoo Han Acked-by: Bryan Wu Acked-by: Milo Kim Signed-off-by: Lee Jones --- drivers/video/backlight/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig index 88f95581f1ad..3e393026dc81 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig @@ -386,7 +386,7 @@ config BACKLIGHT_LM3639 config BACKLIGHT_LP855X tristate "Backlight driver for TI LP855X" - depends on BACKLIGHT_CLASS_DEVICE && I2C + depends on BACKLIGHT_CLASS_DEVICE && I2C && PWM help This supports TI LP8550, LP8551, LP8552, LP8553, LP8555, LP8556 and LP8557 backlight driver. -- cgit v1.2.3-58-ga151 From 513199368aa16758088385e17284a6dacad3f869 Mon Sep 17 00:00:00 2001 From: Peter Griffin Date: Thu, 24 Apr 2014 13:28:25 +0100 Subject: video/backlight: LP8788 needs PWM The LP8788 driver cannot be successfully built if we don't enable the PWM subsystem. This patch makes that dependency explicit in Kconfig and prevents broken randconfig builds. Based on Arnd Bergmann patch but split out into seperate commits per driver based on feedback. Signed-off-by: Arnd Bergmann Signed-off-by: Peter Griffin Acked-by: Jingoo Han Acked-by: Bryan Wu Acked-by: Milo Kim Signed-off-by: Lee Jones --- drivers/video/backlight/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig index 3e393026dc81..5d449059a556 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig @@ -393,7 +393,7 @@ config BACKLIGHT_LP855X config BACKLIGHT_LP8788 tristate "Backlight driver for TI LP8788 MFD" - depends on BACKLIGHT_CLASS_DEVICE && MFD_LP8788 + depends on BACKLIGHT_CLASS_DEVICE && MFD_LP8788 && PWM help This supports TI LP8788 backlight driver. -- cgit v1.2.3-58-ga151 From 39a6ec28bdc1385d29d9cbd4a9b385230b3cc755 Mon Sep 17 00:00:00 2001 From: Masanari Iida Date: Fri, 25 Apr 2014 00:47:16 +0900 Subject: video/backlight: s6e63m0: Fix string type mismatch Fix string type mismatch in s6e63m0_sysfs_show_gamma_table(). gamma_table_count is defined as unsigned int. Signed-off-by: Masanari Iida Acked-by: Bryan Wu Signed-off-by: Lee Jones --- drivers/video/backlight/s6e63m0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c index 510a1bcf76f1..2d6d48196c6d 100644 --- a/drivers/video/backlight/s6e63m0.c +++ b/drivers/video/backlight/s6e63m0.c @@ -703,7 +703,7 @@ static ssize_t s6e63m0_sysfs_show_gamma_table(struct device *dev, struct s6e63m0 *lcd = dev_get_drvdata(dev); char temp[3]; - sprintf(temp, "%d\n", lcd->gamma_table_count); + sprintf(temp, "%u\n", lcd->gamma_table_count); strcpy(buf, temp); return strlen(buf); -- cgit v1.2.3-58-ga151 From ab1e59b4dc0370734ab3afb8de0c10a6f5a211ad Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Thu, 8 May 2014 18:24:55 -0700 Subject: backlight: gpio-backlight: Fix warning when the GPIO is on a I2C chip If the GPIO for the backlight is on an I2C chip, we currently get nasty warnings like this during the boot: WARNING: CPU: 0 PID: 6 at drivers/gpio/gpiolib.c:2364 gpiod_set_raw_value+0x40/0x4c() Modules linked in: CPU: 0 PID: 6 Comm: kworker/u2:0 Not tainted 3.15.0-rc4-12393-gcde9f4e #400 Workqueue: deferwq deferred_probe_work_func [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x80/0x9c) [] (dump_stack) from [] (warn_slowpath_common+0x68/0x8c) [] (warn_slowpath_common) from [] (warn_slowpath_null+0x1c/0x24) [] (warn_slowpath_null) from [] (gpiod_set_raw_value+0x40/0x4c) [] (gpiod_set_raw_value) from [] (gpio_backlight_update_status+0x4c/0x74) [] (gpio_backlight_update_status) from [] (gpio_backlight_probe+0x168/0x254) [] (gpio_backlight_probe) from [] (platform_drv_probe+0x18/0x48) [] (platform_drv_probe) from [] (driver_probe_device+0x10c/0x238) [] (driver_probe_device) from [] (bus_for_each_drv+0x44/0x8c) [] (bus_for_each_drv) from [] (device_attach+0x74/0x8c) [] (device_attach) from [] (bus_probe_device+0x88/0xb0) [] (bus_probe_device) from [] (deferred_probe_work_func+0x64/0x94) [] (deferred_probe_work_func) from [] (process_one_work+0x1b4/0x4bc) [] (process_one_work) from [] (worker_thread+0x11c/0x398) [] (worker_thread) from [] (kthread+0xc8/0xe4) [] (kthread) from [] (ret_from_fork+0x14/0x2c) Fix this by using gpio_set_value_cansleep() as suggested in drivers/gpio/gpiolib.c:2364. This is what the other backlight drivers are also doing. Signed-off-by: Tony Lindgren Acked-by: Jingoo Han Signed-off-by: Lee Jones --- drivers/video/backlight/gpio_backlight.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/video/backlight/gpio_backlight.c b/drivers/video/backlight/gpio_backlight.c index a2eba12e1cb7..1cea68848f1a 100644 --- a/drivers/video/backlight/gpio_backlight.c +++ b/drivers/video/backlight/gpio_backlight.c @@ -38,7 +38,8 @@ static int gpio_backlight_update_status(struct backlight_device *bl) bl->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK)) brightness = 0; - gpio_set_value(gbl->gpio, brightness ? gbl->active : !gbl->active); + gpio_set_value_cansleep(gbl->gpio, + brightness ? gbl->active : !gbl->active); return 0; } -- cgit v1.2.3-58-ga151