]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: light: veml6030: add set up delay after any power on sequence
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Tue, 1 Oct 2024 20:21:14 +0000 (22:21 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 6 Oct 2024 14:09:35 +0000 (15:09 +0100)
commitc61d687cd5fc3a2da6dd2f18405e87ebb72f603d
treec4c5d89c7ef82398d88ddf0b9fe35d8b7aa6203d
parent1960713218dd2f9286cf7485872f08a523862f86
iio: light: veml6030: add set up delay after any power on sequence

The veml6030 requires a delay of 4 ms after activating the sensor. That
is done correctly during the hw initialization, but it's missing after
resuming.

Move the delay to the power on function to make sure that it is always
observerd. When at it, use fsleep() instead of usleep_range() as such a
narrow range is not required.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20241001-veml6035-v3-1-d789f6ff147c@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/veml6030.c