From: Sam Ravnborg <sam@ravnborg.org>
To: "Noralf Trønnes" <noralf@tronnes.org>
Cc: Thierry Reding <thierry.reding@gmail.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 4/9] drm/panel: Add driver for the LG Philips LB035Q02 panel
Date: Sun, 11 Aug 2019 18:49:51 +0200 [thread overview]
Message-ID: <20190811164951.GD14660@ravnborg.org> (raw)
In-Reply-To: <6a2a22b2-3db5-2d7b-d19b-4f3857351134@tronnes.org>
Hi Noralf.
> > +static int lb035q02_write(struct lb035q02_device *lcd, u16 reg, u16 val)
> > +{
> > + struct spi_message msg;
> > + struct spi_transfer index_xfer = {
> > + .len = 3,
> > + .cs_change = 1,
> > + };
> > + struct spi_transfer value_xfer = {
> > + .len = 3,
> > + };
> > + u8 buffer[16];
> > +
> > + spi_message_init(&msg);
> > +
> > + /* register index */
> > + buffer[0] = 0x70;
> > + buffer[1] = 0x00;
> > + buffer[2] = reg & 0x7f;
> > + index_xfer.tx_buf = buffer;
> > + spi_message_add_tail(&index_xfer, &msg);
> > +
> > + /* register value */
> > + buffer[4] = 0x72;
> > + buffer[5] = val >> 8;
> > + buffer[6] = val;
> > + value_xfer.tx_buf = buffer + 4;
> > + spi_message_add_tail(&value_xfer, &msg);
> > +
> > + return spi_sync(lcd->spi, &msg);
> > +}
>
> Just a note to Sam:
> This is the same spi protocol that the ili9325 controller on the hy28b
> panel uses.
>
> I remembered that I have experimented with a regmap implementation:
> https://github.com/notro/tinydrm/blob/master/tinydrm-ili9325.c#L191
regmap seems a too limited interface to use when trying to generalize
this.
We should rather go for a ili-lib or something that can be used in all
the present and future ili based drivers.
Obviously it depends on how similar the ili based chips are.
I did a quick look and this driver did not match the ili9325 datasheet
as different bits was are in register 0x1.
So it smeels like another, similar. ili varaint.
So for this driver we would just use the hardcoded varaint already
present. Then we may re-visit ili-lib idea later if we see too much
similar code.
This is as I see it for now...
Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-08-11 16:49 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-10 23:10 [PATCH v2 0/9] DRM panel drivers for omapdrm Laurent Pinchart
2019-08-10 23:10 ` [PATCH v2 1/9] dt-bindings: Add vendor prefix for LG Display Laurent Pinchart
2019-08-10 23:10 ` [PATCH v2 2/9] dt-bindings: Add legacy 'toppoly' vendor prefix Laurent Pinchart
2019-08-12 18:54 ` Rob Herring
2019-08-10 23:10 ` [PATCH v2 3/9] dt-bindings: display: panel: Add bindings for NEC NL8048HL11 panel Laurent Pinchart
2019-08-11 16:55 ` Sam Ravnborg
2019-08-12 19:21 ` Rob Herring
2019-08-12 19:18 ` Rob Herring
2019-08-13 13:09 ` Laurent Pinchart
2019-08-10 23:10 ` [PATCH v2 4/9] drm/panel: Add driver for the LG Philips LB035Q02 panel Laurent Pinchart
2019-08-11 13:19 ` Noralf Trønnes
2019-08-11 13:35 ` Laurent Pinchart
2019-08-11 14:13 ` Noralf Trønnes
2019-08-11 16:49 ` Sam Ravnborg [this message]
2019-08-11 17:20 ` Noralf Trønnes
2019-08-11 17:26 ` Sam Ravnborg
2019-08-10 23:10 ` [PATCH v2 5/9] drm/panel: Add driver for the NEC NL8048HL11 panel Laurent Pinchart
2019-08-11 17:10 ` Sam Ravnborg
2019-08-13 13:17 ` Laurent Pinchart
2019-08-10 23:10 ` [PATCH v2 6/9] drm/panel: Add driver for the Sharp LS037V7DW01 panel Laurent Pinchart
2019-08-10 23:10 ` [PATCH v2 7/9] drm/panel: Add driver for the Sony ACX565AKM panel Laurent Pinchart
2019-08-10 23:10 ` [PATCH v2 8/9] drm/panel: Add driver for the Toppoly TD028TTEC1 panel Laurent Pinchart
2019-08-10 23:10 ` [PATCH v2 9/9] drm/panel: Add driver for the Toppoly TD043MTEA1 panel Laurent Pinchart
2019-08-11 17:23 ` [PATCH v2 0/9] DRM panel drivers for omapdrm Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190811164951.GD14660@ravnborg.org \
--to=sam@ravnborg.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=noralf@tronnes.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox