Re: [PATCH 19/19] gpio: add GPIO controller found on Waveshare DSI TOUCH panels
From: Bartosz Golaszewski
Date: Thu Apr 09 2026 - 03:41:42 EST
On Thu, Apr 9, 2026 at 3:26 AM Dmitry Baryshkov
<dmitry.baryshkov@xxxxxxxxxxxxxxxx> wrote:
>
> >
> > This driver looks like it could be easily converted to use gpio-regmap and
> > become much shorter in the process. Could you please take a look at
> > linux/gpio/regmap.h?
>
> I took a glance. It is a nice wrapper, but I think being able to call
> waveshare_gpio_set() internally without extra troubles overweights the
> bonuses of the wrapper. Also, I'd agree if there were extra complexity
> here (e.g. the stride or the in/out handling), but having just the out
> GPIOs doesn't seem to warrant it.
>
> An alternative would be to split away the backlight into a separate
> pwm-backlight device. Then having waveshare_gpio_set() isn't that
> important and thus I could switch to GPIO_REGMAP. But then... We don't
> have real control over the PWM. We are really programming some values,
> with the actual PWM duty cycle calculations being handled internally.
>
> With all that in mind, unless you really insist, I'd prefer to leave
> this part the driver as is.
>
Ok, with the other issues fixed it's good to go then.
Bart