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>
1 parent f35f76a commit de7963ef3cf85d37aad6cc00f97d7cb48f7d5052
@Sam Ravnborg Sam Ravnborg authored on 20 Jul 2017
Sascha Hauer committed on 6 Sep 2017
Showing 7 changed files
View
arch/arm/boards/at91sam9261ek/init.c
View
arch/arm/boards/at91sam9263ek/init.c
View
arch/arm/boards/at91sam9m10ihd/init.c
View
arch/arm/boards/at91sam9n12ek/init.c
View
drivers/video/atmel_lcdfb.h
View
drivers/video/atmel_lcdfb_core.c
View
include/video/atmel_lcdc.h