power: Add non-indexed ambient light sensor sysfs entries

If a kernel IIO light sensor driver has just one value to report it may
not be indexed and therefore will be missing the expected "0" in the name.

This is true of the (upcoming) ACPI ALS driver that currently has just
one value to report which will be in "in_illuminance_raw".

I did not add a non-indexed entry for the legacy "illuminance0_input"
as it appears that the kernel will no longer create iio sysfs entries
without a direction prefix.

BUG=chrome-os-partner:24208
TEST=enable ACPI ALS support on samus board and ensure that powerd is
able to read and use the raw illuminance value from the non-indexed
sysfs entry at /sys/bus/iio/devices/iio:device0/in_illuminance_raw

Change-Id: Ie714a104083a6e5ef076aa3990f9357c59e37b75
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/203699
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Daniel Erat <derat@chromium.org>
1 file changed