summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorBaek Kyu, Kim <pocj8ur4in@gmail.com>2026-10-25 23:13:51 +0900
committerJonathan Cameron <jonathan.cameron@oss.qualcomm.com>2026-11-02 00:39:44 +0000
commit098a4c37dc8815ea941866179220394e4d182c67 (patch)
treeee32f5daff0144ac91338b2a0f38d77a0d875482 /tools/perf/scripts/python
parentd252425c1533bfacd5940faa3371af82196bff5b (diff)
iio: dac: mcp4725: Update the cached DAC value only on success
mcp4725_write_raw() updates dac_value even if mcp4725_set_value() rejects the requested value or reports an I2C transfer error. After writing 1000, a rejected write of 4096 returns -EINVAL without an I2C transfer, but out_voltage0_raw reports 4096. A later powerdown exit sends 00 00 instead of the 03 e8 frame for the last successful value. The EEPROM store path uses the same cache. Return the setter error before updating dac_value. This keeps the last successful software value for readback, powerdown exit and EEPROM writes. Fixes: cf35ad61aca2 ("iio: add mcp4725 I2C DAC driver") Signed-off-by: Baek Kyu, Kim <pocj8ur4in@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions