iio:imu: adis16475: Fix sync mode setting
Subsystems (3)
v2 cover iio:imu: adis16475: Fix sync mode setting
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
PATCH v2 1/1 iio:imu: adis16475: Fix sync mode setting
Fix sync mode setting by applying the necessary shift bits.
---
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(-)
drivers/iio/imu/adis16475.c +3 -1
@@ -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
Quoted 5 lines · 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 <[email protected]>---
Not sure there was a reason to drop my tag... Anyways:
Quoted 33 lines
changes in v2:
- added u16 value to call__adis_update_bitsto fix build errordrivers/iio/imu/adis16475.c| 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)drivers/iio/imu/adis16475.c +1
-0@@ -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;drivers/iio/imu/adis16475.c +2
-2@@ -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
Quoted 10 lines · On Fri, 05 Apr 2024 09:02:33 +0200 Nuno Sá <[email protected]> wrote:
Quoted 5 lines · 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 <[email protected]>---
Not sure there was a reason to drop my tag... Anyways:
Reviewed-by Nuno Sa <[email protected]>
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
Quoted 35 lines
Quoted 34 lines
changes in v2:
- added u16 value to call__adis_update_bitsto fix build errordrivers/iio/imu/adis16475.c| 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)drivers/iio/imu/adis16475.c +1
-0@@ -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;drivers/iio/imu/adis16475.c +2
-2@@ -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