public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Michael Tretter <m.tretter@pengutronix.de>
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: Thu, 5 Feb 2026 01:17:17 -0800	[thread overview]
Message-ID: <aYRftJPEKEWE7VhK@google.com> (raw)
In-Reply-To: <20260123-input-st1232-firmware-version-v1-1-32df7eefdafe@pengutronix.de>

Hi Michael,

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.

Thanks.

-- 
Dmitry

  reply	other threads:[~2026-02-05  9:17 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 [this message]
2026-02-06 14:50     ` Michael Tretter
2026-03-18 11:42       ` Michael Tretter
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=aYRftJPEKEWE7VhK@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=ktalash@topcon.com \
    --cc=linux-input@vger.kernel.org \
    --cc=m.tretter@pengutronix.de \
    /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