mbox series

[0/2] Input: zinitix - Handle chip revisions for touchkeys

Message ID 20240806-zinitix-tk-versions-v1-0-63ef79c7f2a1@linaro.org
Headers show
Series Input: zinitix - Handle chip revisions for touchkeys | expand

Message

Linus Walleij Aug. 5, 2024, 10:11 p.m. UTC
The registers containing the touchkey status varies between
different chip revisions for the Zinitix touchscreens.

This series address the problem by reading out some chip
revision and firmware data so we can take different runtime
paths in different chip versions.

Also read out firmware and register version as this may
prove helpful to similar situations in the future.

This applies on top of Nikitas series to handle touchkeys
that was recently merged.

After this my BT404 touchkeys work.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Linus Walleij (2):
      Input: zinitix - Read and cache device version numbers
      Input: zinitix - Varying icon status registers

 drivers/input/touchscreen/zinitix.c | 59 +++++++++++++++++++++++++++++++++++--
 1 file changed, 57 insertions(+), 2 deletions(-)
---
base-commit: 669e9cb5f59903fbb1649660f3cb04e5217a7e58
change-id: 20240806-zinitix-tk-versions-9b18b20ebaad

Best regards,

Comments

Dmitry Torokhov Aug. 6, 2024, 12:18 a.m. UTC | #1
Hi Linus,

On Tue, Aug 06, 2024 at 12:11:38AM +0200, Linus Walleij wrote:
>  static int zinitix_init_touch(struct bt541_ts_data *bt541)
>  {
>  	struct i2c_client *client = bt541->client;
>  	int i;
>  	int error;
>  	u16 int_flags;
> +	static bool read_static = false;

As I mentioned before using such static flags is not the best practice,
can it be moved into per-device structure?

Thanks.