Re: [PATCH 03/13] staging:iio:adc Add IIO_CHAN_INFO_RAW entries to all drivers.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
> [...]
> 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,				\
>  }



--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux