Re: [PATCH v5 2/2] input: zinitix: Add touchkey support

Dmitry Torokhov
2024-07-20T00:29:41Z

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