summaryrefslogtreecommitdiffstats
path: root/include/video
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2017-07-20 22:05:24 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-09-06 14:20:31 +0200
commitde7963ef3cf85d37aad6cc00f97d7cb48f7d5052 (patch)
treeba9d704e5f369258aab9346965bd4b64dae818f7 /include/video
parentf35f76ac5157b8f07a3f2330333c0e1ca54a48f5 (diff)
downloadbarebox-de7963ef3cf85d37aad6cc00f97d7cb48f7d5052.tar.gz
barebox-de7963ef3cf85d37aad6cc00f97d7cb48f7d5052.tar.xz
atmel_lcdfb: define power_control gpio in platform_data
Simplify board specific code by specifying the power_control gpio direct in platform data. Move registration of the GPIO to the driver so we no longer need to duplicate this for each board. As an intended side-effect there is no longer any references to platform_data outside atmel_lcdc_register() so remove it from struct atmel_lcdfb_info The implementation assumes that GPIO=0 is the same as no power control. This prevents us from using any GPIO=0 for power control, but this is not considered a problem for current users. Future DT users will not have this limitation. This commit include a fix so we will actually power down if requested. Previously this was hardcoded to ON. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/video')
-rw-r--r--include/video/atmel_lcdc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h
index 132ee598a5..07a30e2e6f 100644
--- a/include/video/atmel_lcdc.h
+++ b/include/video/atmel_lcdc.h
@@ -44,7 +44,8 @@ struct atmel_lcdfb_platform_data {
u8 lcd_wiring_mode;
unsigned int default_lcdcon2;
unsigned int default_dmacon;
- void (*atmel_lcdfb_power_control)(int on);
+ int gpio_power_control;
+ bool gpio_power_control_active_low;
struct fb_videomode *mode_list;
unsigned num_modes;