[PATCH 7/7] drm/panel: sitronix-st7789v: Check display ID
Sebastian Reichel
sre at kernel.org
Fri Jun 16 13:38:04 UTC 2023
Hi,
On Fri, Jun 16, 2023 at 12:13:45PM +0200, Miquel Raynal wrote:
> sre at kernel.org wrote on Thu, 15 Jun 2023 01:27:24 +0200:
> > On Sat, Jun 10, 2023 at 10:45:25PM +0200, Sam Ravnborg wrote:
> > > On Fri, Jun 09, 2023 at 04:59:51PM +0200, Miquel Raynal wrote:
> > > > A very basic debugging rule when a device is connected for the first
> > > > time is to access a read-only register which contains known data in
> > > > order to ensure the communication protocol is properly working. This
> > > > driver lacked any read helper which is often a critical peace for
> > > > fastening bring-ups.
> > > >
> > > > Add a read helper and use it to verify the communication with the panel
> > > > is working as soon as possible in order to fail early if this is not the
> > > > case.
> > >
> > > The read helper seems like a log of general boiler plate code.
> > > I briefly looked into the use of regmap for the spi communication,
> > > but it did not look like it supported the bit9 stuff.
> > >
> > > I did not stare enough to add a reviewd by, but the approach is fine
> > > and it is good to detech issues early.
> >
> > The st7789v datasheet describes a setup where SPI is connected
> > unidirectional (i.e. without MISO). In that case the ID check
> > will fail.
>
> Right. I'll add a (spi->mode & SPI_NO_RX) check, as the default is to
> have both lines, if there is no MISO line, I'd expect it to be
> described in the DT, otherwise the description is broken.
Checking for SPI_NO_RX sounds good to me.
-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20230616/8db4c6e1/attachment.sig>
More information about the dri-devel
mailing list