summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorBaek Kyu, Kim <pocj8ur4in@gmail.com>2026-10-20 00:47:18 +0900
committerGuenter Roeck <linux@roeck-us.net>2026-10-19 13:15:33 -0700
commit817ac527100c8e20684211eb919ffd6d875adc7a (patch)
tree5890b4abd67f01bad1002d445dfc7b1f2bb8c513 /tools/lib/python
parentfcf9aa9beb773bed9d2183bf34f822de12b2c91c (diff)
downloadlinux-817ac527100c8e20684211eb919ffd6d875adc7a.tar.gz
linux-817ac527100c8e20684211eb919ffd6d875adc7a.zip
hwmon: (sht3x) Return the consumed count for heater writes
heater_enable_store() returns the result of i2c_master_send(), which is the two-byte command length on success rather than the sysfs input count. This can report more bytes than were supplied, or a partial write for a fully processed input. For example, writing "on\n" returns two instead of three, so a caller retrying the remaining newline gets -EINVAL even though the heater command succeeded. Retrying the remainder of "off\n" can also send the heater-off command twice. Return count after a complete command transfer. Preserve negative I2C errors and return -EIO for nonnegative incomplete transfers, so a zero-message transfer is not reported as a successful zero-byte write. Keep the existing boolean parsing, command selection and locking. Fixes: 50c22cd154e5 ("hwmon: (sht3x) add humidity heater element control") Cc: stable@vger.kernel.org Signed-off-by: Baek Kyu, Kim <pocj8ur4in@gmail.com> Link: https://patch.msgid.link/20261019154718.2328055-1-pocj8ur4in@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions