Re: [PATCH] backlight: pwm_bl: Switch to full GPIO descriptor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <krzk@xxxxxxxxxx>
> Cc: Robert Jarzmik <robert.jarzmik@xxxxxxx>
> Cc: Guan Xuetao <gxt@xxxxxxxxxx>
> Cc: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux