Commit 4b1f0c31 authored by Colin Parker's avatar Colin Parker Committed by Jonathan Cameron

IIO: BME280: Updates to Humidity readings need ctrl_reg write!

The ctrl_reg register needs to be written after any write to
the humidity registers. The value written to the ctrl_reg register
does not necessarily need to change, but a write operation must

The regmap_update_bits functions will not write to a register
if the register value matches the value to be written. This saves
unnecessary bus operations.  The change in this patch forces a bus
write during the chip_config operation by switching to

This will fix issues where the Humidity Sensor Oversampling bits
are not updated after initialization.
Signed-off-by: default avatarColin Parker <>
Acked-by: default avatarAndreas Klinger <>
Cc: <>
Signed-off-by: default avatarJonathan Cameron <>
parent e6f47943
......@@ -558,7 +558,7 @@ static int bmp280_chip_config(struct bmp280_data *data)
u8 osrs = BMP280_OSRS_TEMP_X(data->oversampling_temp + 1) |
BMP280_OSRS_PRESS_X(data->oversampling_press + 1);
ret = regmap_update_bits(data->regmap, BMP280_REG_CTRL_MEAS,
ret = regmap_write_bits(data->regmap, BMP280_REG_CTRL_MEAS,
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment