public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Nikita Travkin <nikita@trvn.ru>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Michael Srba <Michael.Srba@seznam.cz>,
	Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/2] input: zinitix: Add touchkey support
Date: Fri, 19 Jul 2024 17:29:38 -0700	[thread overview]
Message-ID: <ZpsE8mQpahxBQRE-@google.com> (raw)
In-Reply-To: <20240717-zinitix-tkey-v5-2-52ea4cd4bd50@trvn.ru>

On Wed, Jul 17, 2024 at 06:55:34PM +0500, Nikita Travkin wrote:
> Zinitix touch controllers can use some of the sense lines for virtual
> keys (like those found on many phones). Add support for those keys.
> 
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Nikita Travkin <nikita@trvn.ru>

Applied, thank you. However:

> -->  
> +	if (le16_to_cpu(touch_event.status) & BIT_ICON_EVENT) {
> +		error = zinitix_read_data(bt541->client, ZINITIX_ICON_STATUS_REG,
> +					  &icon_events, sizeof(icon_events));
> +		if (error) {
> +			dev_err(&client->dev, "Failed to read icon events\n");
> +			goto out;
> +		}

I wonder, would it make sense (and be more efficient) to issue a single
read of size sizeof(struct touch_event) + sizeof(icon_events) and the
parse the data based on touch_event.status?

Thanks.

-- 
Dmitry

  reply	other threads:[~2024-07-20  0:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-17 13:55 [PATCH v5 0/2] Add touch-keys support to the Zinitix touch driver Nikita Travkin
2024-07-17 13:55 ` [PATCH v5 1/2] dt-bindings: input: zinitix: Document touch-keys support Nikita Travkin
2024-07-20  0:27   ` Dmitry Torokhov
2024-07-17 13:55 ` [PATCH v5 2/2] input: zinitix: Add touchkey support Nikita Travkin
2024-07-20  0:29   ` Dmitry Torokhov [this message]
2024-07-20  6:57     ` Nikita Travkin

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=ZpsE8mQpahxBQRE-@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=Michael.Srba@seznam.cz \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikita@trvn.ru \
    --cc=robh+dt@kernel.org \
    --cc=robh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox