From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>,
Hartmut Knaack <knaack.h@gmx.de>,
Peter Meerwald <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org, Paul Cercueil <paul.cercueil@analog.com>
Subject: Re: [PATCH 2/5] iio: adis16400: Use != channel indices for the two voltage channels
Date: Sat, 16 May 2015 10:57:38 +0100 [thread overview]
Message-ID: <55571492.3080605@kernel.org> (raw)
In-Reply-To: <1431703118-32676-3-git-send-email-lars@metafoo.de>
On 15/05/15 16:18, Lars-Peter Clausen wrote:
> From: Paul Cercueil <paul.cercueil@analog.com>
>
> Previously, the two voltage channels had the same ID, which didn't cause
> conflicts in sysfs only because one channel is named and the other isn't;
> this is still violating the spec though, two indexed channels should never
> have the same index.
>
> Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied to fixes-togreg branch, marked for stable.
> ---
> drivers/iio/imu/adis16400_core.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
> index 8de6427..7b63788 100644
> --- a/drivers/iio/imu/adis16400_core.c
> +++ b/drivers/iio/imu/adis16400_core.c
> @@ -459,10 +459,10 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
> }
> }
>
> -#define ADIS16400_VOLTAGE_CHAN(addr, bits, name, si) { \
> +#define ADIS16400_VOLTAGE_CHAN(addr, bits, name, si, chn) { \
> .type = IIO_VOLTAGE, \
> .indexed = 1, \
> - .channel = 0, \
> + .channel = chn, \
> .extend_name = name, \
> .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \
> BIT(IIO_CHAN_INFO_SCALE), \
> @@ -479,10 +479,10 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
> }
>
> #define ADIS16400_SUPPLY_CHAN(addr, bits) \
> - ADIS16400_VOLTAGE_CHAN(addr, bits, "supply", ADIS16400_SCAN_SUPPLY)
> + ADIS16400_VOLTAGE_CHAN(addr, bits, "supply", ADIS16400_SCAN_SUPPLY, 0)
>
> #define ADIS16400_AUX_ADC_CHAN(addr, bits) \
> - ADIS16400_VOLTAGE_CHAN(addr, bits, NULL, ADIS16400_SCAN_ADC)
> + ADIS16400_VOLTAGE_CHAN(addr, bits, NULL, ADIS16400_SCAN_ADC, 1)
>
> #define ADIS16400_GYRO_CHAN(mod, addr, bits) { \
> .type = IIO_ANGL_VEL, \
>
next prev parent reply other threads:[~2015-05-16 9:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 15:18 [PATCH 0/5] iio: adis16400 fixes Lars-Peter Clausen
2015-05-15 15:18 ` [PATCH 1/5] iio: adis16400: Report pressure channel scale Lars-Peter Clausen
2015-05-16 9:56 ` Jonathan Cameron
2015-05-15 15:18 ` [PATCH 2/5] iio: adis16400: Use != channel indices for the two voltage channels Lars-Peter Clausen
2015-05-16 9:57 ` Jonathan Cameron [this message]
2015-05-15 15:18 ` [PATCH 3/5] iio: adis16400: Compute the scan mask from channel indices Lars-Peter Clausen
2015-05-16 9:59 ` Jonathan Cameron
2015-05-15 15:18 ` [PATCH 4/5] iio: adis16400: Fix burst mode Lars-Peter Clausen
2015-05-16 10:00 ` Jonathan Cameron
2015-05-15 15:18 ` [PATCH 5/5] iio: adis16400: Fix burst transfer for adis16448 Lars-Peter Clausen
2015-05-16 10:01 ` Jonathan Cameron
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=55571492.3080605@kernel.org \
--to=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=paul.cercueil@analog.com \
--cc=pmeerw@pmeerw.net \
/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