diff options
author | Hans de Goede <hdegoede@redhat.com> | 2020-04-28 19:29:20 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-05-10 10:44:58 +0100 |
commit | f50f98310e51b3712a4e544c75615e89c8233125 (patch) | |
tree | 13633441a4747120d1e0cffbe0fa88508df0c657 /drivers/iio/common | |
parent | 7574cb1df43c6219f0088d028906f4e15fee702f (diff) | |
download | linux-f50f98310e51b3712a4e544c75615e89c8233125.tar.bz2 |
iio: light: cm32181: Use units of 1/100000th for calibscale and lux_per_bit
Use units of 1/100000th for calibscale and lux_per_bit. The similar
cm3232 driver already uses 1/100000th as unit for calibscale.
This allows for higher-accuracy and makes it easier to add support
for getting device-specific calibscale and lux_per_bit values from
a device's ACPI tables, as the values in the ACPI tables also use
1/100000th units.
This units change means that our intermediate values in cm32181_get_lux()
may get quite big, change the type of the lux variable to a u64 to
deal with this.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/common')
0 files changed, 0 insertions, 0 deletions