iio: light: ltr390: Calculate 'counts_per_uvi' dynamically
authorAbhash Jha <abhashkumarjha123@gmail.com>
Wed, 14 Aug 2024 11:31:34 +0000 (17:01 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 17 Aug 2024 14:38:14 +0000 (15:38 +0100)
commit4bd7e5ce519a9f1de1a58fb10438e45aa9cc85ca
treebdc1f6e60a5a09b79bb5d3509027f670a7ebbaf7
parent14e0d914a855f9ad2669c0a2ed35f0003f771be5
iio: light: ltr390: Calculate 'counts_per_uvi' dynamically

counts_per_uvi depends on the current value of gain and resolution.
Hence, we cannot use the hardcoded value 96.
The `counts_per_uvi` function gives the count based on the current gain
and resolution (integration time).

Signed-off-by: Abhash Jha <abhashkumarjha123@gmail.com>
Link: https://patch.msgid.link/20240814113135.14575-3-abhashkumarjha123@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/ltr390.c