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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <MW4PR03MB66518CD2DE0AAD98B1A9366FA35EA@MW4PR03MB6651.namprd03.prod.outlook.com>
Date: Thu, 24 Jul 2025 03:38:24 +0000
From: Marge Yang <Marge.Yang@...synaptics.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>, Marge Yang
	<Marge.Yang@...synaptics.com>
CC: "linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, David Chiu
	<David.Chiu@...synaptics.com>, Derek Cheng <derek.cheng@...synaptics.com>,
	Sam Tsai <Sam.Tsai@...aptics.com>, Vincent Huang
	<Vincent.huang@...synaptics.com>
Subject: RE: [PATCH V2] Input: synaptics-rmi4- Add a new feature for Forcepad.

Hi Dmitry,
	Update the status.

Thanks
Marge Yang

-----Original Message-----
From: Dmitry Torokhov <dmitry.torokhov@...il.com> 
Sent: Thursday, July 24, 2025 12:30 AM
To: Marge Yang <Marge.Yang@...synaptics.com>
Cc: linux-input@...r.kernel.org; linux-kernel@...r.kernel.org; David Chiu <David.Chiu@...synaptics.com>; Derek Cheng <derek.cheng@...synaptics.com>; Sam Tsai <Sam.Tsai@...aptics.com>; Vincent Huang <Vincent.huang@...synaptics.com>
Subject: Re: [PATCH V2] Input: synaptics-rmi4- Add a new feature for Forcepad.

CAUTION: Email originated externally, do not click links or open attachments unless you recognize the sender and know the content is safe.


Hi Marge,

On Wed, Jul 16, 2025 at 03:36:48AM +0000, Marge Yang wrote:
> +     f21->sensor_count = fn->fd.query_base_addr & (BIT(0) | BIT(1) | 
> + BIT(2) | BIT(3));

We could either use GENMASK or just 0x0f. BIT() is for individual bits.

[Marge 0724]
Thank you for the reminder. We will use this design going forward.
> +
> +     if (fn->fd.query_base_addr & BIT(5)) {
> +             if (fn->fd.query_base_addr & BIT(6))
> +                     f21->query15_offset = 2;
> +             else
> +                     f21->query15_offset = 1;
> +
> +             rmi_read_block(fn->rmi_dev, fn->fd.query_base_addr + f21->query15_offset,
> +                                     f21->data_regs, 1);
> +             f21->max_number_Of_finger = f21->data_regs[0] & 0x0F;
> +     } else {
> +             dev_info(&fn->dev, "f21_query15 doesn't support.\n");
> +             f21->query15_offset = 0;
> +             f21->max_number_Of_finger = 5;
> +     }
> +
> +     if (fn->fd.query_base_addr & BIT(6)) {

Just double-checking - should it be BIT(5) give that reading of number of fingers is gated by BIT(5) in the block above.

[Marge 0724] 
Using BIT (6) is more appropriate.
BIT6: Indicates whether the force-calibration version is supported.
The old firmware does not support this feature.
The new firmware can use this BIT to determine whether it's the new or old version.

BIT5: Indicates whether reading the maximum number of finger-pressure levels is supported.

> +             dev_info(&fn->dev, "Support new F21 feature.\n");
> +             /*Each finger uses one byte, and the button state uses one byte.*/
> +             f21->attn_data_size = f21->max_number_Of_finger + 1;
> +             f21->attn_data_index_for_button = f21->attn_data_size - 1;
> +             /*
> +              * Each sensor uses two bytes, the button state uses one byte,
> +              * and each finger uses two bytes.
> +              */
> +             f21->data_reg_size = f21->sensor_count * 2 + 1 +
> +                                                             f21->max_number_Of_finger * 2;
> +             f21->data_reg_index_for_button = f21->sensor_count * 2;
> +     } else {
> +             dev_info(&fn->dev, "Support old F21 feature.\n");
> +             /*Each finger uses two bytes, and the button state uses one byte.*/
> +             f21->attn_data_size = f21->sensor_count * 2 + 1;
> +             f21->attn_data_index_for_button = f21->attn_data_size - 1;
> +             /*Each finger uses two bytes, and the button state uses one byte.*/
> +             f21->data_reg_size = f21->sensor_count * 2 + 1;
> +             f21->data_reg_index_for_button = f21->data_reg_size - 1;

The block is duplicated?

[Marge 0724]
Comparing the new and old firmware versions:
Based on BIT6, we can distinguish between the new and old firmware versions.
The definition of the attention data size differs.
The size of the F21 data block and the definition of its button index also differ.
Therefore, by definition, this block is not duplicated.

No need to resubmit the patch, please just provide the answer to the above questions.

Thanks.

--
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ