diff options
| author | Thomas Haemmerle <[email protected]> | 2024-04-15 12:50:30 +0200 |
|---|---|---|
| committer | Jonathan Cameron <[email protected]> | 2024-04-20 14:53:02 +0100 |
| commit | 5826711e841450755cae32bacc59f6465075db94 (patch) | |
| tree | 82c95d96bbff622977acb4f2c3a94802c2abff4e /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | c046bb5d9512e3c00b0e17c581f50bbb6c641d58 (diff) | |
iio: pressure: dps310: simplify scale factor reading
Both functions `dps310_get_pres_precision` and
`dps310_get_temp_precision` provide the oversampling rate by calling the
`BIT()` macro. However, to look up the corresponding scale factor, we
need the register value itself. Currently, this is achieved by undoing
the calculation of the oversampling rate with `ilog2()`.
Simplify the two functions for getting the scale factor and directly
use the register content for the lookup.
Signed-off-by: Thomas Haemmerle <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions