Re: [PATCH 1/4] ARM: dts: omap3-n900: fix LCD reset line polarity
From: Dmitry Torokhov
Date: Tue Oct 11 2022 - 10:07:40 EST
Hi Sebastian,
On Tue, Oct 11, 2022 at 02:37:26PM +0200, Sebastian Reichel wrote:
> Hi,
>
> On Tue, Oct 11, 2022 at 08:45:54AM +0300, Tony Lindgren wrote:
> > * Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> [221004 21:26]:
> > > The LCD driver (panel-sony-acx565akm), when probing, starts with line
> > > driven low, and then toggles it to high and keeps it there. Also, the
> > > line is driven low when powering off the device, and ls released when
> > > powering it back on. This means that the reset line should be described
> > > as "active low" in DTS. This will be important when the driver is
> > > converted to gpiod API which respects the polarity declared in DTS.
> >
> > We should ensure these patches get merged together with the driver
> > change to avoid breaking LCD for booting. Probably no need to have
> > the driver quirk handling for inverted polartity in this case.
> >
> > It's probably easiest to have an immutable branch for the driver
> > changes I can base the dts changes on. Or I can ack the dts changes
> > if they get merged with the driver.
>
> Both drivers are already using gpiod API:
>
> drivers/gpu/drm/panel/panel-sony-acx565akm.c
> drivers/gpu/drm/panel/panel-dsi-cm.c
I was looking at
drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c
drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c
which are not using gpiod. Should they be retired?
>
> So this just breaks things.
I missed the drivers in drivers/gpu/... and I see that they essentially
abuse gpiod API as gpiod_set_value() operates on logical level
(active/inactive) and not absolute (high/low). They should either use
the gpiod_*_raw() variants, or they should be adjusted to do the proper
thing together with the accompanying DTS change.
What are your preferences?
Thanks.
--
Dmitry