From: Jonathan Cameron <jic23@kernel.org>
To: Stefan Wahren <stefan.wahren@i2se.com>
Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
marex@denx.de, fabio.estevam@freescale.com,
alexandre.belloni@free-electrons.com, robert.hodaszi@digi.com,
linux-iio@vger.kernel.org
Subject: Re: [PATCH V2] iio: mxs-lradc: fix iio channel map regression
Date: Sun, 04 Jan 2015 11:04:12 +0000 [thread overview]
Message-ID: <54A91E2C.7070109@kernel.org> (raw)
In-Reply-To: <1420317252-19761-1-git-send-email-stefan.wahren@i2se.com>
On 03/01/15 20:34, Stefan Wahren wrote:
> Since commit c8231a9af8147f8a ("iio: mxs-lradc: compute temperature
> from channel 8 and 9") with the removal of adc channel 9 there is
> no 1-1 mapping in the channel spec.
>
> All hwmon channel values above 9 are accessible via there index minus
> one. So add a hidden iio channel 9 to fix this issue.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
I'll have to hold this for a bit. I'm running rather behind with
pull requests so my fixes tree is still pre the last release and
hence doesn't have the patch that caused the problem yet...
Should unwind that this week.
Jonathan
> ---
> Changes in V2:
> - define hidden channel instead of a bogus one
>
> drivers/staging/iio/adc/mxs-lradc.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
> index d9d6fad..594684d 100644
> --- a/drivers/staging/iio/adc/mxs-lradc.c
> +++ b/drivers/staging/iio/adc/mxs-lradc.c
> @@ -1413,6 +1413,13 @@ static const struct iio_chan_spec mxs_lradc_chan_spec[] = {
> .channel = 8,
> .scan_type = {.sign = 'u', .realbits = 18, .storagebits = 32,},
> },
> + /* Hidden channel to keep indexes */
> + {
> + .type = IIO_TEMP,
> + .indexed = 1,
> + .scan_index = -1,
> + .channel = 9,
> + },
> MXS_ADC_CHAN(10, IIO_VOLTAGE), /* VDDIO */
> MXS_ADC_CHAN(11, IIO_VOLTAGE), /* VTH */
> MXS_ADC_CHAN(12, IIO_VOLTAGE), /* VDDA */
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2015-01-04 11:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-03 20:34 [PATCH V2] iio: mxs-lradc: fix iio channel map regression Stefan Wahren
2015-01-03 21:08 ` Alexandre Belloni
2015-01-04 0:02 ` Marek Vasut
2015-01-04 11:04 ` Jonathan Cameron [this message]
2015-01-04 11:39 ` Stefan Wahren
2015-02-01 10:14 ` Jonathan Cameron
2015-02-01 17:21 ` Stefan Wahren
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=54A91E2C.7070109@kernel.org \
--to=jic23@kernel.org \
--cc=alexandre.belloni@free-electrons.com \
--cc=fabio.estevam@freescale.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=marex@denx.de \
--cc=pmeerw@pmeerw.net \
--cc=robert.hodaszi@digi.com \
--cc=stefan.wahren@i2se.com \
/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).