Linux IIO development
 help / color / mirror / Atom feed
* [PATCH 0/4] iio: Use scan_type shift and realbits when processing raw data
@ 2021-11-01  7:18 Gwendal Grignou
  2021-11-01  7:18 ` [PATCH 1/4] " Gwendal Grignou
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Gwendal Grignou @ 2021-11-01  7:18 UTC (permalink / raw)
  To: jic23, lars; +Cc: andy.shevchenko, linux-iio, Gwendal Grignou

Using scan_type has source of truth, use shift and realbits instead of
constants when processing reading sensor registers to produce raw sysfs
entries.
The same shit and realbits are already used by the libiio user-space
library to present channel information from device buffer.

Fix only a handful of drivers, where channel scan_type was accessible
in the function handling the raw data request.

In mpl3115, use a 16 bit big endian buffer when reading temperature
channel to improve readability.

Gwendal Grignou (4):
  iio: Use scan_type shift and realbits when processing raw data
  iio: ti-ads1015: Remove shift variable ads1015_read_raw
  iio: xilinx-xadc-core: Use local variable in xadc_read_raw
  iio: mpl3115: Use scan_type.shift and realbit in mpl3115_read_raw

 drivers/iio/accel/bma220_spi.c     |  3 ++-
 drivers/iio/accel/kxcjk-1013.c     |  3 ++-
 drivers/iio/accel/mma7455_core.c   |  3 ++-
 drivers/iio/accel/sca3000.c        |  5 +++--
 drivers/iio/accel/stk8312.c        |  2 +-
 drivers/iio/accel/stk8ba50.c       |  3 ++-
 drivers/iio/adc/ad7266.c           |  3 ++-
 drivers/iio/adc/at91-sama5d2_adc.c |  3 ++-
 drivers/iio/adc/ti-adc12138.c      |  3 ++-
 drivers/iio/adc/ti-ads1015.c       |  8 +++-----
 drivers/iio/adc/xilinx-xadc-core.c |  2 +-
 drivers/iio/magnetometer/mag3110.c |  6 ++++--
 drivers/iio/pressure/mpl3115.c     | 16 +++++++++++-----
 13 files changed, 37 insertions(+), 23 deletions(-)

-- 
2.33.1.1089.g2158813163f-goog


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-11-04  8:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-01  7:18 [PATCH 0/4] iio: Use scan_type shift and realbits when processing raw data Gwendal Grignou
2021-11-01  7:18 ` [PATCH 1/4] " Gwendal Grignou
2021-11-03 18:42   ` Jonathan Cameron
2021-11-04  8:24     ` Gwendal Grignou
2021-11-04  8:49       ` Eugen.Hristev
2021-11-01  7:18 ` [PATCH 2/4] iio: ti-ads1015: Remove shift variable ads1015_read_raw Gwendal Grignou
2021-11-03 18:53   ` Jonathan Cameron
2021-11-01  7:18 ` [PATCH 3/4] iio: xilinx-xadc-core: Use local variable in xadc_read_raw Gwendal Grignou
2021-11-03 18:55   ` Jonathan Cameron
2021-11-01  7:18 ` [PATCH 4/4] iio: mpl3115: Use scan_type.shift and realbit in mpl3115_read_raw Gwendal Grignou
2021-11-03 18:58   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox