Linux Documentation
 help / color / mirror / Atom feed
* [PATCH v4 0/7] iio: debugfs register access through regmap in the core
@ 2026-12-06 10:03 Rupesh Majhi
  2026-12-06 10:03 ` [PATCH v4 1/7] iio: core: move iio_get_debugfs_dentry() kernel-doc to the C file Rupesh Majhi
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Rupesh Majhi @ 2026-12-06 10:03 UTC (permalink / raw)
  To: Andy Shevchenko, Antoniu Miclaus, David Lechner, Eddie James,
	Jonathan Cameron, Jonathan Corbet, Lucas Stankus, Marcelo Schmitt,
	Michael Hennerich, Nuno Sá, Petre Rodan, Randy Dunlap,
	Shuah Khan
  Cc: linux, linux-doc, linux-iio, Rupesh Majhi, crofts

More than 25 IIO drivers implement .debugfs_reg_access() with only a
regmap_read() or regmap_write() on the regmap of the parent device.
Patch 2 adds a core helper for that, patches 3 to 6 use it in four
drivers and patch 7 adds register access to dps310 with it. The other
drivers can follow in batches. Callbacks that take a lock or claim
direct mode around the access are left alone.

Patch 1 moves the kernel-doc of iio_get_debugfs_dentry() to the C file,
as asked on v3.

Patch 7 is tested on a DPS310 on a BeagleBone Black. I don't have the
other parts, so adxl313, adxl372, bma220 and ina226 were run on
i2c-stub under QEMU: direct_reg_access gives the same results before
and after.

Based on iio testing, which has Andy's split of the debugfs code [1].

v4:
- new patch 1: kernel-doc of iio_get_debugfs_dentry() moves to
  industrialio-debugfs.c (Andy, Jonathan)
- 2: no change to that kernel-doc any more
- 2: regmap lookup split from the declaration (Andy)

v3: https://lore.kernel.org/linux-iio/20261204181105.150419-1-zoone.rupert@gmail.com/
- rename to iio_access_debugfs_regmap_reg() (Andy)
- 1: kernel-doc of iio_get_debugfs_dentry() moves inside the #if (Andy)
- Reviewed-by from Andy on 2 to 6

v2: https://lore.kernel.org/linux-iio/20261128184025.87548-1-zoone.rupert@gmail.com/
- 1: the helper moves to industrialio-debugfs.c and is NULL without
  CONFIG_DEBUG_FS (Andy)
- Reviewed-by from Nuno on all, Tested-by from Petre on 4

v1: https://lore.kernel.org/linux-iio/20261124065016.185124-1-zoone.rupert@gmail.com/

[1] https://lore.kernel.org/linux-iio/20261127113635.1691512-1-andriy.shevchenko@linux.intel.com/

Cc: crofts@kernel.org

Rupesh Majhi (7):
  iio: core: move iio_get_debugfs_dentry() kernel-doc to the C file
  iio: core: add iio_access_debugfs_regmap_reg()
  iio: accel: adxl313: use iio_access_debugfs_regmap_reg()
  iio: accel: adxl372: use iio_access_debugfs_regmap_reg()
  iio: accel: bma220: use iio_access_debugfs_regmap_reg()
  iio: adc: ina2xx-adc: use iio_access_debugfs_regmap_reg()
  iio: pressure: dps310: add debugfs register access

 Documentation/driver-api/iio/core.rst |  2 ++
 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-debugfs.c    | 34 +++++++++++++++++++++++++++
 drivers/iio/pressure/dps310.c         |  1 +
 include/linux/iio/iio.h               |  8 +++----
 8 files changed, 46 insertions(+), 53 deletions(-)


base-commit: 27bae9cc834c13108eb5f362da8f3fa5904a4955
-- 
2.43.0


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

end of thread, other threads:[~2026-12-06 10:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-06 10:03 [PATCH v4 0/7] iio: debugfs register access through regmap in the core Rupesh Majhi
2026-12-06 10:03 ` [PATCH v4 1/7] iio: core: move iio_get_debugfs_dentry() kernel-doc to the C file Rupesh Majhi
2026-12-06 10:03 ` [PATCH v4 2/7] iio: core: add iio_access_debugfs_regmap_reg() Rupesh Majhi
2026-12-06 10:03 ` [PATCH v4 3/7] iio: accel: adxl313: use iio_access_debugfs_regmap_reg() Rupesh Majhi
2026-12-06 10:03 ` [PATCH v4 4/7] iio: accel: adxl372: " Rupesh Majhi
2026-12-06 10:03 ` [PATCH v4 5/7] iio: accel: bma220: " Rupesh Majhi
2026-12-06 10:03 ` [PATCH v4 6/7] iio: adc: ina2xx-adc: " Rupesh Majhi
2026-12-06 10:03 ` [PATCH v4 7/7] iio: pressure: dps310: add debugfs register access Rupesh Majhi

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