* [PATCH v2 0/1] iio:imu: adis16475: Fix sync mode setting
@ 2024-04-05 4:53 Ramona Gradinariu
2024-04-05 4:53 ` [PATCH v2 1/1] " Ramona Gradinariu
0 siblings, 1 reply; 4+ messages in thread
From: Ramona Gradinariu @ 2024-04-05 4:53 UTC (permalink / raw
To: linux-kernel, jic23, nuno.sa, linux-iio; +Cc: Ramona Gradinariu
Fix sync mode setting by applying the necessary shift bits.
Ramona Gradinariu (1):
iio:imu: adis16475: Fix sync mode setting
drivers/iio/imu/adis16475.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/1] iio:imu: adis16475: Fix sync mode setting
2024-04-05 4:53 [PATCH v2 0/1] iio:imu: adis16475: Fix sync mode setting Ramona Gradinariu
@ 2024-04-05 4:53 ` Ramona Gradinariu
2024-04-05 7:02 ` Nuno Sá
0 siblings, 1 reply; 4+ messages in thread
From: Ramona Gradinariu @ 2024-04-05 4:53 UTC (permalink / raw
To: linux-kernel, jic23, nuno.sa, linux-iio; +Cc: Ramona Gradinariu
Fix sync mode setting by applying the necessary shift bits.
Fixes: fff7352bf7a3 ("iio: imu: Add support for adis16475")
Signed-off-by: Ramona Gradinariu <ramona.bolboaca13@gmail.com>
---
changes in v2:
- added u16 value to call __adis_update_bits to fix build error
drivers/iio/imu/adis16475.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c
index 01f55cc902fa..060a21c70460 100644
--- a/drivers/iio/imu/adis16475.c
+++ b/drivers/iio/imu/adis16475.c
@@ -1289,6 +1289,7 @@ static int adis16475_config_sync_mode(struct adis16475 *st)
struct device *dev = &st->adis.spi->dev;
const struct adis16475_sync *sync;
u32 sync_mode;
+ u16 val;
/* default to internal clk */
st->clk_freq = st->info->int_clk * 1000;
@@ -1350,8 +1351,9 @@ static int adis16475_config_sync_mode(struct adis16475 *st)
* I'm keeping this for simplicity and avoiding extra variables
* in chip_info.
*/
+ val = ADIS16475_SYNC_MODE(sync->sync_mode);
ret = __adis_update_bits(&st->adis, ADIS16475_REG_MSG_CTRL,
- ADIS16475_SYNC_MODE_MASK, sync->sync_mode);
+ ADIS16475_SYNC_MODE_MASK, val);
if (ret)
return ret;
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/1] iio:imu: adis16475: Fix sync mode setting
2024-04-05 4:53 ` [PATCH v2 1/1] " Ramona Gradinariu
@ 2024-04-05 7:02 ` Nuno Sá
2024-04-06 15:46 ` Jonathan Cameron
0 siblings, 1 reply; 4+ messages in thread
From: Nuno Sá @ 2024-04-05 7:02 UTC (permalink / raw
To: Ramona Gradinariu, linux-kernel, jic23, nuno.sa, linux-iio
On Fri, 2024-04-05 at 07:53 +0300, Ramona Gradinariu wrote:
> Fix sync mode setting by applying the necessary shift bits.
>
> Fixes: fff7352bf7a3 ("iio: imu: Add support for adis16475")
> Signed-off-by: Ramona Gradinariu <ramona.bolboaca13@gmail.com>
> ---
Not sure there was a reason to drop my tag... Anyways:
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
> changes in v2:
> - added u16 value to call __adis_update_bits to fix build error
> drivers/iio/imu/adis16475.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c
> index 01f55cc902fa..060a21c70460 100644
> --- a/drivers/iio/imu/adis16475.c
> +++ b/drivers/iio/imu/adis16475.c
> @@ -1289,6 +1289,7 @@ static int adis16475_config_sync_mode(struct adis16475
> *st)
> struct device *dev = &st->adis.spi->dev;
> const struct adis16475_sync *sync;
> u32 sync_mode;
> + u16 val;
>
> /* default to internal clk */
> st->clk_freq = st->info->int_clk * 1000;
> @@ -1350,8 +1351,9 @@ static int adis16475_config_sync_mode(struct adis16475
> *st)
> * I'm keeping this for simplicity and avoiding extra variables
> * in chip_info.
> */
> + val = ADIS16475_SYNC_MODE(sync->sync_mode);
> ret = __adis_update_bits(&st->adis, ADIS16475_REG_MSG_CTRL,
> - ADIS16475_SYNC_MODE_MASK, sync->sync_mode);
> + ADIS16475_SYNC_MODE_MASK, val);
> if (ret)
> return ret;
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/1] iio:imu: adis16475: Fix sync mode setting
2024-04-05 7:02 ` Nuno Sá
@ 2024-04-06 15:46 ` Jonathan Cameron
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2024-04-06 15:46 UTC (permalink / raw
To: Nuno Sá; +Cc: Ramona Gradinariu, linux-kernel, nuno.sa, linux-iio
On Fri, 05 Apr 2024 09:02:33 +0200
Nuno Sá <noname.nuno@gmail.com> wrote:
> On Fri, 2024-04-05 at 07:53 +0300, Ramona Gradinariu wrote:
> > Fix sync mode setting by applying the necessary shift bits.
> >
> > Fixes: fff7352bf7a3 ("iio: imu: Add support for adis16475")
> > Signed-off-by: Ramona Gradinariu <ramona.bolboaca13@gmail.com>
> > ---
>
> Not sure there was a reason to drop my tag... Anyways:
>
> Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Missing -S on b4 maybe? A special parameter I save just for you Nuno ;)
Applied to the fixes-togreg branch of iio.git and marked for stable.
Thanks,
Jonathan
>
> > changes in v2:
> > - added u16 value to call __adis_update_bits to fix build error
> > drivers/iio/imu/adis16475.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c
> > index 01f55cc902fa..060a21c70460 100644
> > --- a/drivers/iio/imu/adis16475.c
> > +++ b/drivers/iio/imu/adis16475.c
> > @@ -1289,6 +1289,7 @@ static int adis16475_config_sync_mode(struct adis16475
> > *st)
> > struct device *dev = &st->adis.spi->dev;
> > const struct adis16475_sync *sync;
> > u32 sync_mode;
> > + u16 val;
> >
> > /* default to internal clk */
> > st->clk_freq = st->info->int_clk * 1000;
> > @@ -1350,8 +1351,9 @@ static int adis16475_config_sync_mode(struct adis16475
> > *st)
> > * I'm keeping this for simplicity and avoiding extra variables
> > * in chip_info.
> > */
> > + val = ADIS16475_SYNC_MODE(sync->sync_mode);
> > ret = __adis_update_bits(&st->adis, ADIS16475_REG_MSG_CTRL,
> > - ADIS16475_SYNC_MODE_MASK, sync->sync_mode);
> > + ADIS16475_SYNC_MODE_MASK, val);
> > if (ret)
> > return ret;
> >
> > --
> > 2.34.1
> >
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-04-06 15:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-05 4:53 [PATCH v2 0/1] iio:imu: adis16475: Fix sync mode setting Ramona Gradinariu
2024-04-05 4:53 ` [PATCH v2 1/1] " Ramona Gradinariu
2024-04-05 7:02 ` Nuno Sá
2024-04-06 15:46 ` Jonathan Cameron
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 read-only IMAP folder(s) and NNTP newsgroup(s).