From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH 03/13] staging:iio:adc Add IIO_CHAN_INFO_RAW entries to all drivers.
Date: Fri, 13 Apr 2012 16:35:04 +0200 [thread overview]
Message-ID: <4F883998.3040403@metafoo.de> (raw)
In-Reply-To: <1334311471-23054-4-git-send-email-jic23@kernel.org>
On 04/13/2012 12:04 PM, Jonathan Cameron wrote:
> Precursor to making value read / write attribute optional.
> No processed values for adc's.
>
> Updated to include the spear adc driver (hence introducing a
> dependency on the patch that adds that driver).
>
> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
> ---
> [...]
> diff --git a/drivers/staging/iio/adc/lpc32xx_adc.c b/drivers/staging/iio/adc/lpc32xx_adc.c
> index dfc9033..0733d89 100644
> --- a/drivers/staging/iio/adc/lpc32xx_adc.c
> +++ b/drivers/staging/iio/adc/lpc32xx_adc.c
> @@ -73,7 +73,7 @@ static int lpc32xx_read_raw(struct iio_dev *indio_dev,
> {
> struct lpc32xx_adc_info *info = iio_priv(indio_dev);
>
> - if (mask == 0) {
> + if (mask == IIO_CHAN_INFO_RAW) {
> mutex_lock(&indio_dev->mlock);
> clk_enable(info->clk);
> /* Measurement setup */
> @@ -98,12 +98,13 @@ static const struct iio_info lpc32xx_adc_iio_info = {
> .driver_module = THIS_MODULE,
> };
>
> -#define LPC32XX_ADC_CHANNEL(_index) { \
> - .type = IIO_VOLTAGE, \
> - .indexed = 1, \
> - .channel = _index, \
> - .address = AD_IN * _index, \
> - .scan_index = _index, \
> +#define LPC32XX_ADC_CHANNEL(_index) { \
> + .type = IIO_VOLTAGE, \
> + .indexed = 1, \
> + .channel = _index, \
> + .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, \
This looks a bit odd.
> + .address = AD_IN * _index, \
> + .scan_index = _index, \
> }
next prev parent reply other threads:[~2012-04-13 14:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 10:04 [PATCH 00/13 V2] IIO: Make the value attribute optional for channels Jonathan Cameron
2012-04-13 10:04 ` [PATCH 01/13] staging:iio: add a raw and processed elements to info_mask Jonathan Cameron
2012-04-13 10:04 ` [PATCH 02/13] staging:iio:accel Add IIO_CHAN_INFO_RAW entries to all drivers Jonathan Cameron
2012-04-13 14:33 ` Lars-Peter Clausen
2012-04-13 10:04 ` [PATCH 03/13] staging:iio:adc " Jonathan Cameron
2012-04-13 14:35 ` Lars-Peter Clausen [this message]
2012-04-13 10:04 ` [PATCH 04/13] staging:iio:dac " Jonathan Cameron
2012-04-13 10:04 ` [PATCH 05/13] staging:iio:gyro " Jonathan Cameron
2012-04-13 10:04 ` [PATCH 06/13] staging:iio:imu " Jonathan Cameron
2012-04-13 10:04 ` [PATCH 07/13] staging:iio:light Add IIO_CHAN_INFO_RAW/PROCESSED " Jonathan Cameron
2012-04-13 10:04 ` [PATCH 08/13] staging:iio:magnetometer Add IIO_CHAN_INFO_RAW " Jonathan Cameron
2012-04-13 10:04 ` [PATCH 09/13] staging:iio:resolver " Jonathan Cameron
2012-04-13 10:04 ` [PATCH 10/13] staging:iio:impedance Add IIO_CHAN_INFO_RAW/PROCESSED " Jonathan Cameron
2012-04-13 10:04 ` [PATCH 11/13] staging:iio:cdc " Jonathan Cameron
2012-04-13 10:04 ` [PATCH 12/13] staging:iio: Make read / write attributes for channel values optional Jonathan Cameron
2012-04-13 10:04 ` [PATCH 13/13] staging:iio: drop procesed_val element of chan_spec Jonathan Cameron
2012-04-13 10:37 ` Lars-Peter Clausen
2012-04-13 10:39 ` Jonathan Cameron
2012-04-13 14:31 ` [PATCH 00/13 V2] IIO: Make the value attribute optional for channels Lars-Peter Clausen
2012-04-13 15:06 ` 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=4F883998.3040403@metafoo.de \
--to=lars@metafoo.de \
--cc=jic23@kernel.org \
--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).