Re: How to use GPIO pin as the trigger for IIO devices?

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

 



Thanks Jonathan for your mail!

2016-04-10 22:46 GMT+08:00 Jonathan Cameron <jic23@xxxxxxxxxx>:
> On 07/04/16 04:51, Yong Li wrote:
>>  am testing an IIO gyro sensor using kernel 4.4, currently I can use
>> the sysfs trigger as a trigger, I can read the data from
>> /dev/iio:deviceX after "echo 1 > trigger_now".
>>
>>
>> I want to use a gpio pin for the data trigger. For example, when the
>> GPIO pin 62 is low, the data will be ready.
>>
>>
>> How to connect/setup the gpio with the IIO triggers, how can I use the
>> iio_trig_interrupt.ko? I found there is new triggers in the
>> /sys/bus/iio/devices after I loaded the iio_trig_interrupt.ko.
> Hi Yong,
>
> Unfortunately a means of identifying that a given IRQ (GPIO or otherwise)
> is to be used as an iio_trigger is needed.  At the moment, that driver
> only supports getting this from an IORESOURCE_IRQ in a board file.
>
> There was a recent thread on device tree bindings for these;
> http://marc.info/?l=linux-iio&m=145621588017248&w=2
>
> It got a little non obvious from the point of view of what the bindings
> should look like and buried under other work.
>
> Still the patches there will probably get you going.
>
> Jonathan
>
>>
>> Thanks,
>> Yong
>> --
>> 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
>>
>
--
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