linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH 4/4] staging:iio:adis16400: Fix ADIS163xx AUX_ADC address
Date: Fri, 15 Jun 2012 13:40:51 +0100	[thread overview]
Message-ID: <4FDB2D53.6070603@cam.ac.uk> (raw)
In-Reply-To: <1339748926-4002-4-git-send-email-lars@metafoo.de>

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),
>   	},


  reply	other threads:[~2012-06-15 12:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-06-15 12:38 ` [PATCH 1/4] staging:iio:adis16400: Fix ADIS16300 ROLL_OUT register address Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2012-06-15 16:11 Lars-Peter Clausen
2012-06-15 16:11 ` [PATCH 4/4] staging:iio:adis16400: Fix ADIS163xx AUX_ADC address Lars-Peter Clausen

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=4FDB2D53.6070603@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    /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 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).