]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: light: bh1750: Add hardware reset support via GPIO
authorSergio Perez <sergio@pereznus.es>
Mon, 24 Mar 2025 13:59:20 +0000 (14:59 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 22 Apr 2025 18:09:51 +0000 (19:09 +0100)
commit61f013df59f1d6326dcb6e1017171d7ee2b5a410
tree5bff7278caf23d95038178f80d75e51da80e6981
parent3e09eb53df47127cdcbf26fc41d24cd564d5d57c
iio: light: bh1750: Add hardware reset support via GPIO

Some BH1750 sensors require a hardware reset before they can be
detected on the I2C bus. This implementation adds support for an
optional reset GPIO that can be specified in the device tree.

The reset sequence pulls the GPIO low and then high before initializing
the sensor, which enables proper detection with tools like i2cdetect.
This is particularly important for sensors that power on in an
undefined state.

Signed-off-by: Sergio Perez <sergio@pereznus.es>
Link: https://patch.msgid.link/20250324135920.6802-2-sergio@pereznus.es
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/bh1750.c