On Thu, Dec 05, 2019 at 09:11:16AM +0100, Linus Walleij wrote:
> The PWM backlight still supports passing a enable GPIO line as
> platform data using the legacy <linux/gpio.h> API.
> 
> It turns out that ever board using this mechanism except one
> is pass .enable_gpio = -1. So we drop all these cargo-culted -1's
> from all instances of this platform data in the kernel.
> 
> The remaning board, Palm TC, is converted to pass a machine
> descriptior table with the "enable" GPIO instead, and delete the
> platform data entry for enable_gpio and the code handling it
> and things should work smoothly with the new API.
> 
> Cc: Krzysztof Kozlowski <k...@kernel.org>
> Cc: Robert Jarzmik <robert.jarz...@free.fr>
> Cc: Guan Xuetao <g...@pku.edu.cn>
> Cc: Bartosz Golaszewski <bgolaszew...@baylibre.com>
> Signed-off-by: Linus Walleij <linus.wall...@linaro.org>

Looks good but...

> diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
> index f52bd155e825..3813118435bf 100644
> --- a/arch/arm/mach-pxa/palmtc.c
> +++ b/arch/arm/mach-pxa/palmtc.c
> @@ -175,6 +175,15 @@ static inline void palmtc_keys_init(void) {}
>   * Backlight
>   
> ******************************************************************************/
>  #if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM_MODULE)
> +
> +static struct gpiod_lookup_table palmtc_pwm_bl_gpio_table = {
> +     .dev_id = "pwm-backlight.0",
> +     .table = {
> +             GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMTC_BL_POWER,
> +                         "enable", GPIO_ACTIVE_HIGH),
> +     },
> +};
> +

... I cannot find the corresponding removal of the 
`.enable_gpio = GPIO_NR_PALMTC_BL_POWER` meaning that ...

> diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h
> index 8ea265a022fd..06086cb93b6f 100644
> --- a/include/linux/pwm_backlight.h
> +++ b/include/linux/pwm_backlight.h
> @@ -16,8 +16,6 @@ struct platform_pwm_backlight_data {
>       unsigned int *levels;
>       unsigned int post_pwm_on_delay;
>       unsigned int pwm_off_delay;
> -     /* TODO remove once all users are switched to gpiod_* API */
> -     int enable_gpio;

... I worry that palmtc.c is no longer compilable for some configs.


Daniel.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to