linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] iio: adis updates
@ 2015-08-05 13:38 Lars-Peter Clausen
  2015-08-05 13:38 ` [PATCH 1/9] iio: adis16400: Fix adis16448 gyroscope scale Lars-Peter Clausen
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Lars-Peter Clausen @ 2015-08-05 13:38 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald, linux-iio, Lars-Peter Clausen

Hi,

This series contains various updates to a couple of the drivers for devices
from the Analog Devices ADIS16xxx family.

The first few patches have fixes for incorrect scale factors.

The other patches add support for devices which are mostly register map
compatible to existing supported devices.

- Lars

Lars-Peter Clausen (9):
  iio: adis16400: Fix adis16448 gyroscope scale
  iio: Add inverse unit conversion macros
  iio: adis16480: Fix scale factors
  iio: adis16400: adis16300 has product ID and serial number
  iio: adis16400: Add ADIS16305 support
  iio: adis16260: Add ADIS16266 support
  iio: adis16400: Add ADIS16367 support
  iio: adis16400: Add ADIS16445 support
  iio: adis16136: Add ADIS16137 support

 drivers/iio/gyro/adis16136.c     |   6 ++
 drivers/iio/gyro/adis16260.c     | 137 ++++++++++++++++++++++++++++-----------
 drivers/iio/imu/adis16400_core.c |  46 ++++++++++++-
 drivers/iio/imu/adis16480.c      |  39 +++++++++--
 include/linux/iio/iio.h          |  17 +++++
 5 files changed, 198 insertions(+), 47 deletions(-)

-- 
2.1.4


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

* [PATCH 1/9] iio: adis16400: Fix adis16448 gyroscope scale
  2015-08-05 13:38 [PATCH 0/9] iio: adis updates Lars-Peter Clausen
@ 2015-08-05 13:38 ` Lars-Peter Clausen
  2015-08-08 11:48   ` Jonathan Cameron
  2015-08-05 13:38 ` [PATCH 2/9] iio: Add inverse unit conversion macros Lars-Peter Clausen
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Lars-Peter Clausen @ 2015-08-05 13:38 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald, linux-iio, Lars-Peter Clausen

Use the correct scale for the adis16448 gyroscope output.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/imu/adis16400_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index 2fd68f22..d42e4fe 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -780,7 +780,7 @@ static struct adis16400_chip_info adis16400_chips[] = {
 		.flags = ADIS16400_HAS_PROD_ID |
 				ADIS16400_HAS_SERIAL_NUMBER |
 				ADIS16400_BURST_DIAG_STAT,
-		.gyro_scale_micro = IIO_DEGREE_TO_RAD(10000), /* 0.01 deg/s */
+		.gyro_scale_micro = IIO_DEGREE_TO_RAD(40000), /* 0.04 deg/s */
 		.accel_scale_micro = IIO_G_TO_M_S_2(833), /* 1/1200 g */
 		.temp_scale_nano = 73860000, /* 0.07386 C */
 		.temp_offset = 31000000 / 73860, /* 31 C = 0x00 */
-- 
2.1.4


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

* [PATCH 2/9] iio: Add inverse unit conversion macros
  2015-08-05 13:38 [PATCH 0/9] iio: adis updates Lars-Peter Clausen
  2015-08-05 13:38 ` [PATCH 1/9] iio: adis16400: Fix adis16448 gyroscope scale Lars-Peter Clausen
@ 2015-08-05 13:38 ` Lars-Peter Clausen
  2015-08-08 11:51   ` Jonathan Cameron
  2015-08-05 13:38 ` [PATCH 3/9] iio: adis16480: Fix scale factors Lars-Peter Clausen
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Lars-Peter Clausen @ 2015-08-05 13:38 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald, linux-iio, Lars-Peter Clausen

Add inverse unit conversion macro to convert from standard IIO units to
units that might be used by some devices.

Those are useful in combination with scale factors that are specified as
IIO_VAL_FRACTIONAL. Typically the denominator for those specifications will
contain the maximum raw value the sensor will generate and the numerator
the value it maps to in a specific unit. Sometimes datasheets specify those
in different units than the standard IIO units (e.g. degree/s instead of
rad/s) and so we need to do a unit conversion.

>From a mathematical point of view it does not make a difference whether we
apply the unit conversion to the numerator or the inverse unit conversion
to the denominator since (x / y) / z = x / (y * z). But as the denominator
is typically a larger value and we are rounding both the numerator and
denominator to integer values using the later method gives us a better
precision (E.g. the relative error is smaller if we round 8000.3 to 8000
rather than rounding 8.3 to 8).

This is where in inverse unit conversion macros will be used.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 include/linux/iio/iio.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index f791482..6bcc9537 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -645,6 +645,15 @@ int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,
 #define IIO_DEGREE_TO_RAD(deg) (((deg) * 314159ULL + 9000000ULL) / 18000000ULL)
 
 /**
+ * IIO_RAD_TO_DEGREE() - Convert rad to degree
+ * @rad: A value in rad
+ *
+ * Returns the given value converted from rad to degree
+ */
+#define IIO_RAD_TO_DEGREE(rad) \
+	(((rad) * 18000000ULL + 314159ULL / 2) / 314159ULL)
+
+/**
  * IIO_G_TO_M_S_2() - Convert g to meter / second**2
  * @g: A value in g
  *
@@ -652,4 +661,12 @@ int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,
  */
 #define IIO_G_TO_M_S_2(g) ((g) * 980665ULL / 100000ULL)
 
+/**
+ * IIO_M_S_2_TO_G() - Convert meter / second**2 to g
+ * @ms2: A value in meter / second**2
+ *
+ * Returns the given value converted from meter / second**2 to g
+ */
+#define IIO_M_S_2_TO_G(ms2) (((ms2) * 100000ULL + 980665ULL / 2) / 980665ULL)
+
 #endif /* _INDUSTRIAL_IO_H_ */
-- 
2.1.4


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

* [PATCH 3/9] iio: adis16480: Fix scale factors
  2015-08-05 13:38 [PATCH 0/9] iio: adis updates Lars-Peter Clausen
  2015-08-05 13:38 ` [PATCH 1/9] iio: adis16400: Fix adis16448 gyroscope scale Lars-Peter Clausen
  2015-08-05 13:38 ` [PATCH 2/9] iio: Add inverse unit conversion macros Lars-Peter Clausen
@ 2015-08-05 13:38 ` Lars-Peter Clausen
  2015-08-08 11:52   ` Jonathan Cameron
  2015-08-05 13:38 ` [PATCH 4/9] iio: adis16400: adis16300 has product ID and serial number Lars-Peter Clausen
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Lars-Peter Clausen @ 2015-08-05 13:38 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald, linux-iio, Lars-Peter Clausen

The different devices support by the adis16480 driver have slightly
different scales for the gyroscope and accelerometer channels.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/imu/adis16480.c | 39 +++++++++++++++++++++++++++++++++------
 1 file changed, 33 insertions(+), 6 deletions(-)

diff --git a/drivers/iio/imu/adis16480.c b/drivers/iio/imu/adis16480.c
index 989605d..b94bfd3 100644
--- a/drivers/iio/imu/adis16480.c
+++ b/drivers/iio/imu/adis16480.c
@@ -110,6 +110,10 @@
 struct adis16480_chip_info {
 	unsigned int num_channels;
 	const struct iio_chan_spec *channels;
+	unsigned int gyro_max_val;
+	unsigned int gyro_max_scale;
+	unsigned int accel_max_val;
+	unsigned int accel_max_scale;
 };
 
 struct adis16480 {
@@ -497,19 +501,21 @@ static int adis16480_set_filter_freq(struct iio_dev *indio_dev,
 static int adis16480_read_raw(struct iio_dev *indio_dev,
 	const struct iio_chan_spec *chan, int *val, int *val2, long info)
 {
+	struct adis16480 *st = iio_priv(indio_dev);
+
 	switch (info) {
 	case IIO_CHAN_INFO_RAW:
 		return adis_single_conversion(indio_dev, chan, 0, val);
 	case IIO_CHAN_INFO_SCALE:
 		switch (chan->type) {
 		case IIO_ANGL_VEL:
-			*val = 0;
-			*val2 = IIO_DEGREE_TO_RAD(20000); /* 0.02 degree/sec */
-			return IIO_VAL_INT_PLUS_MICRO;
+			*val = st->chip_info->gyro_max_scale;
+			*val2 = st->chip_info->gyro_max_val;
+			return IIO_VAL_FRACTIONAL;
 		case IIO_ACCEL:
-			*val = 0;
-			*val2 = IIO_G_TO_M_S_2(800); /* 0.8 mg */
-			return IIO_VAL_INT_PLUS_MICRO;
+			*val = st->chip_info->accel_max_scale;
+			*val2 = st->chip_info->accel_max_val;
+			return IIO_VAL_FRACTIONAL;
 		case IIO_MAGN:
 			*val = 0;
 			*val2 = 100; /* 0.0001 gauss */
@@ -674,18 +680,39 @@ static const struct adis16480_chip_info adis16480_chip_info[] = {
 	[ADIS16375] = {
 		.channels = adis16485_channels,
 		.num_channels = ARRAY_SIZE(adis16485_channels),
+		/*
+		 * storing the value in rad/degree and the scale in degree
+		 * gives us the result in rad and better precession than
+		 * storing the scale directly in rad.
+		 */
+		.gyro_max_val = IIO_RAD_TO_DEGREE(22887),
+		.gyro_max_scale = 300,
+		.accel_max_val = IIO_M_S_2_TO_G(21973),
+		.accel_max_scale = 18,
 	},
 	[ADIS16480] = {
 		.channels = adis16480_channels,
 		.num_channels = ARRAY_SIZE(adis16480_channels),
+		.gyro_max_val = IIO_RAD_TO_DEGREE(22500),
+		.gyro_max_scale = 450,
+		.accel_max_val = IIO_M_S_2_TO_G(12500),
+		.accel_max_scale = 5,
 	},
 	[ADIS16485] = {
 		.channels = adis16485_channels,
 		.num_channels = ARRAY_SIZE(adis16485_channels),
+		.gyro_max_val = IIO_RAD_TO_DEGREE(22500),
+		.gyro_max_scale = 450,
+		.accel_max_val = IIO_M_S_2_TO_G(20000),
+		.accel_max_scale = 5,
 	},
 	[ADIS16488] = {
 		.channels = adis16480_channels,
 		.num_channels = ARRAY_SIZE(adis16480_channels),
+		.gyro_max_val = IIO_RAD_TO_DEGREE(22500),
+		.gyro_max_scale = 450,
+		.accel_max_val = IIO_M_S_2_TO_G(22500),
+		.accel_max_scale = 18,
 	},
 };
 
-- 
2.1.4


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

* [PATCH 4/9] iio: adis16400: adis16300 has product ID and serial number
  2015-08-05 13:38 [PATCH 0/9] iio: adis updates Lars-Peter Clausen
                   ` (2 preceding siblings ...)
  2015-08-05 13:38 ` [PATCH 3/9] iio: adis16480: Fix scale factors Lars-Peter Clausen
@ 2015-08-05 13:38 ` Lars-Peter Clausen
  2015-08-08 11:54   ` Jonathan Cameron
  2015-08-05 13:38 ` [PATCH 5/9] iio: adis16400: Add ADIS16305 support Lars-Peter Clausen
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Lars-Peter Clausen @ 2015-08-05 13:38 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald, linux-iio, Lars-Peter Clausen

The ADIS16300 has the product ID and serial number registers, they are just
not documented. Set the appropriate flags so the driver makes use of them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/imu/adis16400_core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index d42e4fe..7d612ab 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -696,7 +696,8 @@ static struct adis16400_chip_info adis16400_chips[] = {
 	[ADIS16300] = {
 		.channels = adis16300_channels,
 		.num_channels = ARRAY_SIZE(adis16300_channels),
-		.flags = ADIS16400_HAS_SLOW_MODE,
+		.flags = ADIS16400_HAS_PROD_ID | ADIS16400_HAS_SLOW_MODE |
+				ADIS16400_HAS_SERIAL_NUMBER,
 		.gyro_scale_micro = IIO_DEGREE_TO_RAD(50000), /* 0.05 deg/s */
 		.accel_scale_micro = 5884,
 		.temp_scale_nano = 140000000, /* 0.14 C */
-- 
2.1.4


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

* [PATCH 5/9] iio: adis16400: Add ADIS16305 support
  2015-08-05 13:38 [PATCH 0/9] iio: adis updates Lars-Peter Clausen
                   ` (3 preceding siblings ...)
  2015-08-05 13:38 ` [PATCH 4/9] iio: adis16400: adis16300 has product ID and serial number Lars-Peter Clausen
@ 2015-08-05 13:38 ` Lars-Peter Clausen
  2015-08-08 11:54   ` Jonathan Cameron
  2015-08-05 13:38 ` [PATCH 6/9] iio: adis16260: Add ADIS16266 support Lars-Peter Clausen
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Lars-Peter Clausen @ 2015-08-05 13:38 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald, linux-iio, Lars-Peter Clausen

The ADIS16305 is fully register map compatible to the ADIS16300.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/imu/adis16400_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index 7d612ab..e4cc2ec 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -927,6 +927,7 @@ static int adis16400_remove(struct spi_device *spi)
 
 static const struct spi_device_id adis16400_id[] = {
 	{"adis16300", ADIS16300},
+	{"adis16305", ADIS16300},
 	{"adis16334", ADIS16334},
 	{"adis16350", ADIS16350},
 	{"adis16354", ADIS16350},
-- 
2.1.4


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

* [PATCH 6/9] iio: adis16260: Add ADIS16266 support
  2015-08-05 13:38 [PATCH 0/9] iio: adis updates Lars-Peter Clausen
                   ` (4 preceding siblings ...)
  2015-08-05 13:38 ` [PATCH 5/9] iio: adis16400: Add ADIS16305 support Lars-Peter Clausen
@ 2015-08-05 13:38 ` Lars-Peter Clausen
  2015-08-08 11:58   ` Jonathan Cameron
  2015-08-05 13:38 ` [PATCH 7/9] iio: adis16400: Add ADIS16367 support Lars-Peter Clausen
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Lars-Peter Clausen @ 2015-08-05 13:38 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald, linux-iio, Lars-Peter Clausen

The ADIS16266 is mostly register compatible to the ADIS16260. The
difference is a different gyroscope scale factor as well not having the
relative angular displacement channel.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/gyro/adis16260.c | 137 +++++++++++++++++++++++++++++++------------
 1 file changed, 98 insertions(+), 39 deletions(-)

diff --git a/drivers/iio/gyro/adis16260.c b/drivers/iio/gyro/adis16260.c
index 75fe0ed..00c6ad9 100644
--- a/drivers/iio/gyro/adis16260.c
+++ b/drivers/iio/gyro/adis16260.c
@@ -101,19 +101,24 @@
 #define ADIS16260_SCAN_TEMP	3
 #define ADIS16260_SCAN_ANGL	4
 
-/* Power down the device */
-static int adis16260_stop_device(struct iio_dev *indio_dev)
-{
-	struct adis *adis = iio_priv(indio_dev);
-	int ret;
-	u16 val = ADIS16260_SLP_CNT_POWER_OFF;
+struct adis16260_chip_info {
+	unsigned int gyro_max_val;
+	unsigned int gyro_max_scale;
+	const struct iio_chan_spec *channels;
+	unsigned int num_channels;
+};
 
-	ret = adis_write_reg_16(adis, ADIS16260_SLP_CNT, val);
-	if (ret)
-		dev_err(&indio_dev->dev, "problem with turning device off: SLP_CNT");
+struct adis16260 {
+	const struct adis16260_chip_info *info;
 
-	return ret;
-}
+	struct adis adis;
+};
+
+enum adis16260_type {
+	ADIS16251,
+	ADIS16260,
+	ADIS16266,
+};
 
 static const struct iio_chan_spec adis16260_channels[] = {
 	ADIS_GYRO_CHAN(X, ADIS16260_GYRO_OUT, ADIS16260_SCAN_GYRO,
@@ -131,6 +136,55 @@ static const struct iio_chan_spec adis16260_channels[] = {
 	IIO_CHAN_SOFT_TIMESTAMP(5),
 };
 
+static const struct iio_chan_spec adis16266_channels[] = {
+	ADIS_GYRO_CHAN(X, ADIS16260_GYRO_OUT, ADIS16260_SCAN_GYRO,
+		BIT(IIO_CHAN_INFO_CALIBBIAS) |
+		BIT(IIO_CHAN_INFO_CALIBSCALE),
+		BIT(IIO_CHAN_INFO_SAMP_FREQ), 14),
+	ADIS_TEMP_CHAN(ADIS16260_TEMP_OUT, ADIS16260_SCAN_TEMP,
+		BIT(IIO_CHAN_INFO_SAMP_FREQ), 12),
+	ADIS_SUPPLY_CHAN(ADIS16260_SUPPLY_OUT, ADIS16260_SCAN_SUPPLY,
+		BIT(IIO_CHAN_INFO_SAMP_FREQ), 12),
+	ADIS_AUX_ADC_CHAN(ADIS16260_AUX_ADC, ADIS16260_SCAN_AUX_ADC,
+		BIT(IIO_CHAN_INFO_SAMP_FREQ), 12),
+	IIO_CHAN_SOFT_TIMESTAMP(4),
+};
+
+static const struct adis16260_chip_info adis16260_chip_info_table[] = {
+	[ADIS16251] = {
+		.gyro_max_scale = 80,
+		.gyro_max_val = IIO_RAD_TO_DEGREE(4368),
+		.channels = adis16260_channels,
+		.num_channels = ARRAY_SIZE(adis16260_channels),
+	},
+	[ADIS16260] = {
+		.gyro_max_scale = 320,
+		.gyro_max_val = IIO_RAD_TO_DEGREE(4368),
+		.channels = adis16260_channels,
+		.num_channels = ARRAY_SIZE(adis16260_channels),
+	},
+	[ADIS16266] = {
+		.gyro_max_scale = 14000,
+		.gyro_max_val = IIO_RAD_TO_DEGREE(3357),
+		.channels = adis16266_channels,
+		.num_channels = ARRAY_SIZE(adis16266_channels),
+	},
+};
+
+/* Power down the device */
+static int adis16260_stop_device(struct iio_dev *indio_dev)
+{
+	struct adis16260 *adis16260 = iio_priv(indio_dev);
+	int ret;
+	u16 val = ADIS16260_SLP_CNT_POWER_OFF;
+
+	ret = adis_write_reg_16(&adis16260->adis, ADIS16260_SLP_CNT, val);
+	if (ret)
+		dev_err(&indio_dev->dev, "problem with turning device off: SLP_CNT");
+
+	return ret;
+}
+
 static const u8 adis16260_addresses[][2] = {
 	[ADIS16260_SCAN_GYRO] = { ADIS16260_GYRO_OFF, ADIS16260_GYRO_SCALE },
 };
@@ -140,7 +194,9 @@ static int adis16260_read_raw(struct iio_dev *indio_dev,
 			      int *val, int *val2,
 			      long mask)
 {
-	struct adis *adis = iio_priv(indio_dev);
+	struct adis16260 *adis16260 = iio_priv(indio_dev);
+	const struct adis16260_chip_info *info = adis16260->info;
+	struct adis *adis = &adis16260->adis;
 	int ret;
 	u8 addr;
 	s16 val16;
@@ -152,15 +208,9 @@ static int adis16260_read_raw(struct iio_dev *indio_dev,
 	case IIO_CHAN_INFO_SCALE:
 		switch (chan->type) {
 		case IIO_ANGL_VEL:
-			*val = 0;
-			if (spi_get_device_id(adis->spi)->driver_data) {
-				/* 0.01832 degree / sec */
-				*val2 = IIO_DEGREE_TO_RAD(18320);
-			} else {
-				/* 0.07326 degree / sec */
-				*val2 = IIO_DEGREE_TO_RAD(73260);
-			}
-			return IIO_VAL_INT_PLUS_MICRO;
+			*val = info->gyro_max_scale;
+			*val2 = info->gyro_max_val;
+			return IIO_VAL_FRACTIONAL;
 		case IIO_INCLI:
 			*val = 0;
 			*val2 = IIO_DEGREE_TO_RAD(36630);
@@ -224,7 +274,8 @@ static int adis16260_write_raw(struct iio_dev *indio_dev,
 			       int val2,
 			       long mask)
 {
-	struct adis *adis = iio_priv(indio_dev);
+	struct adis16260 *adis16260 = iio_priv(indio_dev);
+	struct adis *adis = &adis16260->adis;
 	int ret;
 	u8 addr;
 	u8 t;
@@ -305,35 +356,42 @@ static const struct adis_data adis16260_data = {
 
 static int adis16260_probe(struct spi_device *spi)
 {
+	const struct spi_device_id *id;
+	struct adis16260 *adis16260;
 	struct iio_dev *indio_dev;
-	struct adis *adis;
 	int ret;
 
+	id = spi_get_device_id(spi);
+	if (!id)
+		return -ENODEV;
+
 	/* setup the industrialio driver allocated elements */
-	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*adis));
+	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*adis16260));
 	if (!indio_dev)
 		return -ENOMEM;
-	adis = iio_priv(indio_dev);
+	adis16260 = iio_priv(indio_dev);
 	/* this is only used for removal purposes */
 	spi_set_drvdata(spi, indio_dev);
 
-	indio_dev->name = spi_get_device_id(spi)->name;
+	adis16260->info = &adis16260_chip_info_table[id->driver_data];
+
+	indio_dev->name = id->name;
 	indio_dev->dev.parent = &spi->dev;
 	indio_dev->info = &adis16260_info;
-	indio_dev->channels = adis16260_channels;
-	indio_dev->num_channels = ARRAY_SIZE(adis16260_channels);
+	indio_dev->channels = adis16260->info->channels;
+	indio_dev->num_channels = adis16260->info->num_channels;
 	indio_dev->modes = INDIO_DIRECT_MODE;
 
-	ret = adis_init(adis, indio_dev, spi, &adis16260_data);
+	ret = adis_init(&adis16260->adis, indio_dev, spi, &adis16260_data);
 	if (ret)
 		return ret;
 
-	ret = adis_setup_buffer_and_trigger(adis, indio_dev, NULL);
+	ret = adis_setup_buffer_and_trigger(&adis16260->adis, indio_dev, NULL);
 	if (ret)
 		return ret;
 
 	/* Get the device into a sane initial state */
-	ret = adis_initial_startup(adis);
+	ret = adis_initial_startup(&adis16260->adis);
 	if (ret)
 		goto error_cleanup_buffer_trigger;
 	ret = iio_device_register(indio_dev);
@@ -343,18 +401,18 @@ static int adis16260_probe(struct spi_device *spi)
 	return 0;
 
 error_cleanup_buffer_trigger:
-	adis_cleanup_buffer_and_trigger(adis, indio_dev);
+	adis_cleanup_buffer_and_trigger(&adis16260->adis, indio_dev);
 	return ret;
 }
 
 static int adis16260_remove(struct spi_device *spi)
 {
 	struct iio_dev *indio_dev = spi_get_drvdata(spi);
-	struct adis *adis = iio_priv(indio_dev);
+	struct adis16260 *adis16260 = iio_priv(indio_dev);
 
 	iio_device_unregister(indio_dev);
 	adis16260_stop_device(indio_dev);
-	adis_cleanup_buffer_and_trigger(adis, indio_dev);
+	adis_cleanup_buffer_and_trigger(&adis16260->adis, indio_dev);
 
 	return 0;
 }
@@ -364,11 +422,12 @@ static int adis16260_remove(struct spi_device *spi)
  * support for the on chip filtering.
  */
 static const struct spi_device_id adis16260_id[] = {
-	{"adis16260", 0},
-	{"adis16265", 0},
-	{"adis16250", 0},
-	{"adis16255", 0},
-	{"adis16251", 1},
+	{"adis16260", ADIS16260},
+	{"adis16265", ADIS16260},
+	{"adis16266", ADIS16266},
+	{"adis16250", ADIS16260},
+	{"adis16255", ADIS16260},
+	{"adis16251", ADIS16251},
 	{}
 };
 MODULE_DEVICE_TABLE(spi, adis16260_id);
-- 
2.1.4


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

* [PATCH 7/9] iio: adis16400: Add ADIS16367 support
  2015-08-05 13:38 [PATCH 0/9] iio: adis updates Lars-Peter Clausen
                   ` (5 preceding siblings ...)
  2015-08-05 13:38 ` [PATCH 6/9] iio: adis16260: Add ADIS16266 support Lars-Peter Clausen
@ 2015-08-05 13:38 ` Lars-Peter Clausen
  2015-08-08 14:08   ` Jonathan Cameron
  2015-08-05 13:38 ` [PATCH 8/9] iio: adis16400: Add ADIS16445 support Lars-Peter Clausen
  2015-08-05 13:38 ` [PATCH 9/9] iio: adis16136: Add ADIS16137 support Lars-Peter Clausen
  8 siblings, 1 reply; 19+ messages in thread
From: Lars-Peter Clausen @ 2015-08-05 13:38 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald, linux-iio, Lars-Peter Clausen

The ADIS16367 is mostly register compatible to the ADIS16360. The only
difference is the scale factor for the gyroscope output.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/imu/adis16400_core.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index e4cc2ec..a9f4043 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -139,6 +139,7 @@ enum adis16400_chip_variant {
 	ADIS16360,
 	ADIS16362,
 	ADIS16364,
+	ADIS16367,
 	ADIS16400,
 	ADIS16448,
 };
@@ -764,6 +765,18 @@ static struct adis16400_chip_info adis16400_chips[] = {
 		.set_freq = adis16400_set_freq,
 		.get_freq = adis16400_get_freq,
 	},
+	[ADIS16367] = {
+		.channels = adis16350_channels,
+		.num_channels = ARRAY_SIZE(adis16350_channels),
+		.flags = ADIS16400_HAS_PROD_ID | ADIS16400_HAS_SLOW_MODE |
+				ADIS16400_HAS_SERIAL_NUMBER,
+		.gyro_scale_micro = IIO_DEGREE_TO_RAD(2000), /* 0.2 deg/s */
+		.accel_scale_micro = IIO_G_TO_M_S_2(3333), /* 3.333 mg */
+		.temp_scale_nano = 136000000, /* 0.136 C */
+		.temp_offset = 25000000 / 136000, /* 25 C = 0x00 */
+		.set_freq = adis16400_set_freq,
+		.get_freq = adis16400_get_freq,
+	},
 	[ADIS16400] = {
 		.channels = adis16400_channels,
 		.num_channels = ARRAY_SIZE(adis16400_channels),
@@ -936,6 +949,7 @@ static const struct spi_device_id adis16400_id[] = {
 	{"adis16362", ADIS16362},
 	{"adis16364", ADIS16364},
 	{"adis16365", ADIS16360},
+	{"adis16367", ADIS16367},
 	{"adis16400", ADIS16400},
 	{"adis16405", ADIS16400},
 	{"adis16448", ADIS16448},
-- 
2.1.4


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

* [PATCH 8/9] iio: adis16400: Add ADIS16445 support
  2015-08-05 13:38 [PATCH 0/9] iio: adis updates Lars-Peter Clausen
                   ` (6 preceding siblings ...)
  2015-08-05 13:38 ` [PATCH 7/9] iio: adis16400: Add ADIS16367 support Lars-Peter Clausen
@ 2015-08-05 13:38 ` Lars-Peter Clausen
  2015-08-08 14:09   ` Jonathan Cameron
  2015-08-05 13:38 ` [PATCH 9/9] iio: adis16136: Add ADIS16137 support Lars-Peter Clausen
  8 siblings, 1 reply; 19+ messages in thread
From: Lars-Peter Clausen @ 2015-08-05 13:38 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald, linux-iio, Lars-Peter Clausen

The ADIS16445 is similar to the ADIS16448, but without the magnetometer and
pressure channels as well as different scale factors for the gyroscope and
accelerometer outputs.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/imu/adis16400_core.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index a9f4043..abc4c50 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -141,6 +141,7 @@ enum adis16400_chip_variant {
 	ADIS16364,
 	ADIS16367,
 	ADIS16400,
+	ADIS16445,
 	ADIS16448,
 };
 
@@ -623,6 +624,17 @@ static const struct iio_chan_spec adis16400_channels[] = {
 	IIO_CHAN_SOFT_TIMESTAMP(ADIS16400_SCAN_TIMESTAMP),
 };
 
+static const struct iio_chan_spec adis16445_channels[] = {
+	ADIS16400_GYRO_CHAN(X, ADIS16400_XGYRO_OUT, 16),
+	ADIS16400_GYRO_CHAN(Y, ADIS16400_YGYRO_OUT, 16),
+	ADIS16400_GYRO_CHAN(Z, ADIS16400_ZGYRO_OUT, 16),
+	ADIS16400_ACCEL_CHAN(X, ADIS16400_XACCL_OUT, 16),
+	ADIS16400_ACCEL_CHAN(Y, ADIS16400_YACCL_OUT, 16),
+	ADIS16400_ACCEL_CHAN(Z, ADIS16400_ZACCL_OUT, 16),
+	ADIS16400_TEMP_CHAN(ADIS16448_TEMP_OUT, 12),
+	IIO_CHAN_SOFT_TIMESTAMP(ADIS16400_SCAN_TIMESTAMP),
+};
+
 static const struct iio_chan_spec adis16448_channels[] = {
 	ADIS16400_GYRO_CHAN(X, ADIS16400_XGYRO_OUT, 16),
 	ADIS16400_GYRO_CHAN(Y, ADIS16400_YGYRO_OUT, 16),
@@ -788,6 +800,19 @@ static struct adis16400_chip_info adis16400_chips[] = {
 		.set_freq = adis16400_set_freq,
 		.get_freq = adis16400_get_freq,
 	},
+	[ADIS16445] = {
+		.channels = adis16445_channels,
+		.num_channels = ARRAY_SIZE(adis16445_channels),
+		.flags = ADIS16400_HAS_PROD_ID |
+				ADIS16400_HAS_SERIAL_NUMBER |
+				ADIS16400_BURST_DIAG_STAT,
+		.gyro_scale_micro = IIO_DEGREE_TO_RAD(10000), /* 0.01 deg/s */
+		.accel_scale_micro = IIO_G_TO_M_S_2(250), /* 1/4000 g */
+		.temp_scale_nano = 73860000, /* 0.07386 C */
+		.temp_offset = 31000000 / 73860, /* 31 C = 0x00 */
+		.set_freq = adis16334_set_freq,
+		.get_freq = adis16334_get_freq,
+	},
 	[ADIS16448] = {
 		.channels = adis16448_channels,
 		.num_channels = ARRAY_SIZE(adis16448_channels),
@@ -952,6 +977,7 @@ static const struct spi_device_id adis16400_id[] = {
 	{"adis16367", ADIS16367},
 	{"adis16400", ADIS16400},
 	{"adis16405", ADIS16400},
+	{"adis16445", ADIS16445},
 	{"adis16448", ADIS16448},
 	{}
 };
-- 
2.1.4


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

* [PATCH 9/9] iio: adis16136: Add ADIS16137 support
  2015-08-05 13:38 [PATCH 0/9] iio: adis updates Lars-Peter Clausen
                   ` (7 preceding siblings ...)
  2015-08-05 13:38 ` [PATCH 8/9] iio: adis16400: Add ADIS16445 support Lars-Peter Clausen
@ 2015-08-05 13:38 ` Lars-Peter Clausen
  2015-08-08 14:10   ` Jonathan Cameron
  8 siblings, 1 reply; 19+ messages in thread
From: Lars-Peter Clausen @ 2015-08-05 13:38 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Peter Meerwald, linux-iio, Lars-Peter Clausen

The ADIS16137 is register map compatible to the ADIS16136, but has a
different scale factor for the gyroscope output.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/gyro/adis16136.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/iio/gyro/adis16136.c b/drivers/iio/gyro/adis16136.c
index 591bd55..26de876 100644
--- a/drivers/iio/gyro/adis16136.c
+++ b/drivers/iio/gyro/adis16136.c
@@ -473,6 +473,7 @@ enum adis16136_id {
 	ID_ADIS16133,
 	ID_ADIS16135,
 	ID_ADIS16136,
+	ID_ADIS16137,
 };
 
 static const struct adis16136_chip_info adis16136_chip_info[] = {
@@ -488,6 +489,10 @@ static const struct adis16136_chip_info adis16136_chip_info[] = {
 		.precision = IIO_DEGREE_TO_RAD(450),
 		.fullscale = 24623,
 	},
+	[ID_ADIS16137] = {
+		.precision = IIO_DEGREE_TO_RAD(1000),
+		.fullscale = 24609,
+	},
 };
 
 static int adis16136_probe(struct spi_device *spi)
@@ -557,6 +562,7 @@ static const struct spi_device_id adis16136_ids[] = {
 	{ "adis16133", ID_ADIS16133 },
 	{ "adis16135", ID_ADIS16135 },
 	{ "adis16136", ID_ADIS16136 },
+	{ "adis16137", ID_ADIS16137 },
 	{ }
 };
 MODULE_DEVICE_TABLE(spi, adis16136_ids);
-- 
2.1.4

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

* Re: [PATCH 1/9] iio: adis16400: Fix adis16448 gyroscope scale
  2015-08-05 13:38 ` [PATCH 1/9] iio: adis16400: Fix adis16448 gyroscope scale Lars-Peter Clausen
@ 2015-08-08 11:48   ` Jonathan Cameron
  0 siblings, 0 replies; 19+ messages in thread
From: Jonathan Cameron @ 2015-08-08 11:48 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Hartmut Knaack, Peter Meerwald, linux-iio

On 05/08/15 14:38, Lars-Peter Clausen wrote:
> Use the correct scale for the adis16448 gyroscope output.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Given we are late in the cycle and these are fixes for long broken
issues, I'm going to take them through the togreg tree and mark
for stable so they'll get pushed back to stable after the next
merge window.

So applied to the togreg branch of iio.git and marked for stable.

Thanks,

Jonathan
> ---
>  drivers/iio/imu/adis16400_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
> index 2fd68f22..d42e4fe 100644
> --- a/drivers/iio/imu/adis16400_core.c
> +++ b/drivers/iio/imu/adis16400_core.c
> @@ -780,7 +780,7 @@ static struct adis16400_chip_info adis16400_chips[] = {
>  		.flags = ADIS16400_HAS_PROD_ID |
>  				ADIS16400_HAS_SERIAL_NUMBER |
>  				ADIS16400_BURST_DIAG_STAT,
> -		.gyro_scale_micro = IIO_DEGREE_TO_RAD(10000), /* 0.01 deg/s */
> +		.gyro_scale_micro = IIO_DEGREE_TO_RAD(40000), /* 0.04 deg/s */
>  		.accel_scale_micro = IIO_G_TO_M_S_2(833), /* 1/1200 g */
>  		.temp_scale_nano = 73860000, /* 0.07386 C */
>  		.temp_offset = 31000000 / 73860, /* 31 C = 0x00 */
> 


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

* Re: [PATCH 2/9] iio: Add inverse unit conversion macros
  2015-08-05 13:38 ` [PATCH 2/9] iio: Add inverse unit conversion macros Lars-Peter Clausen
@ 2015-08-08 11:51   ` Jonathan Cameron
  0 siblings, 0 replies; 19+ messages in thread
From: Jonathan Cameron @ 2015-08-08 11:51 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Hartmut Knaack, Peter Meerwald, linux-iio

On 05/08/15 14:38, Lars-Peter Clausen wrote:
> Add inverse unit conversion macro to convert from standard IIO units to
> units that might be used by some devices.
> 
> Those are useful in combination with scale factors that are specified as
> IIO_VAL_FRACTIONAL. Typically the denominator for those specifications will
> contain the maximum raw value the sensor will generate and the numerator
> the value it maps to in a specific unit. Sometimes datasheets specify those
> in different units than the standard IIO units (e.g. degree/s instead of
> rad/s) and so we need to do a unit conversion.
> 
> From a mathematical point of view it does not make a difference whether we
> apply the unit conversion to the numerator or the inverse unit conversion
> to the denominator since (x / y) / z = x / (y * z). But as the denominator
> is typically a larger value and we are rounding both the numerator and
> denominator to integer values using the later method gives us a better
> precision (E.g. the relative error is smaller if we round 8000.3 to 8000
> rather than rounding 8.3 to 8).
> 
> This is where in inverse unit conversion macros will be used.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied and marked for stable given the next patch.
> ---
>  include/linux/iio/iio.h | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
> index f791482..6bcc9537 100644
> --- a/include/linux/iio/iio.h
> +++ b/include/linux/iio/iio.h
> @@ -645,6 +645,15 @@ int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,
>  #define IIO_DEGREE_TO_RAD(deg) (((deg) * 314159ULL + 9000000ULL) / 18000000ULL)
>  
>  /**
> + * IIO_RAD_TO_DEGREE() - Convert rad to degree
> + * @rad: A value in rad
> + *
> + * Returns the given value converted from rad to degree
> + */
> +#define IIO_RAD_TO_DEGREE(rad) \
> +	(((rad) * 18000000ULL + 314159ULL / 2) / 314159ULL)
> +
> +/**
>   * IIO_G_TO_M_S_2() - Convert g to meter / second**2
>   * @g: A value in g
>   *
> @@ -652,4 +661,12 @@ int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,
>   */
>  #define IIO_G_TO_M_S_2(g) ((g) * 980665ULL / 100000ULL)
>  
> +/**
> + * IIO_M_S_2_TO_G() - Convert meter / second**2 to g
> + * @ms2: A value in meter / second**2
> + *
> + * Returns the given value converted from meter / second**2 to g
> + */
> +#define IIO_M_S_2_TO_G(ms2) (((ms2) * 100000ULL + 980665ULL / 2) / 980665ULL)
> +
>  #endif /* _INDUSTRIAL_IO_H_ */
> 


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

* Re: [PATCH 3/9] iio: adis16480: Fix scale factors
  2015-08-05 13:38 ` [PATCH 3/9] iio: adis16480: Fix scale factors Lars-Peter Clausen
@ 2015-08-08 11:52   ` Jonathan Cameron
  0 siblings, 0 replies; 19+ messages in thread
From: Jonathan Cameron @ 2015-08-08 11:52 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Hartmut Knaack, Peter Meerwald, linux-iio

On 05/08/15 14:38, Lars-Peter Clausen wrote:
> The different devices support by the adis16480 driver have slightly
> different scales for the gyroscope and accelerometer channels.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied to the togreg branch of iio.git and marked for stable.

Thanks,

Jonathan
> ---
>  drivers/iio/imu/adis16480.c | 39 +++++++++++++++++++++++++++++++++------
>  1 file changed, 33 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/iio/imu/adis16480.c b/drivers/iio/imu/adis16480.c
> index 989605d..b94bfd3 100644
> --- a/drivers/iio/imu/adis16480.c
> +++ b/drivers/iio/imu/adis16480.c
> @@ -110,6 +110,10 @@
>  struct adis16480_chip_info {
>  	unsigned int num_channels;
>  	const struct iio_chan_spec *channels;
> +	unsigned int gyro_max_val;
> +	unsigned int gyro_max_scale;
> +	unsigned int accel_max_val;
> +	unsigned int accel_max_scale;
>  };
>  
>  struct adis16480 {
> @@ -497,19 +501,21 @@ static int adis16480_set_filter_freq(struct iio_dev *indio_dev,
>  static int adis16480_read_raw(struct iio_dev *indio_dev,
>  	const struct iio_chan_spec *chan, int *val, int *val2, long info)
>  {
> +	struct adis16480 *st = iio_priv(indio_dev);
> +
>  	switch (info) {
>  	case IIO_CHAN_INFO_RAW:
>  		return adis_single_conversion(indio_dev, chan, 0, val);
>  	case IIO_CHAN_INFO_SCALE:
>  		switch (chan->type) {
>  		case IIO_ANGL_VEL:
> -			*val = 0;
> -			*val2 = IIO_DEGREE_TO_RAD(20000); /* 0.02 degree/sec */
> -			return IIO_VAL_INT_PLUS_MICRO;
> +			*val = st->chip_info->gyro_max_scale;
> +			*val2 = st->chip_info->gyro_max_val;
> +			return IIO_VAL_FRACTIONAL;
>  		case IIO_ACCEL:
> -			*val = 0;
> -			*val2 = IIO_G_TO_M_S_2(800); /* 0.8 mg */
> -			return IIO_VAL_INT_PLUS_MICRO;
> +			*val = st->chip_info->accel_max_scale;
> +			*val2 = st->chip_info->accel_max_val;
> +			return IIO_VAL_FRACTIONAL;
>  		case IIO_MAGN:
>  			*val = 0;
>  			*val2 = 100; /* 0.0001 gauss */
> @@ -674,18 +680,39 @@ static const struct adis16480_chip_info adis16480_chip_info[] = {
>  	[ADIS16375] = {
>  		.channels = adis16485_channels,
>  		.num_channels = ARRAY_SIZE(adis16485_channels),
> +		/*
> +		 * storing the value in rad/degree and the scale in degree
> +		 * gives us the result in rad and better precession than
> +		 * storing the scale directly in rad.
> +		 */
> +		.gyro_max_val = IIO_RAD_TO_DEGREE(22887),
> +		.gyro_max_scale = 300,
> +		.accel_max_val = IIO_M_S_2_TO_G(21973),
> +		.accel_max_scale = 18,
>  	},
>  	[ADIS16480] = {
>  		.channels = adis16480_channels,
>  		.num_channels = ARRAY_SIZE(adis16480_channels),
> +		.gyro_max_val = IIO_RAD_TO_DEGREE(22500),
> +		.gyro_max_scale = 450,
> +		.accel_max_val = IIO_M_S_2_TO_G(12500),
> +		.accel_max_scale = 5,
>  	},
>  	[ADIS16485] = {
>  		.channels = adis16485_channels,
>  		.num_channels = ARRAY_SIZE(adis16485_channels),
> +		.gyro_max_val = IIO_RAD_TO_DEGREE(22500),
> +		.gyro_max_scale = 450,
> +		.accel_max_val = IIO_M_S_2_TO_G(20000),
> +		.accel_max_scale = 5,
>  	},
>  	[ADIS16488] = {
>  		.channels = adis16480_channels,
>  		.num_channels = ARRAY_SIZE(adis16480_channels),
> +		.gyro_max_val = IIO_RAD_TO_DEGREE(22500),
> +		.gyro_max_scale = 450,
> +		.accel_max_val = IIO_M_S_2_TO_G(22500),
> +		.accel_max_scale = 18,
>  	},
>  };
>  
> 


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

* Re: [PATCH 4/9] iio: adis16400: adis16300 has product ID and serial number
  2015-08-05 13:38 ` [PATCH 4/9] iio: adis16400: adis16300 has product ID and serial number Lars-Peter Clausen
@ 2015-08-08 11:54   ` Jonathan Cameron
  0 siblings, 0 replies; 19+ messages in thread
From: Jonathan Cameron @ 2015-08-08 11:54 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Hartmut Knaack, Peter Meerwald, linux-iio

On 05/08/15 14:38, Lars-Peter Clausen wrote:
> The ADIS16300 has the product ID and serial number registers, they are just
> not documented. Set the appropriate flags so the driver makes use of them.
*mutters darkly*
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied to the togreg branch of iio.git.

Thanks,

Jonathan
> ---
>  drivers/iio/imu/adis16400_core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
> index d42e4fe..7d612ab 100644
> --- a/drivers/iio/imu/adis16400_core.c
> +++ b/drivers/iio/imu/adis16400_core.c
> @@ -696,7 +696,8 @@ static struct adis16400_chip_info adis16400_chips[] = {
>  	[ADIS16300] = {
>  		.channels = adis16300_channels,
>  		.num_channels = ARRAY_SIZE(adis16300_channels),
> -		.flags = ADIS16400_HAS_SLOW_MODE,
> +		.flags = ADIS16400_HAS_PROD_ID | ADIS16400_HAS_SLOW_MODE |
> +				ADIS16400_HAS_SERIAL_NUMBER,
>  		.gyro_scale_micro = IIO_DEGREE_TO_RAD(50000), /* 0.05 deg/s */
>  		.accel_scale_micro = 5884,
>  		.temp_scale_nano = 140000000, /* 0.14 C */
> 


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

* Re: [PATCH 5/9] iio: adis16400: Add ADIS16305 support
  2015-08-05 13:38 ` [PATCH 5/9] iio: adis16400: Add ADIS16305 support Lars-Peter Clausen
@ 2015-08-08 11:54   ` Jonathan Cameron
  0 siblings, 0 replies; 19+ messages in thread
From: Jonathan Cameron @ 2015-08-08 11:54 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Hartmut Knaack, Peter Meerwald, linux-iio

On 05/08/15 14:38, Lars-Peter Clausen wrote:
> The ADIS16305 is fully register map compatible to the ADIS16300.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied.  Thanks,

Jonathan
> ---
>  drivers/iio/imu/adis16400_core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
> index 7d612ab..e4cc2ec 100644
> --- a/drivers/iio/imu/adis16400_core.c
> +++ b/drivers/iio/imu/adis16400_core.c
> @@ -927,6 +927,7 @@ static int adis16400_remove(struct spi_device *spi)
>  
>  static const struct spi_device_id adis16400_id[] = {
>  	{"adis16300", ADIS16300},
> +	{"adis16305", ADIS16300},
>  	{"adis16334", ADIS16334},
>  	{"adis16350", ADIS16350},
>  	{"adis16354", ADIS16350},
> 


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

* Re: [PATCH 6/9] iio: adis16260: Add ADIS16266 support
  2015-08-05 13:38 ` [PATCH 6/9] iio: adis16260: Add ADIS16266 support Lars-Peter Clausen
@ 2015-08-08 11:58   ` Jonathan Cameron
  0 siblings, 0 replies; 19+ messages in thread
From: Jonathan Cameron @ 2015-08-08 11:58 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Hartmut Knaack, Peter Meerwald, linux-iio

On 05/08/15 14:38, Lars-Peter Clausen wrote:
> The ADIS16266 is mostly register compatible to the ADIS16260. The
> difference is a different gyroscope scale factor as well not having the
> relative angular displacement channel.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied. I would have slightly preferred a rework patch then
a new driver patch, but I guess there isn't much in here really.

Jonathan
> ---
>  drivers/iio/gyro/adis16260.c | 137 +++++++++++++++++++++++++++++++------------
>  1 file changed, 98 insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/iio/gyro/adis16260.c b/drivers/iio/gyro/adis16260.c
> index 75fe0ed..00c6ad9 100644
> --- a/drivers/iio/gyro/adis16260.c
> +++ b/drivers/iio/gyro/adis16260.c
> @@ -101,19 +101,24 @@
>  #define ADIS16260_SCAN_TEMP	3
>  #define ADIS16260_SCAN_ANGL	4
>  
> -/* Power down the device */
> -static int adis16260_stop_device(struct iio_dev *indio_dev)
> -{
> -	struct adis *adis = iio_priv(indio_dev);
> -	int ret;
> -	u16 val = ADIS16260_SLP_CNT_POWER_OFF;
> +struct adis16260_chip_info {
> +	unsigned int gyro_max_val;
> +	unsigned int gyro_max_scale;
> +	const struct iio_chan_spec *channels;
> +	unsigned int num_channels;
> +};
>  
> -	ret = adis_write_reg_16(adis, ADIS16260_SLP_CNT, val);
> -	if (ret)
> -		dev_err(&indio_dev->dev, "problem with turning device off: SLP_CNT");
> +struct adis16260 {
> +	const struct adis16260_chip_info *info;
>  
> -	return ret;
> -}
> +	struct adis adis;
> +};
> +
> +enum adis16260_type {
> +	ADIS16251,
> +	ADIS16260,
> +	ADIS16266,
> +};
>  
>  static const struct iio_chan_spec adis16260_channels[] = {
>  	ADIS_GYRO_CHAN(X, ADIS16260_GYRO_OUT, ADIS16260_SCAN_GYRO,
> @@ -131,6 +136,55 @@ static const struct iio_chan_spec adis16260_channels[] = {
>  	IIO_CHAN_SOFT_TIMESTAMP(5),
>  };
>  
> +static const struct iio_chan_spec adis16266_channels[] = {
> +	ADIS_GYRO_CHAN(X, ADIS16260_GYRO_OUT, ADIS16260_SCAN_GYRO,
> +		BIT(IIO_CHAN_INFO_CALIBBIAS) |
> +		BIT(IIO_CHAN_INFO_CALIBSCALE),
> +		BIT(IIO_CHAN_INFO_SAMP_FREQ), 14),
> +	ADIS_TEMP_CHAN(ADIS16260_TEMP_OUT, ADIS16260_SCAN_TEMP,
> +		BIT(IIO_CHAN_INFO_SAMP_FREQ), 12),
> +	ADIS_SUPPLY_CHAN(ADIS16260_SUPPLY_OUT, ADIS16260_SCAN_SUPPLY,
> +		BIT(IIO_CHAN_INFO_SAMP_FREQ), 12),
> +	ADIS_AUX_ADC_CHAN(ADIS16260_AUX_ADC, ADIS16260_SCAN_AUX_ADC,
> +		BIT(IIO_CHAN_INFO_SAMP_FREQ), 12),
> +	IIO_CHAN_SOFT_TIMESTAMP(4),
> +};
> +
> +static const struct adis16260_chip_info adis16260_chip_info_table[] = {
> +	[ADIS16251] = {
> +		.gyro_max_scale = 80,
> +		.gyro_max_val = IIO_RAD_TO_DEGREE(4368),
> +		.channels = adis16260_channels,
> +		.num_channels = ARRAY_SIZE(adis16260_channels),
> +	},
> +	[ADIS16260] = {
> +		.gyro_max_scale = 320,
> +		.gyro_max_val = IIO_RAD_TO_DEGREE(4368),
> +		.channels = adis16260_channels,
> +		.num_channels = ARRAY_SIZE(adis16260_channels),
> +	},
> +	[ADIS16266] = {
> +		.gyro_max_scale = 14000,
> +		.gyro_max_val = IIO_RAD_TO_DEGREE(3357),
> +		.channels = adis16266_channels,
> +		.num_channels = ARRAY_SIZE(adis16266_channels),
> +	},
> +};
> +
> +/* Power down the device */
> +static int adis16260_stop_device(struct iio_dev *indio_dev)
> +{
> +	struct adis16260 *adis16260 = iio_priv(indio_dev);
> +	int ret;
> +	u16 val = ADIS16260_SLP_CNT_POWER_OFF;
> +
> +	ret = adis_write_reg_16(&adis16260->adis, ADIS16260_SLP_CNT, val);
> +	if (ret)
> +		dev_err(&indio_dev->dev, "problem with turning device off: SLP_CNT");
> +
> +	return ret;
> +}
> +
>  static const u8 adis16260_addresses[][2] = {
>  	[ADIS16260_SCAN_GYRO] = { ADIS16260_GYRO_OFF, ADIS16260_GYRO_SCALE },
>  };
> @@ -140,7 +194,9 @@ static int adis16260_read_raw(struct iio_dev *indio_dev,
>  			      int *val, int *val2,
>  			      long mask)
>  {
> -	struct adis *adis = iio_priv(indio_dev);
> +	struct adis16260 *adis16260 = iio_priv(indio_dev);
> +	const struct adis16260_chip_info *info = adis16260->info;
> +	struct adis *adis = &adis16260->adis;
>  	int ret;
>  	u8 addr;
>  	s16 val16;
> @@ -152,15 +208,9 @@ static int adis16260_read_raw(struct iio_dev *indio_dev,
>  	case IIO_CHAN_INFO_SCALE:
>  		switch (chan->type) {
>  		case IIO_ANGL_VEL:
> -			*val = 0;
> -			if (spi_get_device_id(adis->spi)->driver_data) {
> -				/* 0.01832 degree / sec */
> -				*val2 = IIO_DEGREE_TO_RAD(18320);
> -			} else {
> -				/* 0.07326 degree / sec */
> -				*val2 = IIO_DEGREE_TO_RAD(73260);
> -			}
> -			return IIO_VAL_INT_PLUS_MICRO;
> +			*val = info->gyro_max_scale;
> +			*val2 = info->gyro_max_val;
> +			return IIO_VAL_FRACTIONAL;
>  		case IIO_INCLI:
>  			*val = 0;
>  			*val2 = IIO_DEGREE_TO_RAD(36630);
> @@ -224,7 +274,8 @@ static int adis16260_write_raw(struct iio_dev *indio_dev,
>  			       int val2,
>  			       long mask)
>  {
> -	struct adis *adis = iio_priv(indio_dev);
> +	struct adis16260 *adis16260 = iio_priv(indio_dev);
> +	struct adis *adis = &adis16260->adis;
>  	int ret;
>  	u8 addr;
>  	u8 t;
> @@ -305,35 +356,42 @@ static const struct adis_data adis16260_data = {
>  
>  static int adis16260_probe(struct spi_device *spi)
>  {
> +	const struct spi_device_id *id;
> +	struct adis16260 *adis16260;
>  	struct iio_dev *indio_dev;
> -	struct adis *adis;
>  	int ret;
>  
> +	id = spi_get_device_id(spi);
> +	if (!id)
> +		return -ENODEV;
> +
>  	/* setup the industrialio driver allocated elements */
> -	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*adis));
> +	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*adis16260));
>  	if (!indio_dev)
>  		return -ENOMEM;
> -	adis = iio_priv(indio_dev);
> +	adis16260 = iio_priv(indio_dev);
>  	/* this is only used for removal purposes */
>  	spi_set_drvdata(spi, indio_dev);
>  
> -	indio_dev->name = spi_get_device_id(spi)->name;
> +	adis16260->info = &adis16260_chip_info_table[id->driver_data];
> +
> +	indio_dev->name = id->name;
>  	indio_dev->dev.parent = &spi->dev;
>  	indio_dev->info = &adis16260_info;
> -	indio_dev->channels = adis16260_channels;
> -	indio_dev->num_channels = ARRAY_SIZE(adis16260_channels);
> +	indio_dev->channels = adis16260->info->channels;
> +	indio_dev->num_channels = adis16260->info->num_channels;
>  	indio_dev->modes = INDIO_DIRECT_MODE;
>  
> -	ret = adis_init(adis, indio_dev, spi, &adis16260_data);
> +	ret = adis_init(&adis16260->adis, indio_dev, spi, &adis16260_data);
>  	if (ret)
>  		return ret;
>  
> -	ret = adis_setup_buffer_and_trigger(adis, indio_dev, NULL);
> +	ret = adis_setup_buffer_and_trigger(&adis16260->adis, indio_dev, NULL);
>  	if (ret)
>  		return ret;
>  
>  	/* Get the device into a sane initial state */
> -	ret = adis_initial_startup(adis);
> +	ret = adis_initial_startup(&adis16260->adis);
>  	if (ret)
>  		goto error_cleanup_buffer_trigger;
>  	ret = iio_device_register(indio_dev);
> @@ -343,18 +401,18 @@ static int adis16260_probe(struct spi_device *spi)
>  	return 0;
>  
>  error_cleanup_buffer_trigger:
> -	adis_cleanup_buffer_and_trigger(adis, indio_dev);
> +	adis_cleanup_buffer_and_trigger(&adis16260->adis, indio_dev);
>  	return ret;
>  }
>  
>  static int adis16260_remove(struct spi_device *spi)
>  {
>  	struct iio_dev *indio_dev = spi_get_drvdata(spi);
> -	struct adis *adis = iio_priv(indio_dev);
> +	struct adis16260 *adis16260 = iio_priv(indio_dev);
>  
>  	iio_device_unregister(indio_dev);
>  	adis16260_stop_device(indio_dev);
> -	adis_cleanup_buffer_and_trigger(adis, indio_dev);
> +	adis_cleanup_buffer_and_trigger(&adis16260->adis, indio_dev);
>  
>  	return 0;
>  }
> @@ -364,11 +422,12 @@ static int adis16260_remove(struct spi_device *spi)
>   * support for the on chip filtering.
>   */
>  static const struct spi_device_id adis16260_id[] = {
> -	{"adis16260", 0},
> -	{"adis16265", 0},
> -	{"adis16250", 0},
> -	{"adis16255", 0},
> -	{"adis16251", 1},
> +	{"adis16260", ADIS16260},
> +	{"adis16265", ADIS16260},
> +	{"adis16266", ADIS16266},
> +	{"adis16250", ADIS16260},
> +	{"adis16255", ADIS16260},
> +	{"adis16251", ADIS16251},
>  	{}
>  };
>  MODULE_DEVICE_TABLE(spi, adis16260_id);
> 


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

* Re: [PATCH 7/9] iio: adis16400: Add ADIS16367 support
  2015-08-05 13:38 ` [PATCH 7/9] iio: adis16400: Add ADIS16367 support Lars-Peter Clausen
@ 2015-08-08 14:08   ` Jonathan Cameron
  0 siblings, 0 replies; 19+ messages in thread
From: Jonathan Cameron @ 2015-08-08 14:08 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Hartmut Knaack, Peter Meerwald, linux-iio

On 05/08/15 14:38, Lars-Peter Clausen wrote:
> The ADIS16367 is mostly register compatible to the ADIS16360. The only
> difference is the scale factor for the gyroscope output.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied.
> ---
>  drivers/iio/imu/adis16400_core.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
> index e4cc2ec..a9f4043 100644
> --- a/drivers/iio/imu/adis16400_core.c
> +++ b/drivers/iio/imu/adis16400_core.c
> @@ -139,6 +139,7 @@ enum adis16400_chip_variant {
>  	ADIS16360,
>  	ADIS16362,
>  	ADIS16364,
> +	ADIS16367,
>  	ADIS16400,
>  	ADIS16448,
>  };
> @@ -764,6 +765,18 @@ static struct adis16400_chip_info adis16400_chips[] = {
>  		.set_freq = adis16400_set_freq,
>  		.get_freq = adis16400_get_freq,
>  	},
> +	[ADIS16367] = {
> +		.channels = adis16350_channels,
> +		.num_channels = ARRAY_SIZE(adis16350_channels),
> +		.flags = ADIS16400_HAS_PROD_ID | ADIS16400_HAS_SLOW_MODE |
> +				ADIS16400_HAS_SERIAL_NUMBER,
> +		.gyro_scale_micro = IIO_DEGREE_TO_RAD(2000), /* 0.2 deg/s */
> +		.accel_scale_micro = IIO_G_TO_M_S_2(3333), /* 3.333 mg */
> +		.temp_scale_nano = 136000000, /* 0.136 C */
> +		.temp_offset = 25000000 / 136000, /* 25 C = 0x00 */
> +		.set_freq = adis16400_set_freq,
> +		.get_freq = adis16400_get_freq,
> +	},
>  	[ADIS16400] = {
>  		.channels = adis16400_channels,
>  		.num_channels = ARRAY_SIZE(adis16400_channels),
> @@ -936,6 +949,7 @@ static const struct spi_device_id adis16400_id[] = {
>  	{"adis16362", ADIS16362},
>  	{"adis16364", ADIS16364},
>  	{"adis16365", ADIS16360},
> +	{"adis16367", ADIS16367},
>  	{"adis16400", ADIS16400},
>  	{"adis16405", ADIS16400},
>  	{"adis16448", ADIS16448},
> 


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

* Re: [PATCH 8/9] iio: adis16400: Add ADIS16445 support
  2015-08-05 13:38 ` [PATCH 8/9] iio: adis16400: Add ADIS16445 support Lars-Peter Clausen
@ 2015-08-08 14:09   ` Jonathan Cameron
  0 siblings, 0 replies; 19+ messages in thread
From: Jonathan Cameron @ 2015-08-08 14:09 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Hartmut Knaack, Peter Meerwald, linux-iio

On 05/08/15 14:38, Lars-Peter Clausen wrote:
> The ADIS16445 is similar to the ADIS16448, but without the magnetometer and
> pressure channels as well as different scale factors for the gyroscope and
> accelerometer outputs.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied.

Thanks,
> ---
>  drivers/iio/imu/adis16400_core.c | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
> index a9f4043..abc4c50 100644
> --- a/drivers/iio/imu/adis16400_core.c
> +++ b/drivers/iio/imu/adis16400_core.c
> @@ -141,6 +141,7 @@ enum adis16400_chip_variant {
>  	ADIS16364,
>  	ADIS16367,
>  	ADIS16400,
> +	ADIS16445,
>  	ADIS16448,
>  };
>  
> @@ -623,6 +624,17 @@ static const struct iio_chan_spec adis16400_channels[] = {
>  	IIO_CHAN_SOFT_TIMESTAMP(ADIS16400_SCAN_TIMESTAMP),
>  };
>  
> +static const struct iio_chan_spec adis16445_channels[] = {
> +	ADIS16400_GYRO_CHAN(X, ADIS16400_XGYRO_OUT, 16),
> +	ADIS16400_GYRO_CHAN(Y, ADIS16400_YGYRO_OUT, 16),
> +	ADIS16400_GYRO_CHAN(Z, ADIS16400_ZGYRO_OUT, 16),
> +	ADIS16400_ACCEL_CHAN(X, ADIS16400_XACCL_OUT, 16),
> +	ADIS16400_ACCEL_CHAN(Y, ADIS16400_YACCL_OUT, 16),
> +	ADIS16400_ACCEL_CHAN(Z, ADIS16400_ZACCL_OUT, 16),
> +	ADIS16400_TEMP_CHAN(ADIS16448_TEMP_OUT, 12),
> +	IIO_CHAN_SOFT_TIMESTAMP(ADIS16400_SCAN_TIMESTAMP),
> +};
> +
>  static const struct iio_chan_spec adis16448_channels[] = {
>  	ADIS16400_GYRO_CHAN(X, ADIS16400_XGYRO_OUT, 16),
>  	ADIS16400_GYRO_CHAN(Y, ADIS16400_YGYRO_OUT, 16),
> @@ -788,6 +800,19 @@ static struct adis16400_chip_info adis16400_chips[] = {
>  		.set_freq = adis16400_set_freq,
>  		.get_freq = adis16400_get_freq,
>  	},
> +	[ADIS16445] = {
> +		.channels = adis16445_channels,
> +		.num_channels = ARRAY_SIZE(adis16445_channels),
> +		.flags = ADIS16400_HAS_PROD_ID |
> +				ADIS16400_HAS_SERIAL_NUMBER |
> +				ADIS16400_BURST_DIAG_STAT,
> +		.gyro_scale_micro = IIO_DEGREE_TO_RAD(10000), /* 0.01 deg/s */
> +		.accel_scale_micro = IIO_G_TO_M_S_2(250), /* 1/4000 g */
> +		.temp_scale_nano = 73860000, /* 0.07386 C */
> +		.temp_offset = 31000000 / 73860, /* 31 C = 0x00 */
> +		.set_freq = adis16334_set_freq,
> +		.get_freq = adis16334_get_freq,
> +	},
>  	[ADIS16448] = {
>  		.channels = adis16448_channels,
>  		.num_channels = ARRAY_SIZE(adis16448_channels),
> @@ -952,6 +977,7 @@ static const struct spi_device_id adis16400_id[] = {
>  	{"adis16367", ADIS16367},
>  	{"adis16400", ADIS16400},
>  	{"adis16405", ADIS16400},
> +	{"adis16445", ADIS16445},
>  	{"adis16448", ADIS16448},
>  	{}
>  };
> 


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

* Re: [PATCH 9/9] iio: adis16136: Add ADIS16137 support
  2015-08-05 13:38 ` [PATCH 9/9] iio: adis16136: Add ADIS16137 support Lars-Peter Clausen
@ 2015-08-08 14:10   ` Jonathan Cameron
  0 siblings, 0 replies; 19+ messages in thread
From: Jonathan Cameron @ 2015-08-08 14:10 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Hartmut Knaack, Peter Meerwald, linux-iio

On 05/08/15 14:38, Lars-Peter Clausen wrote:
> The ADIS16137 is register map compatible to the ADIS16136, but has a
> different scale factor for the gyroscope output.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied - as usual initially pushed out as testing to let the autobuilder
do all the hardwork (remember when one locally built the patches for
a couple of architectures before pushing everything? - isn't it nice now
to do a cursory check and let the experts take over ;)

Thanks

Jonathan
> ---
>  drivers/iio/gyro/adis16136.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/iio/gyro/adis16136.c b/drivers/iio/gyro/adis16136.c
> index 591bd55..26de876 100644
> --- a/drivers/iio/gyro/adis16136.c
> +++ b/drivers/iio/gyro/adis16136.c
> @@ -473,6 +473,7 @@ enum adis16136_id {
>  	ID_ADIS16133,
>  	ID_ADIS16135,
>  	ID_ADIS16136,
> +	ID_ADIS16137,
>  };
>  
>  static const struct adis16136_chip_info adis16136_chip_info[] = {
> @@ -488,6 +489,10 @@ static const struct adis16136_chip_info adis16136_chip_info[] = {
>  		.precision = IIO_DEGREE_TO_RAD(450),
>  		.fullscale = 24623,
>  	},
> +	[ID_ADIS16137] = {
> +		.precision = IIO_DEGREE_TO_RAD(1000),
> +		.fullscale = 24609,
> +	},
>  };
>  
>  static int adis16136_probe(struct spi_device *spi)
> @@ -557,6 +562,7 @@ static const struct spi_device_id adis16136_ids[] = {
>  	{ "adis16133", ID_ADIS16133 },
>  	{ "adis16135", ID_ADIS16135 },
>  	{ "adis16136", ID_ADIS16136 },
> +	{ "adis16137", ID_ADIS16137 },
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(spi, adis16136_ids);
> 


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

end of thread, other threads:[~2015-08-08 14:10 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-05 13:38 [PATCH 0/9] iio: adis updates Lars-Peter Clausen
2015-08-05 13:38 ` [PATCH 1/9] iio: adis16400: Fix adis16448 gyroscope scale Lars-Peter Clausen
2015-08-08 11:48   ` Jonathan Cameron
2015-08-05 13:38 ` [PATCH 2/9] iio: Add inverse unit conversion macros Lars-Peter Clausen
2015-08-08 11:51   ` Jonathan Cameron
2015-08-05 13:38 ` [PATCH 3/9] iio: adis16480: Fix scale factors Lars-Peter Clausen
2015-08-08 11:52   ` Jonathan Cameron
2015-08-05 13:38 ` [PATCH 4/9] iio: adis16400: adis16300 has product ID and serial number Lars-Peter Clausen
2015-08-08 11:54   ` Jonathan Cameron
2015-08-05 13:38 ` [PATCH 5/9] iio: adis16400: Add ADIS16305 support Lars-Peter Clausen
2015-08-08 11:54   ` Jonathan Cameron
2015-08-05 13:38 ` [PATCH 6/9] iio: adis16260: Add ADIS16266 support Lars-Peter Clausen
2015-08-08 11:58   ` Jonathan Cameron
2015-08-05 13:38 ` [PATCH 7/9] iio: adis16400: Add ADIS16367 support Lars-Peter Clausen
2015-08-08 14:08   ` Jonathan Cameron
2015-08-05 13:38 ` [PATCH 8/9] iio: adis16400: Add ADIS16445 support Lars-Peter Clausen
2015-08-08 14:09   ` Jonathan Cameron
2015-08-05 13:38 ` [PATCH 9/9] iio: adis16136: Add ADIS16137 support Lars-Peter Clausen
2015-08-08 14:10   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).