From: Jonathan Cameron <jic23@kernel.org>
To: Yong Li <sdliyong@gmail.com>, linux-iio@vger.kernel.org
Subject: Re: How to use GPIO pin as the trigger for IIO devices?
Date: Sun, 10 Apr 2016 15:46:27 +0100 [thread overview]
Message-ID: <570A6743.4090003@kernel.org> (raw)
In-Reply-To: <CADO9-pckFN67QpCHs3Z-vLqH9-6zrdUazgth3Xd=Q++=V8Zkyg@mail.gmail.com>
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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2016-04-10 14:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-07 3:51 How to use GPIO pin as the trigger for IIO devices? Yong Li
2016-04-10 14:46 ` Jonathan Cameron [this message]
2016-04-12 5:19 ` Yong Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=570A6743.4090003@kernel.org \
--to=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=sdliyong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.