2024-02-07 03:37:31

by Cosmin Tanislav

[permalink] [raw]
Subject: [PATCH 2/2] iio: accel: adxl367: fix I2C FIFO data register

As specified in the datasheet, the I2C FIFO data register is
0x18, not 0x42. 0x42 was used by mistake when adapting the
ADXL372 driver.

Fix this mistake.

Signed-off-by: Cosmin Tanislav <[email protected]>
---
drivers/iio/accel/adxl367_i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/accel/adxl367_i2c.c b/drivers/iio/accel/adxl367_i2c.c
index b595fe94f3a3..62c74bdc0d77 100644
--- a/drivers/iio/accel/adxl367_i2c.c
+++ b/drivers/iio/accel/adxl367_i2c.c
@@ -11,7 +11,7 @@

#include "adxl367.h"

-#define ADXL367_I2C_FIFO_DATA 0x42
+#define ADXL367_I2C_FIFO_DATA 0x18

struct adxl367_i2c_state {
struct regmap *regmap;
--
2.43.0



2024-02-07 09:05:57

by Nuno Sá

[permalink] [raw]
Subject: Re: [PATCH 2/2] iio: accel: adxl367: fix I2C FIFO data register

On Wed, 2024-02-07 at 05:36 +0200, Cosmin Tanislav wrote:
> As specified in the datasheet, the I2C FIFO data register is
> 0x18, not 0x42. 0x42 was used by mistake when adapting the
> ADXL372 driver.
>
> Fix this mistake.
>
> Signed-off-by: Cosmin Tanislav <[email protected]>
> ---

This needs a Fixes: tag. With that:

Reviewed-by: Nuno Sa <[email protected]>

>  drivers/iio/accel/adxl367_i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/accel/adxl367_i2c.c b/drivers/iio/accel/adxl367_i2c.c
> index b595fe94f3a3..62c74bdc0d77 100644
> --- a/drivers/iio/accel/adxl367_i2c.c
> +++ b/drivers/iio/accel/adxl367_i2c.c
> @@ -11,7 +11,7 @@
>  
>  #include "adxl367.h"
>  
> -#define ADXL367_I2C_FIFO_DATA 0x42
> +#define ADXL367_I2C_FIFO_DATA 0x18
>  
>  struct adxl367_i2c_state {
>   struct regmap *regmap;


2024-02-10 16:58:09

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 2/2] iio: accel: adxl367: fix I2C FIFO data register

On Wed, 07 Feb 2024 10:08:38 +0100
Nuno Sá <[email protected]> wrote:

> On Wed, 2024-02-07 at 05:36 +0200, Cosmin Tanislav wrote:
> > As specified in the datasheet, the I2C FIFO data register is
> > 0x18, not 0x42. 0x42 was used by mistake when adapting the
> > ADXL372 driver.
For future reference (not worth a v2): You could wrap a little longer - 75
chars is fine normally for commit messages.
> >
> > Fix this mistake.
> >
> > Signed-off-by: Cosmin Tanislav <[email protected]>
> > ---
>
> This needs a Fixes: tag. With that:
>
> Reviewed-by: Nuno Sa <[email protected]>
Fine to just reply to each of these emails with an appropriate
fixes tag - no need for a v2.


>
> >  drivers/iio/accel/adxl367_i2c.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/accel/adxl367_i2c.c b/drivers/iio/accel/adxl367_i2c.c
> > index b595fe94f3a3..62c74bdc0d77 100644
> > --- a/drivers/iio/accel/adxl367_i2c.c
> > +++ b/drivers/iio/accel/adxl367_i2c.c
> > @@ -11,7 +11,7 @@
> >  
> >  #include "adxl367.h"
> >  
> > -#define ADXL367_I2C_FIFO_DATA 0x42
> > +#define ADXL367_I2C_FIFO_DATA 0x18
> >  
> >  struct adxl367_i2c_state {
> >   struct regmap *regmap;
>


2024-02-25 14:33:41

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 2/2] iio: accel: adxl367: fix I2C FIFO data register

On Sat, 10 Feb 2024 16:57:47 +0000
Jonathan Cameron <[email protected]> wrote:

> On Wed, 07 Feb 2024 10:08:38 +0100
> Nuno Sá <[email protected]> wrote:
>
> > On Wed, 2024-02-07 at 05:36 +0200, Cosmin Tanislav wrote:
> > > As specified in the datasheet, the I2C FIFO data register is
> > > 0x18, not 0x42. 0x42 was used by mistake when adapting the
> > > ADXL372 driver.
> For future reference (not worth a v2): You could wrap a little longer - 75
> chars is fine normally for commit messages.
> > >
> > > Fix this mistake.
> > >
> > > Signed-off-by: Cosmin Tanislav <[email protected]>
> > > ---
> >
> > This needs a Fixes: tag. With that:
> >
> > Reviewed-by: Nuno Sa <[email protected]>
> Fine to just reply to each of these emails with an appropriate
> fixes tag - no need for a v2.
>
Given these were still in my queue waiting for a fixes tag,
I went looking.

Fixes: cbab791c5e2a ("iio: accel: add ADXL367 driver")

Both patches added and both applied to the fixes-togreg branch of iio.git

Thanks

Jonathan

>
> >
> > >  drivers/iio/accel/adxl367_i2c.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/iio/accel/adxl367_i2c.c b/drivers/iio/accel/adxl367_i2c.c
> > > index b595fe94f3a3..62c74bdc0d77 100644
> > > --- a/drivers/iio/accel/adxl367_i2c.c
> > > +++ b/drivers/iio/accel/adxl367_i2c.c
> > > @@ -11,7 +11,7 @@
> > >  
> > >  #include "adxl367.h"
> > >  
> > > -#define ADXL367_I2C_FIFO_DATA 0x42
> > > +#define ADXL367_I2C_FIFO_DATA 0x18
> > >  
> > >  struct adxl367_i2c_state {
> > >   struct regmap *regmap;
> >
>
>