iio: debugfs register access through regmap in the core
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | iio: core: add iio_debugfs_reg_access_regmap()drivers/ include/ | +30 | 0 replies | |
| 2/6 | iio: accel: adxl313: use iio_debugfs_reg_access_regmap()drivers/ | +1 | 0 replies | |
| 3/6 | iio: accel: adxl372: use iio_debugfs_reg_access_regmap()drivers/ | +1 | 0 replies | |
| 4/6 | iio: accel: bma220: use iio_debugfs_reg_access_regmap()drivers/ | +1 | 1 reply | |
| 5/6 | iio: adc: ina2xx-adc: use iio_debugfs_reg_access_regmap()drivers/ | +2 | 0 replies | |
| 6/6 | iio: pressure: dps310: add debugfs register accessdrivers/ | +1 | 0 replies |
Reviews trailers per patch
None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Petre Rodan | Nuno Sá |
|---|---|---|
| Series | R-b | |
| 1/6 | ||
| 2/6 | ||
| 3/6 | ||
| 4/6 | T-b | |
| 5/6 | ||
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/6] iio: debugfs register access through regmap in the core
More than 25 IIO drivers have a debugfs_reg_access callback that is only a regmap_read() or regmap_write() on the regmap of the parent device. Patch 1 adds a core helper for that, patches 2 to 5 use it in four drivers and patch 6 adds register access to dps310 with it. The other drivers can follow in batches if the helper is wanted.
The helper finds the regmap with dev_get_regmap() on the parent, so it only fits drivers with one regmap there. Existing callbacks that take a lock or claim direct mode around the access are left alone.
Patch 6 is tested on a DPS310 on a BeagleBone Black. I don't have the other parts. For those, adxl313, adxl372, bma220 and ina226 (ina219 uses the same callback) were instantiated on i2c-stub under QEMU:
reads, writes and refused registers through direct_reg_access give the same results before and after.
Based on iio testing.
Rupesh Majhi (6):
iio: core: add iio_debugfs_reg_access_regmap()
iio: accel: adxl313: use iio_debugfs_reg_access_regmap()
iio: accel: adxl372: use iio_debugfs_reg_access_regmap()
iio: accel: bma220: use iio_debugfs_reg_access_regmap()
iio: adc: ina2xx-adc: use iio_debugfs_reg_access_regmap()
iio: pressure: dps310: add debugfs register access
drivers/iio/accel/adxl313_core.c | 12 +----------- drivers/iio/accel/adxl372.c | 15 +-------------- drivers/iio/accel/bma220_core.c | 12 +----------- drivers/iio/adc/ina2xx-adc.c | 15 ++------------- drivers/iio/industrialio-core.c | 28 ++++++++++++++++++++++++++++ drivers/iio/pressure/dps310.c | 1 + include/linux/iio/iio.h | 2 ++ 7 files changed, 36 insertions(+), 49 deletions(-)
base-commit: f2cbef9101b9fc979a324bb1242b8b802a2484b6
Signature · 1 line
2.43.0