On Thu, 20 Feb 2020, Linus Walleij wrote:
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.
Cc: Andrea Adami andrea.adami@gmail.com Acked-by: Robert Jarzmik robert.jarzmik@free.fr Signed-off-by: Linus Walleij linus.walleij@linaro.org
ChangeLog v2->v3:
- Switch the SPI bus name to "spi1.1" rather than "spi0.1" for Corgi and "spi2.1" rather than "spi0.1" for Spitz, as pxa2xx_set_spi_info() sets the bus number to 1 and 2 respectively.
ChangeLog v1->v2:
- Collect Robert's ACK.
arch/arm/mach-pxa/corgi.c | 12 ++++- arch/arm/mach-pxa/spitz.c | 34 +++++++++++---- drivers/video/backlight/corgi_lcd.c | 68 ++++++++--------------------- include/linux/spi/corgi_lcd.h | 3 -- 4 files changed, 54 insertions(+), 63 deletions(-)
Applied, thanks.