]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwmon: (ad7314) Validate leading zero bits and return error
authorErik Schumacher <erik.schumacher@iris-sensing.com>
Mon, 24 Feb 2025 09:19:04 +0000 (09:19 +0000)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 2 Mar 2025 16:42:01 +0000 (08:42 -0800)
commite278d5e8aef4c0a1d9a9fa8b8910d713a89aa800
treee313f9e81f2e0f031e5d0fed75ee555bbf13622c
parent1c7932d5ae0f5c22fa52ac811b4c427bbca5aff5
hwmon: (ad7314) Validate leading zero bits and return error

Leading zero bits are sent on the bus before the temperature value is
transmitted. If any of these bits are high, the connection might be
unstable or there could be no AD7314 / ADT730x (or compatible) at all.
Return -EIO in that case.

Signed-off-by: Erik Schumacher <erik.schumacher@iris-sensing.com>
Fixes: 4f3a659581cab ("hwmon: AD7314 driver (ported from IIO)")
Link: https://lore.kernel.org/r/24a50c2981a318580aca8f50d23be7987b69ea00.camel@iris-sensing.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ad7314.c