Re: [PATCH v9] iio: acpi: Add support for ACPI0008 Ambient Light Sensor

From: Daniel Baluta
Date: Sat May 09 2015 - 15:11:17 EST


On Sat, May 9, 2015 at 9:45 PM, Gabriele Mazzotta
<gabriele.mzt@xxxxxxxxx> wrote:
> On Saturday 02 May 2015 14:30:57 Gabriele Mazzotta wrote:
>> This driver adds the initial support for the ACPI Ambient Light Sensor
>> as defined in Section 9.2 of the ACPI specification (Revision 5.0) [1].
>>
>> Sensors complying with the standard are exposed as ACPI devices with
>> ACPI0008 as hardware ID and provide standard methods by which the OS
>> can query properties of the ambient light environment the system is
>> currently operating in.
>>
>> This driver currently allows only to get the current ambient light
>> illuminance reading through the _ALI method, but is ready to be
>> extended extended to handle _ALC, _ALT and _ALP as well.
>>
>> [1] http://www.acpi.info/DOWNLOADS/ACPIspec50.pdf
>>
>> Signed-off-by: Martin Liska <marxin.liska@xxxxxxxxx>
>> Signed-off-by: Marek Vasut <marex@xxxxxxx>
>> Signed-off-by: Gabriele Mazzotta <gabriele.mzt@xxxxxxxxx>
>> Cc: Zhang Rui <rui.zhang@xxxxxxxxx>
>> ---
>> Changes since v8:
>> - Set realbits to 32
>> - Fix license mismatch (using GPL v2 or later)
>> - Drop iio_device_unregister() in favor of devm_iio_device_register()
>>
>> drivers/iio/light/Kconfig | 12 +++
>> drivers/iio/light/Makefile | 1 +
>> drivers/iio/light/acpi-als.c | 232 +++++++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 245 insertions(+)
>> create mode 100644 drivers/iio/light/acpi-als.c
>>
>> diff --git a/drivers/iio/light/Kconfig b/drivers/iio/light/Kconfig
>> index 01a1a16..898b2b5 100644
>> --- a/drivers/iio/light/Kconfig
>> +++ b/drivers/iio/light/Kconfig
>> @@ -5,6 +5,18 @@
>>
>> menu "Light sensors"
>>
>> +config ACPI_ALS
>> + tristate "ACPI Ambient Light Sensor"
>> + depends on ACPI
>
> I'm sorry, but I've just noticed that here there should also be
>
> select IIO_BUFFER
>
> I hope it's not too late and I can resend this patch if needed.

You can send a patch on top of the previous one. Eventually, Jonathan
will squash them.

Daniel.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/