diff mbox series

[2/2] iio: accel: fxls8962af: errata bug only applicable for FXLS8962AF

Message ID 20230605103223.1400980-2-sean@geanix.com (mailing list archive)
State Accepted
Headers show
Series [1/2] iio: accel: fxls8962af: fixup buffer scan element type | expand

Commit Message

Sean Nyekjaer June 5, 2023, 10:32 a.m. UTC
Remove special errata handling if FXLS8964AF is used.

Fixes: af959b7b96b8 ("iio: accel: fxls8962af: fix errata bug E3 - I2C burst reads")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Cc: stable@vger.kernel.org
---
 drivers/iio/accel/fxls8962af-core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Jonathan Cameron June 5, 2023, 7:06 p.m. UTC | #1
On Mon,  5 Jun 2023 12:32:22 +0200
Sean Nyekjaer <sean@geanix.com> wrote:

> Remove special errata handling if FXLS8964AF is used.
> 
> Fixes: af959b7b96b8 ("iio: accel: fxls8962af: fix errata bug E3 - I2C burst reads")
> Signed-off-by: Sean Nyekjaer <sean@geanix.com>
> Cc: stable@vger.kernel.org

Applied to the fixes-togreg branch of iio.git

Thanks,

Jonathan

> ---
>  drivers/iio/accel/fxls8962af-core.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c
> index bf7949e51e6c..3f27834ef04c 100644
> --- a/drivers/iio/accel/fxls8962af-core.c
> +++ b/drivers/iio/accel/fxls8962af-core.c
> @@ -904,9 +904,10 @@ static int fxls8962af_fifo_transfer(struct fxls8962af_data *data,
>  	int total_length = samples * sample_length;
>  	int ret;
>  
> -	if (i2c_verify_client(dev))
> +	if (i2c_verify_client(dev) &&
> +	    data->chip_info->chip_id == FXLS8962AF_DEVICE_ID)
>  		/*
> -		 * Due to errata bug:
> +		 * Due to errata bug (only applicable on fxls8962af):
>  		 * E3: FIFO burst read operation error using I2C interface
>  		 * We have to avoid burst reads on I2C..
>  		 */
diff mbox series

Patch

diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c
index bf7949e51e6c..3f27834ef04c 100644
--- a/drivers/iio/accel/fxls8962af-core.c
+++ b/drivers/iio/accel/fxls8962af-core.c
@@ -904,9 +904,10 @@  static int fxls8962af_fifo_transfer(struct fxls8962af_data *data,
 	int total_length = samples * sample_length;
 	int ret;
 
-	if (i2c_verify_client(dev))
+	if (i2c_verify_client(dev) &&
+	    data->chip_info->chip_id == FXLS8962AF_DEVICE_ID)
 		/*
-		 * Due to errata bug:
+		 * Due to errata bug (only applicable on fxls8962af):
 		 * E3: FIFO burst read operation error using I2C interface
 		 * We have to avoid burst reads on I2C..
 		 */