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: <c4f9e253-ae23-4ba2-b70c-1dd3c37dde0a@roeck-us.net>
Date: Tue, 13 Jan 2026 07:06:14 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Mayank Mahajan <mayankmahajan.x@....com>, linux-hwmon@...r.kernel.org,
 linux-kernel@...r.kernel.org
Cc: priyanka.jain@....com, vikash.bansal@....com
Subject: Re: [PATCH 1/3] hwmon: (tmp108) Add support for P3T1035 and P3T2030

On 1/13/26 00:52, Mayank Mahajan wrote:
> Add support for the P3T1035 & P3T2030 temperature sensor. While mostly
> compatible with the TMP108, P3T1035 uses an 8-bit configuration register
> instead of the 16-bit layout used by TMP108. Updated driver to handle
> this difference during configuration read/write.
> 

This is way too complex. Use a single regmap configuration, implement the chip
accesses in the driver, and map the 8-bit configuration register to a 16 bit
value in the access functions. See the lm75 driver for an example; it does
exactly the same.

The remaining differences are

- Conversion rate. Use tables, like the lm75 driver.

- The new chips don't support hysteresis. Handle in is_visible function;
   that is what it is for.

- Configuration
   - Alert polarity. Not supported by the driver, so don't care.
   - Configuration bit 2 (LC = Latch Control vs. TM = Thermostat Mode).
     The functionality is the same (if set, alerts remain active until
     a register is read) and should be set.
   - Hysteresis. The value doesn't really matter for the P3T1035 since
     it is in the upper byte of the configuration register which will be
     ignored by the chip when written through the regmap access function.

Thanks,
Guenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ