From: Michael Tretter <m.tretter@pengutronix.de>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, kernel@pengutronix.de,
Khalid Talash <ktalash@topcon.com>
Subject: Re: [PATCH 1/2] Input: st1232 - read firmware version and revision
Date: Wed, 18 Mar 2026 12:42:09 +0100 [thread overview]
Message-ID: <abqPkR0dA4Gz2HGo@pengutronix.de> (raw)
In-Reply-To: <aYX_paFYIBycCrf8@pengutronix.de>
On Fri, 06 Feb 2026 15:50:13 +0100, Michael Tretter wrote:
> On Thu, 05 Feb 2026 01:17:17 -0800, Dmitry Torokhov wrote:
> > On Fri, Jan 23, 2026 at 05:28:55PM +0100, Michael Tretter wrote:
> > > +static int st1232_ts_read_fw_version(struct st1232_ts_data *ts,
> > > + u8 *fw_version, u32 *fw_revision)
> > > +{
> > > + int error;
> > > +
> > > + /* select firmware version register */
> > > + error = st1232_ts_read_data(ts, REG_FIRMWARE_VERSION, 1);
> > > + if (error)
> > > + return error;
> > > + *fw_version = ts->read_buf[0];
> > > +
> > > + /* select firmware revision register */
> > > + error = st1232_ts_read_data(ts, REG_FIRMWARE_REVISION_3, 4);
> > > + if (error)
> > > + return error;
> > > + *fw_revision = get_unaligned_le32(ts->read_buf);
> >
> > Why unaligned? You are not reading at an offset and allocated memory is
> > cache line aligned.
>
> I copied what other touchscreen drivers were doing to read the version,
> but missed that they either read at an offset or use a buffer on the
> stack.
>
> Should I send a v2 or can you change this to le32_to_cpu() while
> applying the patch?
I just sent a v2.
Michael
next prev parent reply other threads:[~2026-03-18 11:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 16:28 [PATCH 0/2] Input: st1232 - add support for firmware version Michael Tretter
2026-01-23 16:28 ` [PATCH 1/2] Input: st1232 - read firmware version and revision Michael Tretter
2026-02-05 9:17 ` Dmitry Torokhov
2026-02-06 14:50 ` Michael Tretter
2026-03-18 11:42 ` Michael Tretter [this message]
2026-01-23 16:28 ` [PATCH 2/2] Input: st1232 - expose firmware version via sysfs Michael Tretter
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=abqPkR0dA4Gz2HGo@pengutronix.de \
--to=m.tretter@pengutronix.de \
--cc=dmitry.torokhov@gmail.com \
--cc=kernel@pengutronix.de \
--cc=ktalash@topcon.com \
--cc=linux-input@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.