aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-12-01 16:13:39 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2019-12-01 16:13:39 -0800
commit38edc3dff9d2805c48e0a171667e7ca820336ab7 (patch)
tree1e69585093b00ef56bc58f945fd7e2ae6f18bec9 /arch/sh
parentMerge tag 'pinctrl-v5.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl (diff)
parentbacklight: qcom-wled: Fix spelling mistake "trigged" -> "triggered" (diff)
downloadlinux-dev-38edc3dff9d2805c48e0a171667e7ca820336ab7.tar.xz
linux-dev-38edc3dff9d2805c48e0a171667e7ca820336ab7.zip
Merge tag 'backlight-next-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
Pull backlight updates from Lee Jones: "New Functionality: - Add support for an enable GPIO; lm3630a_bl - Add support for short circuit handling; qcom-wled - Add support for automatic string detection; qcom-wled Fix-ups: - Update Device Tree bindings; lm3630a-backlight, led-backlight, qcom-wled - Constify; ipaq_micro_bl - Optimise for CPU cycles; pwm_bl - Coding style fix-ups; pwm_bl - Trivial fix-ups (white space, comments, renaming); pwm_bl, gpio_backlight, qcom-wled - Kconfig dependency hacking; LCD_HP700 - Rename, refactor and add peripherals; pm8941-wled => qcom-wled - Make use of GPIO look-up tables; tosa_bl, tosa_lcd - Remove superfluous code; gpio_backlight - Adapt GPIO direction handling; gpio_backlight - Remove legacy use of platform data; gpio_backlight Bug Fixes: - Provide modules aliases; lm3630a_bl" * tag 'backlight-next-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (32 commits) backlight: qcom-wled: Fix spelling mistake "trigged" -> "triggered" backlight: gpio: Pull gpio_backlight_initial_power_state() into probe backlight: gpio: Use a helper variable for &pdev->dev backlight: gpio: Remove unused fields from platform data sh: ecovec24: don't set unused fields in platform data backlight: gpio: Simplify the platform data handling sh: ecovec24: add additional properties to the backlight device backlight: gpio: Explicitly set the direction of the GPIO backlight: gpio: Remove stray newline backlight: gpio: Remove unneeded include video: backlight: tosa: Use GPIO lookup table backlight: qcom-wled: Add auto string detection logic backlight: qcom-wled: Add support for short circuit handling backlight: qcom-wled: Add support for WLED4 peripheral backlight: qcom-wled: Restructure the driver for WLED3 backlight: qcom-wled: Rename PM8941* to WLED3 backlight: qcom-wled: Add new properties for PMI8998 backlight: qcom-wled: Restructure the qcom-wled bindings backlight: qcom-wled: Rename pm8941-wled.c to qcom-wled.c dt-bindings: backlight: lm3630a: Fix missing include ...
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c33
1 files changed, 25 insertions, 8 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index acaa97459531..dd427bac5cde 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -371,20 +371,32 @@ static struct platform_device lcdc_device = {
},
};
+static struct gpiod_lookup_table gpio_backlight_lookup = {
+ .dev_id = "gpio-backlight.0",
+ .table = {
+ GPIO_LOOKUP("sh7724_pfc", GPIO_PTR1, NULL, GPIO_ACTIVE_HIGH),
+ { }
+ },
+};
+
+static struct property_entry gpio_backlight_props[] = {
+ PROPERTY_ENTRY_BOOL("default-on"),
+ { }
+};
+
static struct gpio_backlight_platform_data gpio_backlight_data = {
.fbdev = &lcdc_device.dev,
- .gpio = GPIO_PTR1,
- .def_value = 1,
- .name = "backlight",
};
-static struct platform_device gpio_backlight_device = {
+static const struct platform_device_info gpio_backlight_device_info = {
.name = "gpio-backlight",
- .dev = {
- .platform_data = &gpio_backlight_data,
- },
+ .data = &gpio_backlight_data,
+ .size_data = sizeof(gpio_backlight_data),
+ .properties = gpio_backlight_props,
};
+static struct platform_device *gpio_backlight_device;
+
/* CEU0 */
static struct ceu_platform_data ceu0_pdata = {
.num_subdevs = 2,
@@ -1006,7 +1018,6 @@ static struct platform_device *ecovec_devices[] __initdata = {
&usb1_common_device,
&usbhs_device,
&lcdc_device,
- &gpio_backlight_device,
&keysc_device,
&cn12_power,
#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE)
@@ -1462,6 +1473,12 @@ static int __init arch_setup(void)
#endif
#endif
+ gpiod_add_lookup_table(&gpio_backlight_lookup);
+ gpio_backlight_device = platform_device_register_full(
+ &gpio_backlight_device_info);
+ if (IS_ERR(gpio_backlight_device))
+ return PTR_ERR(gpio_backlight_device);
+
return platform_add_devices(ecovec_devices,
ARRAY_SIZE(ecovec_devices));
}