From: Rupesh Majhi <zoone.rupert@gmail.com>
To: "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>,
"Nuno Sá" <nuno.sa@analog.com>,
"Petre Rodan" <petre.rodan@subdimension.ro>
Cc: linux@analog.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org,
Rupesh Majhi <zoone.rupert@gmail.com>
Subject: [PATCH 5/6] iio: adc: ina2xx-adc: use iio_debugfs_reg_access_regmap()
Date: Tue, 24 Nov 2026 08:50:15 +0200 [thread overview]
Message-ID: <20261124065016.185124-6-zoone.rupert@gmail.com> (raw)
In-Reply-To: <20261124065016.185124-1-zoone.rupert@gmail.com>
The debugfs callback only reads or writes the regmap of the parent
device, which is what the core helper does.
Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
---
drivers/iio/adc/ina2xx-adc.c | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c
index c412f5ed46a1..587e82c33454 100644
--- a/drivers/iio/adc/ina2xx-adc.c
+++ b/drivers/iio/adc/ina2xx-adc.c
@@ -895,17 +895,6 @@ static const struct iio_buffer_setup_ops ina2xx_setup_ops = {
.predisable = &ina2xx_buffer_disable,
};
-static int ina2xx_debug_reg(struct iio_dev *indio_dev,
- unsigned reg, unsigned writeval, unsigned *readval)
-{
- struct ina2xx_chip_info *chip = iio_priv(indio_dev);
-
- if (!readval)
- return regmap_write(chip->regmap, reg, writeval);
-
- return regmap_read(chip->regmap, reg, readval);
-}
-
/* Possible integration times for vshunt and vbus */
static IIO_CONST_ATTR_NAMED(ina219_integration_time_available,
integration_time_available,
@@ -950,14 +939,14 @@ static const struct iio_info ina219_info = {
.read_raw = ina2xx_read_raw,
.read_avail = ina2xx_read_avail,
.write_raw = ina2xx_write_raw,
- .debugfs_reg_access = ina2xx_debug_reg,
+ .debugfs_reg_access = iio_debugfs_reg_access_regmap,
};
static const struct iio_info ina226_info = {
.attrs = &ina226_attribute_group,
.read_raw = ina2xx_read_raw,
.write_raw = ina2xx_write_raw,
- .debugfs_reg_access = ina2xx_debug_reg,
+ .debugfs_reg_access = iio_debugfs_reg_access_regmap,
};
/* Initialize the configuration and calibration registers. */
--
2.43.0
next prev parent reply other threads:[~2026-11-24 6:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 6:50 [PATCH 0/6] iio: debugfs register access through regmap in the core 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 ` Rupesh Majhi [this message]
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á
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=20261124065016.185124-6-zoone.rupert@gmail.com \
--to=zoone.rupert@gmail.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=nuno.sa@analog.com \
--cc=petre.rodan@subdimension.ro \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.