tsl2x7x: IRQ event handler only being called when polling sysfs attributes

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

 



I am working on getting interrupts to work properly for the tsl2x7x
staging cleanup but I've run into an odd issue where
tsl2x7x_event_handler() is only called if I poll the corresponding
sysfs attribute. So for example, when I run this in the background:

	watch -n .1 cat in_illuminance0_input

tsl2x7x_get_lux() shows that the relevant bit in the device register is
asserting an interrupt and tsl2x7x_event_handler() is called. As soon
as I stop that watch process, tsl2x7x_event_handler() is no longer
called.

tsl2x7x_event_handler() is not called for any proximity interrupts
while I only poll the ALS. However, when I start polling
in_proximity0_raw, then tsl2x7x_event_handler() is called as expected
when the sensor is asserting an interrupt.

Note: tsl2x7x_get_prox() in IIO testing is missing a call to clear the
interrupt bit, but tsl2x7x_get_lux() clears it. I added code to clear
the interrupt bit in tsl2x7x_get_prox() to my local tree.

Here is my relevant device tree binding for the Raspberry Pi 2:

&i2c1 {
       tsl2772@39 {
               compatible = "amstaos,tsl2772";
               reg = <0x39>;
               interrupt-parent = <&gpio>;
               interrupts = <22 0x1>;
       };
};

I have a 10K pull-up resistor on the interrupt pin.

Any ideas?

Brian
--
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