diff options
| author | Ridham Khurana <khurana.ridham222@gmail.com> | 2026-09-22 21:16:58 +0000 |
|---|---|---|
| committer | Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> | 2026-09-23 10:17:59 +0200 |
| commit | 209fcf625880cd1128bc98ca835d4cb5c3b8e136 (patch) | |
| tree | 4f79c49e38fd476242f47538240467108c3870f3 /tools/perf/scripts/python/flamegraph.py | |
| parent | b399579a8e7b2a442f456df86cafc33628da420d (diff) | |
| download | linux-next-209fcf625880cd1128bc98ca835d4cb5c3b8e136.tar.gz linux-next-209fcf625880cd1128bc98ca835d4cb5c3b8e136.zip | |
gpio: siox: normalize return value of gpio_get()
gpio_siox_get() returns the masked bit from the cached input or output
byte, so for most lines a high level reads back as a value between 2
and 128 instead of 1. The GPIO get callback is expected to return 0 or
1 (or a negative error code).
Since commit 86ef402d805d ("gpiolib: sanitize the return value of
gpio_chip::get()"), gpiolib rejected such values with -EBADE and reads
of a high line failed. Commit ec2cceadfae7 ("gpiolib: normalize the
return value of gc->get() on behalf of buggy drivers") made gpiolib
clamp the value instead, but it now warns on every such read.
Normalize the value returned by gpio_siox_get() to the [0, 1] range.
Signed-off-by: Ridham Khurana <khurana.ridham222@gmail.com>
Link: https://patch.msgid.link/20260922211702.1480614-1-khurana.ridham222@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
