* [PATCH 0/2] iio: accel: adis16203: cleanup and standardization
@ 2025-03-05 15:29 Siddharth Menon
2025-03-05 15:29 ` [PATCH 1/2] iio: accel: adis16203: Use units.h macros for measurements Siddharth Menon
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Siddharth Menon @ 2025-03-05 15:29 UTC (permalink / raw)
To: linux-iio, marcelo.schmitt1, gregkh, jic23, lars,
Michael.Hennerich
Cc: linux-kernel, linux-staging, lars, Siddharth Menon
This series improves the adis16203 driver by using standard unit macros
and removing an unused spi_set_drvdata() call.
Siddharth Menon (2):
iio: accel: adis16203: Use units.h macros for voltage values
iio: accel: adis16203: Remove spi_set_drvdata()
drivers/staging/iio/accel/adis16203.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--
2.48.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] iio: accel: adis16203: Use units.h macros for measurements
2025-03-05 15:29 [PATCH 0/2] iio: accel: adis16203: cleanup and standardization Siddharth Menon
@ 2025-03-05 15:29 ` Siddharth Menon
2025-03-05 15:29 ` [PATCH 2/2] iio: accel: adis16203: remove spi_set_drvdata() Siddharth Menon
2025-03-08 14:43 ` [PATCH 0/2] iio: accel: adis16203: cleanup and standardization Jonathan Cameron
2 siblings, 0 replies; 7+ messages in thread
From: Siddharth Menon @ 2025-03-05 15:29 UTC (permalink / raw)
To: linux-iio, marcelo.schmitt1, lars, Michael.Hennerich, jic23,
gregkh
Cc: linux-kernel, linux-staging, lars, Siddharth Menon
Replace hardcoded microvolt and degree values with MILLI macros from
linux/units.h. Also fixed typo in comment (1.22mV->0.22mV).
Suggested-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Signed-off-by: Siddharth Menon <simeddon@gmail.com>
---
drivers/staging/iio/accel/adis16203.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/iio/accel/adis16203.c b/drivers/staging/iio/accel/adis16203.c
index c1c73308800c..ac4b28bcd766 100644
--- a/drivers/staging/iio/accel/adis16203.c
+++ b/drivers/staging/iio/accel/adis16203.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/spi/spi.h>
+#include <linux/units.h>
#define ADIS16203_STARTUP_DELAY 220 /* ms */
@@ -173,10 +174,10 @@ static int adis16203_read_raw(struct iio_dev *indio_dev,
case IIO_VOLTAGE:
if (chan->channel == 0) {
*val = 1;
- *val2 = 220000; /* 1.22 mV */
+ *val2 = 220 * MILLI; /* 0.22 mV */
} else {
*val = 0;
- *val2 = 610000; /* 0.61 mV */
+ *val2 = 610 * MILLI; /* 0.61 mV */
}
return IIO_VAL_INT_PLUS_MICRO;
case IIO_TEMP:
@@ -185,7 +186,7 @@ static int adis16203_read_raw(struct iio_dev *indio_dev,
return IIO_VAL_INT_PLUS_MICRO;
case IIO_INCLI:
*val = 0;
- *val2 = 25000; /* 0.025 degree */
+ *val2 = 25 * MILLI; /* 0.025 degree */
return IIO_VAL_INT_PLUS_MICRO;
default:
return -EINVAL;
--
2.48.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] iio: accel: adis16203: remove spi_set_drvdata()
2025-03-05 15:29 [PATCH 0/2] iio: accel: adis16203: cleanup and standardization Siddharth Menon
2025-03-05 15:29 ` [PATCH 1/2] iio: accel: adis16203: Use units.h macros for measurements Siddharth Menon
@ 2025-03-05 15:29 ` Siddharth Menon
2025-03-08 14:43 ` [PATCH 0/2] iio: accel: adis16203: cleanup and standardization Jonathan Cameron
2 siblings, 0 replies; 7+ messages in thread
From: Siddharth Menon @ 2025-03-05 15:29 UTC (permalink / raw)
To: linux-iio, marcelo.schmitt1, lars, Michael.Hennerich, jic23,
gregkh
Cc: linux-kernel, linux-staging, lars, Siddharth Menon
The driver does not use spi_get_drvdata() anywhere.
Suggested-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Signed-off-by: Siddharth Menon <simeddon@gmail.com>
---
drivers/staging/iio/accel/adis16203.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/iio/accel/adis16203.c b/drivers/staging/iio/accel/adis16203.c
index ac4b28bcd766..ec21365bb391 100644
--- a/drivers/staging/iio/accel/adis16203.c
+++ b/drivers/staging/iio/accel/adis16203.c
@@ -268,8 +268,6 @@ static int adis16203_probe(struct spi_device *spi)
if (!indio_dev)
return -ENOMEM;
st = iio_priv(indio_dev);
- /* this is only used for removal purposes */
- spi_set_drvdata(spi, indio_dev);
indio_dev->name = spi->dev.driver->name;
indio_dev->channels = adis16203_channels;
--
2.48.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] iio: accel: adis16203: cleanup and standardization
2025-03-05 15:29 [PATCH 0/2] iio: accel: adis16203: cleanup and standardization Siddharth Menon
2025-03-05 15:29 ` [PATCH 1/2] iio: accel: adis16203: Use units.h macros for measurements Siddharth Menon
2025-03-05 15:29 ` [PATCH 2/2] iio: accel: adis16203: remove spi_set_drvdata() Siddharth Menon
@ 2025-03-08 14:43 ` Jonathan Cameron
2025-03-08 14:49 ` Jonathan Cameron
2 siblings, 1 reply; 7+ messages in thread
From: Jonathan Cameron @ 2025-03-08 14:43 UTC (permalink / raw)
To: Siddharth Menon
Cc: linux-iio, marcelo.schmitt1, gregkh, lars, Michael.Hennerich,
linux-kernel, linux-staging, lars
On Wed, 5 Mar 2025 20:59:10 +0530
Siddharth Menon <simeddon@gmail.com> wrote:
> This series improves the adis16203 driver by using standard unit macros
> and removing an unused spi_set_drvdata() call.
>
> Siddharth Menon (2):
> iio: accel: adis16203: Use units.h macros for voltage values
> iio: accel: adis16203: Remove spi_set_drvdata()
>
> drivers/staging/iio/accel/adis16203.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
I'm not going to apply these because I think you correct
identified that the device support should just be added
to the adis16201 driver and this one dropped.
Good thing you were more awake on this than me ;)
Jonathan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] iio: accel: adis16203: cleanup and standardization
2025-03-08 14:43 ` [PATCH 0/2] iio: accel: adis16203: cleanup and standardization Jonathan Cameron
@ 2025-03-08 14:49 ` Jonathan Cameron
2025-03-09 5:48 ` Siddharth Menon
0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Cameron @ 2025-03-08 14:49 UTC (permalink / raw)
To: Siddharth Menon
Cc: linux-iio, marcelo.schmitt1, gregkh, lars, Michael.Hennerich,
linux-kernel, linux-staging, lars
On Sat, 8 Mar 2025 14:43:57 +0000
Jonathan Cameron <jic23@kernel.org> wrote:
> On Wed, 5 Mar 2025 20:59:10 +0530
> Siddharth Menon <simeddon@gmail.com> wrote:
>
> > This series improves the adis16203 driver by using standard unit macros
> > and removing an unused spi_set_drvdata() call.
> >
> > Siddharth Menon (2):
> > iio: accel: adis16203: Use units.h macros for voltage values
> > iio: accel: adis16203: Remove spi_set_drvdata()
> >
> > drivers/staging/iio/accel/adis16203.c | 9 ++++-----
> > 1 file changed, 4 insertions(+), 5 deletions(-)
> >
>
> I'm not going to apply these because I think you correct
> identified that the device support should just be added
> to the adis16201 driver and this one dropped.
> Good thing you were more awake on this than me ;)
>
Sorry - wrong person.
https://lore.kernel.org/all/20250306002645.1555569-1-danascape@gmail.com/
I'm definitely not awake today.
Jonathan
> Jonathan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] iio: accel: adis16203: cleanup and standardization
2025-03-08 14:49 ` Jonathan Cameron
@ 2025-03-09 5:48 ` Siddharth Menon
2025-03-09 16:27 ` Jonathan Cameron
0 siblings, 1 reply; 7+ messages in thread
From: Siddharth Menon @ 2025-03-09 5:48 UTC (permalink / raw)
To: Jonathan Cameron
Cc: linux-iio, marcelo.schmitt1, gregkh, lars, Michael.Hennerich,
linux-kernel, linux-staging
On Sat, 8 Mar 2025 at 20:19, Jonathan Cameron <jic23@kernel.org> wrote:
>
> > I'm not going to apply these because I think you correct
> > identified that the device support should just be added
> > to the adis16201 driver and this one dropped.
> > Good thing you were more awake on this than me ;)
> >
> Sorry - wrong person.
Well, I’ll assume these won't be getting applied.
Siddharth Menon
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] iio: accel: adis16203: cleanup and standardization
2025-03-09 5:48 ` Siddharth Menon
@ 2025-03-09 16:27 ` Jonathan Cameron
0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2025-03-09 16:27 UTC (permalink / raw)
To: Siddharth Menon
Cc: linux-iio, marcelo.schmitt1, gregkh, lars, Michael.Hennerich,
linux-kernel, linux-staging
On Sun, 9 Mar 2025 11:18:18 +0530
Siddharth Menon <simeddon@gmail.com> wrote:
> On Sat, 8 Mar 2025 at 20:19, Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > > I'm not going to apply these because I think you correct
> > > identified that the device support should just be added
> > > to the adis16201 driver and this one dropped.
> > > Good thing you were more awake on this than me ;)
> > >
> > Sorry - wrong person.
>
> Well, I’ll assume these won't be getting applied.
Yes, sorry you wasted your time on this!
Jonathan
>
> Siddharth Menon
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-03-09 16:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-05 15:29 [PATCH 0/2] iio: accel: adis16203: cleanup and standardization Siddharth Menon
2025-03-05 15:29 ` [PATCH 1/2] iio: accel: adis16203: Use units.h macros for measurements Siddharth Menon
2025-03-05 15:29 ` [PATCH 2/2] iio: accel: adis16203: remove spi_set_drvdata() Siddharth Menon
2025-03-08 14:43 ` [PATCH 0/2] iio: accel: adis16203: cleanup and standardization Jonathan Cameron
2025-03-08 14:49 ` Jonathan Cameron
2025-03-09 5:48 ` Siddharth Menon
2025-03-09 16:27 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox