summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorQingshuang Fu <fuqingshuang@kylinos.cn>2026-08-05 14:16:45 +0800
committerGuenter Roeck <linux@roeck-us.net>2026-08-06 22:37:44 -0700
commitfddb5ceaf901b050ed2a1a7deeecbf97e003435a (patch)
treee323b86f1913dfcbf1ee7b8bcf4be875d01f69b0 /tools/perf/scripts/python/task-analyzer.py
parent36c4d73ce05d1d8896c2669eb0730d35a02a2ec1 (diff)
hwmon: (ads7828) Fix external VREF regulator handling
The driver currently has two issues with the external VREF regulator handling in ads7828_probe(): 1. All errors from devm_regulator_get_optional() are ignored, causing the driver to incorrectly fall back to internal VREF even for transient errors like -EPROBE_DEFER or genuine failures like -ENOMEM. 2. The external regulator is never enabled. The driver calls regulator_get_voltage() without first calling regulator_enable(), so the VREF pin may remain unpowered if the regulator is not configured as always-on. Fix both issues by switching to devm_regulator_get_enable_read_voltage(), which handles regulator get, enable, and voltage read in one call. Only -ENODEV (no regulator specified in device tree) should trigger the fallback to internal VREF. All other errors are propagated to the caller. Fixes: a8ddfea09566 ("hwmon: (ads7828) Accept optional parameters from device tree") Signed-off-by: Qingshuang Fu <fuqingshuang@kylinos.cn> Link: https://lore.kernel.org/r/20260805061645.1331652-1-fffsqian@163.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions