Lines Matching full:als
5 * Based on ALS driver:
28 #define ACPI_ALS_CLASS "als"
29 #define ACPI_ALS_DEVICE_NAME "acpi-als"
85 static int acpi_als_read_value(struct acpi_als *als, char *prop, s32 *val) in acpi_als_read_value() argument
90 status = acpi_evaluate_integer(als->device->handle, prop, NULL, in acpi_als_read_value()
94 acpi_evaluation_failure_warn(als->device->handle, prop, status); in acpi_als_read_value()
106 struct acpi_als *als = iio_priv(indio_dev); in acpi_als_notify() local
111 iio_trigger_poll_nested(als->trig); in acpi_als_notify()
116 "Unhandled ACPI ALS event (%08x)!\n", in acpi_als_notify()
126 struct acpi_als *als = iio_priv(indio_dev); in acpi_als_read_raw() local
137 ret = acpi_als_read_value(als, ACPI_ALS_ILLUMINANCE, &temp_val); in acpi_als_read_raw()
154 struct acpi_als *als = iio_priv(indio_dev); in acpi_als_trigger_handler() local
155 s32 *buffer = als->evt_buffer; in acpi_als_trigger_handler()
159 mutex_lock(&als->lock); in acpi_als_trigger_handler()
161 ret = acpi_als_read_value(als, ACPI_ALS_ILLUMINANCE, &val); in acpi_als_trigger_handler()
179 mutex_unlock(&als->lock); in acpi_als_trigger_handler()
189 struct acpi_als *als; in acpi_als_add() local
192 indio_dev = devm_iio_device_alloc(dev, sizeof(*als)); in acpi_als_add()
196 als = iio_priv(indio_dev); in acpi_als_add()
199 als->device = device; in acpi_als_add()
200 mutex_init(&als->lock); in acpi_als_add()
207 als->trig = devm_iio_trigger_alloc(dev, "%s-dev%d", indio_dev->name, in acpi_als_add()
209 if (!als->trig) in acpi_als_add()
212 ret = devm_iio_trigger_register(dev, als->trig); in acpi_als_add()
219 indio_dev->trig = iio_trigger_get(als->trig); in acpi_als_add()