diff options
| author | Gwendal Grignou <[email protected]> | 2021-03-31 11:22:22 -0700 |
|---|---|---|
| committer | Jonathan Cameron <[email protected]> | 2021-04-07 08:36:40 +0100 |
| commit | fc948409ccc1e8afe8655cee77c686eedbfbee60 (patch) | |
| tree | 9e6b25f7719314bfa4eb82e1662e8acd66b832f5 /tools/perf/scripts/python/bin/flamegraph-record | |
| parent | 6f0078ae704d94b1a93e5f3d0a44cf3d8090fa91 (diff) | |
iio: sx9310: Fix write_.._debounce()
Check input to be sure it matches Semtech sx9310 specification and
can fit into debounce register.
Compare argument writen to thresh_.._period with read from same
sysfs attribute:
Before: Afer:
write | read write | read
-1 | 8 -1 fails: -EINVAL
0 | 8 0 | 0
1 | 0 1 | 0
2..15 | 2^log2(N) 2..15 | 2^log2(N)
16 | 0 >= 16 fails: -EINVAL
Fixes: 1b6872015f0b ("iio: sx9310: Support setting debounce values")
Signed-off-by: Gwendal Grignou <[email protected]>
Cc: [email protected]
Reviewed-by: Stephen Boyd <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/flamegraph-record')
0 files changed, 0 insertions, 0 deletions