Home
last modified time | relevance | path

Searched hist:f50f98310e51b3712a4e544c75615e89c8233125 (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/iio/light/
H A Dcm32181.cdiff f50f98310e51b3712a4e544c75615e89c8233125 Tue Apr 28 19:29:20 CEST 2020 Hans de Goede <hdegoede@redhat.com> 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>