]> www.infradead.org Git - users/willy/xarray.git/commit
iio: light: noa1305: Use static table lookup of scale values
authorMarek Vasut <marex@denx.de>
Mon, 15 Jul 2024 18:28:57 +0000 (20:28 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 3 Aug 2024 09:13:38 +0000 (10:13 +0100)
commit968a3bed1c96baa4e701de308fc1f78a9515ba0c
tree1ed6ed23bafc8a27e006d5b1af71a3b8505d4b79
parentdde56b6db4d40e6d5017fbb94a5a2d973208800f
iio: light: noa1305: Use static table lookup of scale values

Move scale values into a static table, perform look up of those
scale values in noa1305_scale() simply by using the integration
time register content as an index, because the integration time
register content directly maps to the table values.

Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://patch.msgid.link/20240715183120.143417-3-marex@denx.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/noa1305.c