Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1391866 > unrolled thread

[PATCH 06/13] iio: health/afe440x: Remove unneeded offset handling

Started by"Andrew F. Davis" <afd@ti.com>
First post2016-05-01 22:40 +0200
Last post2016-05-04 16:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 06/13] iio: health/afe440x: Remove unneeded offset handling "Andrew F. Davis" <afd@ti.com> - 2016-05-01 22:40 +0200
    Re: [PATCH 06/13] iio: health/afe440x: Remove unneeded offset  handling Jonathan Cameron <jic23@kernel.org> - 2016-05-04 16:50 +0200

#1391866 — [PATCH 06/13] iio: health/afe440x: Remove unneeded offset handling

From"Andrew F. Davis" <afd@ti.com>
Date2016-05-01 22:40 +0200
Subject[PATCH 06/13] iio: health/afe440x: Remove unneeded offset handling
Message-ID<ru6jM-7pJ-11@gated-at.bofh.it>
No channel in the afe4403 driver has IIO_CHAN_INFO_OFFSET set so
remove the handlers for this.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/iio/health/afe4403.c | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/drivers/iio/health/afe4403.c b/drivers/iio/health/afe4403.c
index bcff528..cac6090 100644
--- a/drivers/iio/health/afe4403.c
+++ b/drivers/iio/health/afe4403.c
@@ -293,14 +293,6 @@ static int afe4403_read_raw(struct iio_dev *indio_dev,
 			if (ret)
 				return ret;
 			return IIO_VAL_INT;
-		case IIO_CHAN_INFO_OFFSET:
-			ret = regmap_read(afe->regmap, reg_info.offreg,
-					  val);
-			if (ret)
-				return ret;
-			*val &= reg_info.mask;
-			*val >>= reg_info.shift;
-			return IIO_VAL_INT;
 		}
 		break;
 	case IIO_CURRENT:
@@ -333,15 +325,6 @@ static int afe4403_write_raw(struct iio_dev *indio_dev,
 	const struct afe440x_reg_info reg_info = afe4403_reg_info[chan->address];
 
 	switch (chan->type) {
-	case IIO_INTENSITY:
-		switch (mask) {
-		case IIO_CHAN_INFO_OFFSET:
-			return regmap_update_bits(afe->regmap,
-				reg_info.offreg,
-				reg_info.mask,
-				(val << reg_info.shift));
-		}
-		break;
 	case IIO_CURRENT:
 		switch (mask) {
 		case IIO_CHAN_INFO_RAW:
-- 
2.8.1

[toc] | [next] | [standalone]


#1394404 — Re: [PATCH 06/13] iio: health/afe440x: Remove unneeded offset handling

FromJonathan Cameron <jic23@kernel.org>
Date2016-05-04 16:50 +0200
SubjectRe: [PATCH 06/13] iio: health/afe440x: Remove unneeded offset handling
Message-ID<rv6hJ-5S0-53@gated-at.bofh.it>
In reply to#1391866
On 01/05/16 21:36, Andrew F. Davis wrote:
> No channel in the afe4403 driver has IIO_CHAN_INFO_OFFSET set so
> remove the handlers for this.
> 
> Signed-off-by: Andrew F. Davis <afd@ti.com>
Oops :)

Applied.
> ---
>  drivers/iio/health/afe4403.c | 17 -----------------
>  1 file changed, 17 deletions(-)
> 
> diff --git a/drivers/iio/health/afe4403.c b/drivers/iio/health/afe4403.c
> index bcff528..cac6090 100644
> --- a/drivers/iio/health/afe4403.c
> +++ b/drivers/iio/health/afe4403.c
> @@ -293,14 +293,6 @@ static int afe4403_read_raw(struct iio_dev *indio_dev,
>  			if (ret)
>  				return ret;
>  			return IIO_VAL_INT;
> -		case IIO_CHAN_INFO_OFFSET:
> -			ret = regmap_read(afe->regmap, reg_info.offreg,
> -					  val);
> -			if (ret)
> -				return ret;
> -			*val &= reg_info.mask;
> -			*val >>= reg_info.shift;
> -			return IIO_VAL_INT;
>  		}
>  		break;
>  	case IIO_CURRENT:
> @@ -333,15 +325,6 @@ static int afe4403_write_raw(struct iio_dev *indio_dev,
>  	const struct afe440x_reg_info reg_info = afe4403_reg_info[chan->address];
>  
>  	switch (chan->type) {
> -	case IIO_INTENSITY:
> -		switch (mask) {
> -		case IIO_CHAN_INFO_OFFSET:
> -			return regmap_update_bits(afe->regmap,
> -				reg_info.offreg,
> -				reg_info.mask,
> -				(val << reg_info.shift));
> -		}
> -		break;
>  	case IIO_CURRENT:
>  		switch (mask) {
>  		case IIO_CHAN_INFO_RAW:
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web