lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b4113f8c-0fbd-4a96-9cf6-9675f837ac91@kernel.org>
Date: Wed, 21 Jan 2026 13:04:17 +0100
From: Hans de Goede <hansg@...nel.org>
To: Gianluca Boiano <morf3089@...il.com>
Cc: dmitry.torokhov@...il.com, robh@...nel.org, krzk+dt@...nel.org,
 conor+dt@...nel.org, linux-input@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] input: touchscreen: novatek-nvt-ts: Add support for
 NT36672A e7t variant

Hi Gianluca,

On 20-Jan-26 20:36, Gianluca Boiano wrote:
> Add support for the Novatek NT36672A touchscreen variant found on the
> Xiaomi Redmi Note 6 Pro (tulip) which uses a different wake_type value
> (0x02 instead of 0x01).
> 
> The touchscreen was failing to initialize with error -5 due to the
> wake_type parameter mismatch during probe. This adds a new chip data
> structure for the e7t variant with the correct wake_type value.
> 
> Closes: https://github.com/sdm660-mainline/linux/issues/155
> Signed-off-by: Gianluca Boiano <morf3089@...il.com>

Thank you for your patch.

I don't think that adding a new compatible + a new nvt_ts_i2c_chip_data
struct is the right approach here.

I guess the wake-type byte simply encodes some IRQ config settings,
which may indeed be different in different applications using
the some touchscreen controller.

Instead of adding a new compatible my suggestion to fix this would
be to simply drop the wake_type check as well as drop the wake_type
member from struct nvt_ts_i2c_chip_data.

This way you can fix the driver not working on the Xiaomi Redmi
Note 6 Pro by removing code instead of adding code :)

And supporting other models also becomes easier.

Regards,

Hans




> ---
>  drivers/input/touchscreen/novatek-nvt-ts.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/input/touchscreen/novatek-nvt-ts.c b/drivers/input/touchscreen/novatek-nvt-ts.c
> index 44b58e0dc1ad..b1c379d87de0 100644
> --- a/drivers/input/touchscreen/novatek-nvt-ts.c
> +++ b/drivers/input/touchscreen/novatek-nvt-ts.c
> @@ -323,9 +323,15 @@ static const struct nvt_ts_i2c_chip_data nvt_nt36672a_ts_data = {
>  	.chip_id = 0x08,
>  };
>  
> +static const struct nvt_ts_i2c_chip_data nvt_nt36672a_e7t_ts_data = {
> +	.wake_type = 0x02,
> +	.chip_id = 0x08,
> +};
> +
>  static const struct of_device_id nvt_ts_of_match[] = {
>  	{ .compatible = "novatek,nt11205-ts", .data = &nvt_nt11205_ts_data },
>  	{ .compatible = "novatek,nt36672a-ts", .data = &nvt_nt36672a_ts_data },
> +	{ .compatible = "novatek,nt36672a-e7t-ts", .data = &nvt_nt36672a_e7t_ts_data },
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(of, nvt_ts_of_match);
> @@ -333,6 +339,7 @@ MODULE_DEVICE_TABLE(of, nvt_ts_of_match);
>  static const struct i2c_device_id nvt_ts_i2c_id[] = {
>  	{ "nt11205-ts", (unsigned long) &nvt_nt11205_ts_data },
>  	{ "nt36672a-ts", (unsigned long) &nvt_nt36672a_ts_data },
> +	{ "nt36672a-e7t-ts", (unsigned long) &nvt_nt36672a_e7t_ts_data },
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(i2c, nvt_ts_i2c_id);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ