backlight: corgi: Convert to use GPIO descriptors

The code in the Corgi backlight driver can be considerably
simplified by moving to GPIO descriptors and lookup tables
from the board files instead of passing GPIO numbers using
the old API.

Make sure to encode inversion semantics for the Akita and
Spitz platforms inside the GPIO lookup table and drop the
custom inversion semantics from the driver.

All in-tree users are converted in this patch.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
Linus Walleij
2020-02-20 10:00:32 +01:00
committed by Lee Jones
parent 2644f912b4
commit ee0c8e494c
4 changed files with 52 additions and 61 deletions

View File

@@ -11,9 +11,6 @@ struct corgi_lcd_platform_data {
int default_intensity;
int limit_mask;
int gpio_backlight_on; /* -1 if n/a */
int gpio_backlight_cont; /* -1 if n/a */
void (*notify)(int intensity);
void (*kick_battery)(void);
};