* [PATCH 1/4] staging:iio:adis16400: Fix ADIS16300 ROLL_OUT register address
@ 2012-06-15 8:28 Lars-Peter Clausen
2012-06-15 8:28 ` [PATCH 2/4] staging:iio:adis16400: Fix ADIS16300 temperature address Lars-Peter Clausen
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Lars-Peter Clausen @ 2012-06-15 8:28 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-iio, Lars-Peter Clausen
In the current driver ROLL_OUT register address is the same as the PITCH_OUT
register address. This patch fixes it to use the correct address.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
drivers/staging/iio/imu/adis16400.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/imu/adis16400.h b/drivers/staging/iio/imu/adis16400.h
index 83d133e..1f4e987 100644
--- a/drivers/staging/iio/imu/adis16400.h
+++ b/drivers/staging/iio/imu/adis16400.h
@@ -42,7 +42,7 @@
#define ADIS16350_ZTEMP_OUT 0x14 /* Z-axis gyroscope temperature measurement */
#define ADIS16300_PITCH_OUT 0x12 /* X axis inclinometer output measurement */
-#define ADIS16300_ROLL_OUT 0x12 /* Y axis inclinometer output measurement */
+#define ADIS16300_ROLL_OUT 0x14 /* Y axis inclinometer output measurement */
/* Calibration parameters */
#define ADIS16400_XGYRO_OFF 0x1A /* X-axis gyroscope bias offset factor */
--
1.7.10
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] staging:iio:adis16400: Fix ADIS16300 temperature address
2012-06-15 8:28 [PATCH 1/4] staging:iio:adis16400: Fix ADIS16300 ROLL_OUT register address Lars-Peter Clausen
@ 2012-06-15 8:28 ` Lars-Peter Clausen
2012-06-15 12:39 ` Jonathan Cameron
2012-06-15 8:28 ` [PATCH 3/4] staging:iio:adis16400: Fix ADIS16334 " Lars-Peter Clausen
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Lars-Peter Clausen @ 2012-06-15 8:28 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-iio, Lars-Peter Clausen
The ADIS16300 uses the same address for the temperature register as the
ADIS16350 and not the ADIS16400.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
drivers/staging/iio/imu/adis16400_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/imu/adis16400_core.c b/drivers/staging/iio/imu/adis16400_core.c
index 1f6bd85..1c9931e 100644
--- a/drivers/staging/iio/imu/adis16400_core.c
+++ b/drivers/staging/iio/imu/adis16400_core.c
@@ -946,7 +946,7 @@ static struct iio_chan_spec adis16300_channels[] = {
.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
IIO_CHAN_INFO_OFFSET_SEPARATE_BIT |
IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
- .address = temp,
+ .address = temp0,
.scan_index = ADIS16400_SCAN_TEMP,
.scan_type = IIO_ST('s', 12, 16, 0),
}, {
--
1.7.10
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] staging:iio:adis16400: Fix ADIS16334 temperature address
2012-06-15 8:28 [PATCH 1/4] staging:iio:adis16400: Fix ADIS16300 ROLL_OUT register address Lars-Peter Clausen
2012-06-15 8:28 ` [PATCH 2/4] staging:iio:adis16400: Fix ADIS16300 temperature address Lars-Peter Clausen
@ 2012-06-15 8:28 ` Lars-Peter Clausen
2012-06-15 12:40 ` Jonathan Cameron
2012-06-15 8:28 ` [PATCH 4/4] staging:iio:adis16400: Fix ADIS163xx AUX_ADC address Lars-Peter Clausen
2012-06-15 12:38 ` [PATCH 1/4] staging:iio:adis16400: Fix ADIS16300 ROLL_OUT register address Jonathan Cameron
3 siblings, 1 reply; 9+ messages in thread
From: Lars-Peter Clausen @ 2012-06-15 8:28 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-iio, Lars-Peter Clausen
The channel spec for ADUS16334's temperature channel uses the address and scan
index for the Z-axis acceleration channel. This patch fixes it to use the
temperature channel address and scan index instead.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
drivers/staging/iio/imu/adis16400_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/iio/imu/adis16400_core.c b/drivers/staging/iio/imu/adis16400_core.c
index 1c9931e..7aa3a9a 100644
--- a/drivers/staging/iio/imu/adis16400_core.c
+++ b/drivers/staging/iio/imu/adis16400_core.c
@@ -1054,8 +1054,8 @@ static const struct iio_chan_spec adis16334_channels[] = {
.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT |
IIO_CHAN_INFO_SCALE_SHARED_BIT,
- .address = accel_z,
- .scan_index = ADIS16400_SCAN_ACC_Z,
+ .address = temp0,
+ .scan_index = ADIS16400_SCAN_TEMP,
.scan_type = IIO_ST('s', 14, 16, 0),
},
IIO_CHAN_SOFT_TIMESTAMP(12)
--
1.7.10
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] staging:iio:adis16400: Fix ADIS163xx AUX_ADC address
2012-06-15 8:28 [PATCH 1/4] staging:iio:adis16400: Fix ADIS16300 ROLL_OUT register address Lars-Peter Clausen
2012-06-15 8:28 ` [PATCH 2/4] staging:iio:adis16400: Fix ADIS16300 temperature address Lars-Peter Clausen
2012-06-15 8:28 ` [PATCH 3/4] staging:iio:adis16400: Fix ADIS16334 " Lars-Peter Clausen
@ 2012-06-15 8:28 ` Lars-Peter Clausen
2012-06-15 12:40 ` Jonathan Cameron
2012-06-15 12:38 ` [PATCH 1/4] staging:iio:adis16400: Fix ADIS16300 ROLL_OUT register address Jonathan Cameron
3 siblings, 1 reply; 9+ messages in thread
From: Lars-Peter Clausen @ 2012-06-15 8:28 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-iio, Lars-Peter Clausen
The ADIS163xx variants use a different register address for the auxiliary ADC
channel than the ADIS16400. This patch fixes them to use the correct address.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
drivers/staging/iio/imu/adis16400.h | 1 +
drivers/staging/iio/imu/adis16400_core.c | 8 +++++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/iio/imu/adis16400.h b/drivers/staging/iio/imu/adis16400.h
index 1f4e987..9dd9f14 100644
--- a/drivers/staging/iio/imu/adis16400.h
+++ b/drivers/staging/iio/imu/adis16400.h
@@ -43,6 +43,7 @@
#define ADIS16300_PITCH_OUT 0x12 /* X axis inclinometer output measurement */
#define ADIS16300_ROLL_OUT 0x14 /* Y axis inclinometer output measurement */
+#define ADIS16300_AUX_ADC 0x16 /* Auxiliary ADC measurement */
/* Calibration parameters */
#define ADIS16400_XGYRO_OFF 0x1A /* X-axis gyroscope bias offset factor */
diff --git a/drivers/staging/iio/imu/adis16400_core.c b/drivers/staging/iio/imu/adis16400_core.c
index 7aa3a9a..3873014 100644
--- a/drivers/staging/iio/imu/adis16400_core.c
+++ b/drivers/staging/iio/imu/adis16400_core.c
@@ -472,11 +472,12 @@ enum adis16400_chan {
temp,
temp0, temp1, temp2,
in1,
+ in2,
incli_x,
incli_y,
};
-static u8 adis16400_addresses[17][2] = {
+static u8 adis16400_addresses[18][2] = {
[in_supply] = { ADIS16400_SUPPLY_OUT },
[gyro_x] = { ADIS16400_XGYRO_OUT, ADIS16400_XGYRO_OFF },
[gyro_y] = { ADIS16400_YGYRO_OUT, ADIS16400_YGYRO_OFF },
@@ -491,7 +492,8 @@ static u8 adis16400_addresses[17][2] = {
[temp0] = { ADIS16350_XTEMP_OUT },
[temp1] = { ADIS16350_YTEMP_OUT },
[temp2] = { ADIS16350_ZTEMP_OUT },
- [in1] = { ADIS16400_AUX_ADC },
+ [in1] = { ADIS16300_AUX_ADC },
+ [in2] = { ADIS16400_AUX_ADC },
[incli_x] = { ADIS16300_PITCH_OUT },
[incli_y] = { ADIS16300_ROLL_OUT }
};
@@ -752,7 +754,7 @@ static struct iio_chan_spec adis16400_channels[] = {
.channel = 1,
.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
- .address = in1,
+ .address = in2,
.scan_index = ADIS16400_SCAN_ADC_0,
.scan_type = IIO_ST('s', 12, 16, 0),
},
--
1.7.10
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/4] staging:iio:adis16400: Fix ADIS16300 ROLL_OUT register address
2012-06-15 8:28 [PATCH 1/4] staging:iio:adis16400: Fix ADIS16300 ROLL_OUT register address Lars-Peter Clausen
` (2 preceding siblings ...)
2012-06-15 8:28 ` [PATCH 4/4] staging:iio:adis16400: Fix ADIS163xx AUX_ADC address Lars-Peter Clausen
@ 2012-06-15 12:38 ` Jonathan Cameron
3 siblings, 0 replies; 9+ messages in thread
From: Jonathan Cameron @ 2012-06-15 12:38 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: linux-iio
On 6/15/2012 9:28 AM, Lars-Peter Clausen wrote:
> In the current driver ROLL_OUT register address is the same as the PITCH_OUT
> register address. This patch fixes it to use the correct address.
>
> Signed-off-by: Lars-Peter Clausen<lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
> ---
> drivers/staging/iio/imu/adis16400.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/imu/adis16400.h b/drivers/staging/iio/imu/adis16400.h
> index 83d133e..1f4e987 100644
> --- a/drivers/staging/iio/imu/adis16400.h
> +++ b/drivers/staging/iio/imu/adis16400.h
> @@ -42,7 +42,7 @@
> #define ADIS16350_ZTEMP_OUT 0x14 /* Z-axis gyroscope temperature measurement */
>
> #define ADIS16300_PITCH_OUT 0x12 /* X axis inclinometer output measurement */
> -#define ADIS16300_ROLL_OUT 0x12 /* Y axis inclinometer output measurement */
> +#define ADIS16300_ROLL_OUT 0x14 /* Y axis inclinometer output measurement */
>
> /* Calibration parameters */
> #define ADIS16400_XGYRO_OFF 0x1A /* X-axis gyroscope bias offset factor */
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/4] staging:iio:adis16400: Fix ADIS16300 temperature address
2012-06-15 8:28 ` [PATCH 2/4] staging:iio:adis16400: Fix ADIS16300 temperature address Lars-Peter Clausen
@ 2012-06-15 12:39 ` Jonathan Cameron
0 siblings, 0 replies; 9+ messages in thread
From: Jonathan Cameron @ 2012-06-15 12:39 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: linux-iio
On 6/15/2012 9:28 AM, Lars-Peter Clausen wrote:
> The ADIS16300 uses the same address for the temperature register as the
> ADIS16350 and not the ADIS16400.
oops.
>
> Signed-off-by: Lars-Peter Clausen<lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
> ---
> drivers/staging/iio/imu/adis16400_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/imu/adis16400_core.c b/drivers/staging/iio/imu/adis16400_core.c
> index 1f6bd85..1c9931e 100644
> --- a/drivers/staging/iio/imu/adis16400_core.c
> +++ b/drivers/staging/iio/imu/adis16400_core.c
> @@ -946,7 +946,7 @@ static struct iio_chan_spec adis16300_channels[] = {
> .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
> IIO_CHAN_INFO_OFFSET_SEPARATE_BIT |
> IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
> - .address = temp,
> + .address = temp0,
> .scan_index = ADIS16400_SCAN_TEMP,
> .scan_type = IIO_ST('s', 12, 16, 0),
> }, {
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/4] staging:iio:adis16400: Fix ADIS16334 temperature address
2012-06-15 8:28 ` [PATCH 3/4] staging:iio:adis16400: Fix ADIS16334 " Lars-Peter Clausen
@ 2012-06-15 12:40 ` Jonathan Cameron
0 siblings, 0 replies; 9+ messages in thread
From: Jonathan Cameron @ 2012-06-15 12:40 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: linux-iio
On 6/15/2012 9:28 AM, Lars-Peter Clausen wrote:
> The channel spec for ADUS16334's temperature channel uses the address and scan
> index for the Z-axis acceleration channel. This patch fixes it to use the
> temperature channel address and scan index instead.
>
doh, that one is particularly bad (and obvious!) Thanks,
> Signed-off-by: Lars-Peter Clausen<lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
> ---
> drivers/staging/iio/imu/adis16400_core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/iio/imu/adis16400_core.c b/drivers/staging/iio/imu/adis16400_core.c
> index 1c9931e..7aa3a9a 100644
> --- a/drivers/staging/iio/imu/adis16400_core.c
> +++ b/drivers/staging/iio/imu/adis16400_core.c
> @@ -1054,8 +1054,8 @@ static const struct iio_chan_spec adis16334_channels[] = {
> .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
> IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT |
> IIO_CHAN_INFO_SCALE_SHARED_BIT,
> - .address = accel_z,
> - .scan_index = ADIS16400_SCAN_ACC_Z,
> + .address = temp0,
> + .scan_index = ADIS16400_SCAN_TEMP,
> .scan_type = IIO_ST('s', 14, 16, 0),
> },
> IIO_CHAN_SOFT_TIMESTAMP(12)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/4] staging:iio:adis16400: Fix ADIS163xx AUX_ADC address
2012-06-15 8:28 ` [PATCH 4/4] staging:iio:adis16400: Fix ADIS163xx AUX_ADC address Lars-Peter Clausen
@ 2012-06-15 12:40 ` Jonathan Cameron
0 siblings, 0 replies; 9+ messages in thread
From: Jonathan Cameron @ 2012-06-15 12:40 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: linux-iio
On 6/15/2012 9:28 AM, Lars-Peter Clausen wrote:
> The ADIS163xx variants use a different register address for the auxiliary ADC
> channel than the ADIS16400. This patch fixes them to use the correct address.
Ah well, guess I never bothered testing that channel with an actual
voltage.. oops.
>
> Signed-off-by: Lars-Peter Clausen<lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
> ---
> drivers/staging/iio/imu/adis16400.h | 1 +
> drivers/staging/iio/imu/adis16400_core.c | 8 +++++---
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/iio/imu/adis16400.h b/drivers/staging/iio/imu/adis16400.h
> index 1f4e987..9dd9f14 100644
> --- a/drivers/staging/iio/imu/adis16400.h
> +++ b/drivers/staging/iio/imu/adis16400.h
> @@ -43,6 +43,7 @@
>
> #define ADIS16300_PITCH_OUT 0x12 /* X axis inclinometer output measurement */
> #define ADIS16300_ROLL_OUT 0x14 /* Y axis inclinometer output measurement */
> +#define ADIS16300_AUX_ADC 0x16 /* Auxiliary ADC measurement */
>
> /* Calibration parameters */
> #define ADIS16400_XGYRO_OFF 0x1A /* X-axis gyroscope bias offset factor */
> diff --git a/drivers/staging/iio/imu/adis16400_core.c b/drivers/staging/iio/imu/adis16400_core.c
> index 7aa3a9a..3873014 100644
> --- a/drivers/staging/iio/imu/adis16400_core.c
> +++ b/drivers/staging/iio/imu/adis16400_core.c
> @@ -472,11 +472,12 @@ enum adis16400_chan {
> temp,
> temp0, temp1, temp2,
> in1,
> + in2,
> incli_x,
> incli_y,
> };
>
> -static u8 adis16400_addresses[17][2] = {
> +static u8 adis16400_addresses[18][2] = {
> [in_supply] = { ADIS16400_SUPPLY_OUT },
> [gyro_x] = { ADIS16400_XGYRO_OUT, ADIS16400_XGYRO_OFF },
> [gyro_y] = { ADIS16400_YGYRO_OUT, ADIS16400_YGYRO_OFF },
> @@ -491,7 +492,8 @@ static u8 adis16400_addresses[17][2] = {
> [temp0] = { ADIS16350_XTEMP_OUT },
> [temp1] = { ADIS16350_YTEMP_OUT },
> [temp2] = { ADIS16350_ZTEMP_OUT },
> - [in1] = { ADIS16400_AUX_ADC },
> + [in1] = { ADIS16300_AUX_ADC },
> + [in2] = { ADIS16400_AUX_ADC },
> [incli_x] = { ADIS16300_PITCH_OUT },
> [incli_y] = { ADIS16300_ROLL_OUT }
> };
> @@ -752,7 +754,7 @@ static struct iio_chan_spec adis16400_channels[] = {
> .channel = 1,
> .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
> IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
> - .address = in1,
> + .address = in2,
> .scan_index = ADIS16400_SCAN_ADC_0,
> .scan_type = IIO_ST('s', 12, 16, 0),
> },
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4] staging:iio:adis16400: Fix ADIS16334 temperature address
2012-06-15 16:11 Lars-Peter Clausen
@ 2012-06-15 16:11 ` Lars-Peter Clausen
0 siblings, 0 replies; 9+ messages in thread
From: Lars-Peter Clausen @ 2012-06-15 16:11 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Jonathan Cameron, devel, linux-iio, Lars-Peter Clausen
The channel spec for ADUS16334's temperature channel uses the address and scan
index for the Z-axis acceleration channel. This patch fixes it to use the
temperature channel address and scan index instead.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
---
drivers/staging/iio/imu/adis16400_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/iio/imu/adis16400_core.c b/drivers/staging/iio/imu/adis16400_core.c
index 1c9931e..7aa3a9a 100644
--- a/drivers/staging/iio/imu/adis16400_core.c
+++ b/drivers/staging/iio/imu/adis16400_core.c
@@ -1054,8 +1054,8 @@ static const struct iio_chan_spec adis16334_channels[] = {
.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT |
IIO_CHAN_INFO_SCALE_SHARED_BIT,
- .address = accel_z,
- .scan_index = ADIS16400_SCAN_ACC_Z,
+ .address = temp0,
+ .scan_index = ADIS16400_SCAN_TEMP,
.scan_type = IIO_ST('s', 14, 16, 0),
},
IIO_CHAN_SOFT_TIMESTAMP(12)
--
1.7.10
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-06-15 16:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-15 8:28 [PATCH 1/4] staging:iio:adis16400: Fix ADIS16300 ROLL_OUT register address Lars-Peter Clausen
2012-06-15 8:28 ` [PATCH 2/4] staging:iio:adis16400: Fix ADIS16300 temperature address Lars-Peter Clausen
2012-06-15 12:39 ` Jonathan Cameron
2012-06-15 8:28 ` [PATCH 3/4] staging:iio:adis16400: Fix ADIS16334 " Lars-Peter Clausen
2012-06-15 12:40 ` Jonathan Cameron
2012-06-15 8:28 ` [PATCH 4/4] staging:iio:adis16400: Fix ADIS163xx AUX_ADC address Lars-Peter Clausen
2012-06-15 12:40 ` Jonathan Cameron
2012-06-15 12:38 ` [PATCH 1/4] staging:iio:adis16400: Fix ADIS16300 ROLL_OUT register address Jonathan Cameron
2012-06-15 16:11 Lars-Peter Clausen
2012-06-15 16:11 ` [PATCH 3/4] staging:iio:adis16400: Fix ADIS16334 temperature address Lars-Peter Clausen
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.