mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nuno Sá" <nuno.sa@analog.com>
To: Rupesh Majhi <zoone.rupert@gmail.com>
Cc: Andy Shevchenko <andy@kernel.org>,
	Antoniu Miclaus <antoniu.miclaus@analog.com>,
	David Lechner <dlechner@baylibre.com>,
	Eddie James <eajames@linux.ibm.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Lucas Stankus <lucas.p.stankus@gmail.com>,
	Marcelo Schmitt <marcelo.schmitt@analog.com>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Petre Rodan <petre.rodan@subdimension.ro>,
	linux@analog.com, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/6] iio: debugfs register access through regmap in the core
Date: Tue, 24 Nov 2026 11:28:55 +0000	[thread overview]
Message-ID: <awV0zollH6Tuj0Et@nsa> (raw)
In-Reply-To: <20261124065016.185124-1-zoone.rupert@gmail.com>

On Tue, Nov 24, 2026 at 08:50:10AM +0200, Rupesh Majhi wrote:
> 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.

LGTM! With Andy spilt:

Reviewed-by: Nuno Sá <nuno.sa@analog.com>

> 
> 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
> -- 
> 2.43.0
> 

      parent reply	other threads:[~2026-11-24 11:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  6:50 Rupesh Majhi
2026-11-24  6:50 ` [PATCH 1/6] iio: core: add iio_debugfs_reg_access_regmap() Rupesh Majhi
2026-11-24  6:50 ` [PATCH 2/6] iio: accel: adxl313: use iio_debugfs_reg_access_regmap() Rupesh Majhi
2026-11-24  6:50 ` [PATCH 3/6] iio: accel: adxl372: " Rupesh Majhi
2026-11-24  6:50 ` [PATCH 4/6] iio: accel: bma220: " Rupesh Majhi
2026-11-24  7:42   ` Petre Rodan
2026-11-24  6:50 ` [PATCH 5/6] iio: adc: ina2xx-adc: " Rupesh Majhi
2026-11-24  6:50 ` [PATCH 6/6] iio: pressure: dps310: add debugfs register access Rupesh Majhi
2026-11-24  8:50 ` [PATCH 0/6] iio: debugfs register access through regmap in the core Andy Shevchenko
2026-11-24  9:45   ` Andy Shevchenko
2026-11-24 11:28 ` Nuno Sá [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=awV0zollH6Tuj0Et@nsa \
    --to=nuno.sa@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=antoniu.miclaus@analog.com \
    --cc=dlechner@baylibre.com \
    --cc=eajames@linux.ibm.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@analog.com \
    --cc=lucas.p.stankus@gmail.com \
    --cc=marcelo.schmitt@analog.com \
    --cc=petre.rodan@subdimension.ro \
    --cc=zoone.rupert@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®