diff options
| author | Baek Kyu, Kim <pocj8ur4in@gmail.com> | 2026-10-25 23:13:51 +0900 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-11-02 00:39:44 +0000 |
| commit | 098a4c37dc8815ea941866179220394e4d182c67 (patch) | |
| tree | ee32f5daff0144ac91338b2a0f38d77a0d875482 /tools/perf/scripts/python | |
| parent | d252425c1533bfacd5940faa3371af82196bff5b (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
