Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] iio: pressure: hp03: Drop explicit hp03_is_writeable_reg and hp03_is_volatile_reg functions
@ 2025-04-29 16:56 Sebastian Aguilera Novoa
  2025-04-29 17:41 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Aguilera Novoa @ 2025-04-29 16:56 UTC (permalink / raw)
  To: jic23; +Cc: saguileran, linux-iio

Drop functions hp03_is_writeable_reg and hp03_is_volatile_reg. Both
functions always return false, regardless of the register number or
device. They are used in a single place within the hp03_regmap_config
and can be replaced directly.

The HP03 Series of calibrated sensor module datasheet (1) document
does not contain any information about the register values to define
states for the functions.

(1): https://www.sensorica.ru/pdf/HP03.pdf

Signed-off-by: Sebastian Aguilera Novoa <saguileran@ime.usp.br>
---
 drivers/iio/pressure/hp03.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/iio/pressure/hp03.c b/drivers/iio/pressure/hp03.c
index 6f7a16787143..a69f6f5ce248 100644
--- a/drivers/iio/pressure/hp03.c
+++ b/drivers/iio/pressure/hp03.c
@@ -57,16 +57,6 @@ static const struct iio_chan_spec hp03_channels[] = {
 	},
 };
 
-static bool hp03_is_writeable_reg(struct device *dev, unsigned int reg)
-{
-	return false;
-}
-
-static bool hp03_is_volatile_reg(struct device *dev, unsigned int reg)
-{
-	return false;
-}
-
 static const struct regmap_config hp03_regmap_config = {
 	.reg_bits	= 8,
 	.val_bits	= 8,
@@ -74,8 +64,8 @@ static const struct regmap_config hp03_regmap_config = {
 	.max_register	= HP03_EEPROM_CD_OFFSET + 1,
 	.cache_type	= REGCACHE_RBTREE,
 
-	.writeable_reg	= hp03_is_writeable_reg,
-	.volatile_reg	= hp03_is_volatile_reg,
+	.writeable_reg	= false,
+	.volatile_reg	= false,
 };
 
 static int hp03_get_temp_pressure(struct hp03_priv *priv, const u8 reg)
-- 
2.43.0


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

end of thread, other threads:[~2025-04-29 17:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-29 16:56 [PATCH] iio: pressure: hp03: Drop explicit hp03_is_writeable_reg and hp03_is_volatile_reg functions Sebastian Aguilera Novoa
2025-04-29 17:41 ` Jonathan Cameron

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