Re: ACPI ambient light sensor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +static irqreturn_t acpi_als_trigger_handler(int irq, void *p)
> +{
> + printk("XXXX: TRIGGER handler called :)");

should put
iio_trigger_notify_done(idev->trig);
here

> +
> + return IRQ_HANDLED;
> +
> + struct iio_poll_func *pf = p;
> + struct iio_dev *idev = pf->indio_dev;
> + struct acpi_als_chip *chip = iio_priv(idev);
> + struct iio_buffer *buffer = idev->buffer;
> + int i, j = 0;
> +
> + /* TODO: remove */
> + u8 b[64];
> +
> + for (i = 0; i < idev->masklength; i++) {
> + if (!test_bit(i, idev->active_scan_mask))
> + continue;
> +
> + // TODO: read
> + j++;
> + }
> +
> + if (idev->scan_timestamp) {
> + s64 *timestamp = (s64 *)((u8 *)b +
> + ALIGN(j, sizeof(s64)));
> + *timestamp = pf->timestamp;
> + }
> +
> + buffer->access->store_to(buffer, (u8 *)b, pf->timestamp);
> +
> + iio_trigger_notify_done(idev->trig);
> +
> + return IRQ_HANDLED;
> +}

--

Peter Meerwald
+43-664-2444418 (mobile)
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux