drivers: sensor: icm42605: fix turn_off_sensor logic

While it would likely not directly cause issues with the current
implementation, the logic of turning off the sensor should be to
actually reset the flags, not to toggle them.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
Benjamin Cabé 2025-06-14 21:32:54 +02:00 committed by Benjamin Cabé
commit 37144c1ffa

View file

@ -431,8 +431,8 @@ int icm42605_turn_off_sensor(const struct device *dev)
result = inv_spi_read(&cfg->spi, REG_PWR_MGMT0, &v, 1);
v ^= BIT_ACCEL_MODE_LNM;
v ^= BIT_GYRO_MODE_LNM;
v &= ~BIT_ACCEL_MODE_LNM;
v &= ~BIT_GYRO_MODE_LNM;
result = inv_spi_single_write(&cfg->spi, REG_PWR_MGMT0, &v);
if (result) {