* Re: [PATCH v1 1/2] iio:iio-interrupt-trigger: device-tree support [not found] ` <d8f7902dbfe6e911e6ac0d1117502a02b1212022.1455908065.git.gregor.boirie-ITF29qwbsa/QT0dZR+AlfA@public.gmane.org> @ 2016-02-21 19:55 ` Jonathan Cameron [not found] ` <56CA162C.5010406-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Jonathan Cameron @ 2016-02-21 19:55 UTC (permalink / raw) To: Gregor Boirie, linux-iio-u79uwXL29TY76Z2rM5mHXA Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala On 19/02/16 19:18, Gregor Boirie wrote: > From: Grégor Boirie <gregor.boirie-ITF29qwbsa/QT0dZR+AlfA@public.gmane.org> > > Signed-off-by: Gregor Boirie <gregor.boirie-ITF29qwbsa/QT0dZR+AlfA@public.gmane.org> Snag here is that iio_interrupt_trigger is a very linux specific name and device tree bindings should be just about the hardware. Not entirely sure how we avoid this though as the use is rather hard to describe generically. cc'd device tree list and bindings maintainers. As a brief summary - this IIO trigger driver takes a generic interrupt (from whatever) and uses it to drive sampling of IIO devices. The interrupt might be associated with particularly simple sensors directly but is more commonly a gpio interrupt line used cause samples to be captured from unrelated devices. Sometimes the source of that interrupt can be a convoluted external mux setup over which linux has no control for example. Any suggestions on appropriate naming? We aren't really describing hardware here, rather a policy decision on what a given interrupt is to be used for. I suppose ultimately we could take the view this should be handled via another route (from userspace via an appropriate configfs interface for example). Jonathan > --- > drivers/iio/trigger/iio-trig-interrupt.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/drivers/iio/trigger/iio-trig-interrupt.c b/drivers/iio/trigger/iio-trig-interrupt.c > index 572bc6f..3c4e18f 100644 > --- a/drivers/iio/trigger/iio-trig-interrupt.c > +++ b/drivers/iio/trigger/iio-trig-interrupt.c > @@ -104,11 +104,20 @@ static int iio_interrupt_trigger_remove(struct platform_device *pdev) > return 0; > } > > +#if defined(CONFIG_OF) > +static const struct of_device_id iio_interrupt_trigger_of_match[] = { > + { .compatible = "iio-interrupt-trigger" }, > + {} > +}; > +#endif > + > static struct platform_driver iio_interrupt_trigger_driver = { > .probe = iio_interrupt_trigger_probe, > .remove = iio_interrupt_trigger_remove, > .driver = { > - .name = "iio_interrupt_trigger", > + .name = "iio_interrupt_trigger", > + .owner = THIS_MODULE, > + .of_match_table = of_match_ptr(iio_interrupt_trigger_of_match) > }, > }; > > ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <56CA162C.5010406-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>]
* Re: [PATCH v1 1/2] iio:iio-interrupt-trigger: device-tree support [not found] ` <56CA162C.5010406-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> @ 2016-02-22 19:05 ` Rob Herring 2016-02-23 8:24 ` Gregor Boirie 2016-03-12 12:08 ` Jonathan Cameron 0 siblings, 2 replies; 4+ messages in thread From: Rob Herring @ 2016-02-22 19:05 UTC (permalink / raw) To: Jonathan Cameron Cc: Gregor Boirie, linux-iio-u79uwXL29TY76Z2rM5mHXA, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala On Sun, Feb 21, 2016 at 07:55:24PM +0000, Jonathan Cameron wrote: > On 19/02/16 19:18, Gregor Boirie wrote: > > From: Grégor Boirie <gregor.boirie-ITF29qwbsa/QT0dZR+AlfA@public.gmane.org> > > > > Signed-off-by: Gregor Boirie <gregor.boirie-ITF29qwbsa/QT0dZR+AlfA@public.gmane.org> > Snag here is that iio_interrupt_trigger is a very linux specific > name and device tree bindings should be just about the hardware. > > Not entirely sure how we avoid this though as the use is rather > hard to describe generically. > > cc'd device tree list and bindings maintainers. > > As a brief summary - this IIO trigger driver takes a generic > interrupt (from whatever) and uses it to drive sampling of IIO devices. > The interrupt might be associated with particularly simple sensors directly > but is more commonly a gpio interrupt line used cause samples to be captured > from unrelated devices. Sometimes the source of that interrupt can be a convoluted > external mux setup over which linux has no control for example. If linux has no control of the setup, then do we care? It's just some blackbox driving a signal. > Any suggestions on appropriate naming? I would think of it outside of IIO perhaps. We already have gpio-keys which is kind of similar. Maybe just "external interrupt"? Is it always a GPIO interrupt or could be polled GPIO or some other mechanism? Could you add "trigger-gpios" to every device that uses it and allow for it to appear multiple times? It somewhat depends on how static setting the trigger source is whether that would be appropriate. > We aren't really describing hardware here, rather a policy decision on what > a given interrupt is to be used for. > > I suppose ultimately we could take the view this should be handled via another > route (from userspace via an appropriate configfs interface for example). You would still need to know which GPIOs you could use or assign, so I think we need something in DT. Rob ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/2] iio:iio-interrupt-trigger: device-tree support 2016-02-22 19:05 ` Rob Herring @ 2016-02-23 8:24 ` Gregor Boirie 2016-03-12 12:08 ` Jonathan Cameron 1 sibling, 0 replies; 4+ messages in thread From: Gregor Boirie @ 2016-02-23 8:24 UTC (permalink / raw) To: Rob Herring, Jonathan Cameron Cc: linux-iio-u79uwXL29TY76Z2rM5mHXA, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala On 02/22/2016 08:05 PM, Rob Herring wrote: > On Sun, Feb 21, 2016 at 07:55:24PM +0000, Jonathan Cameron wrote: >> On 19/02/16 19:18, Gregor Boirie wrote: >>> From: Grégor Boirie <gregor.boirie-ITF29qwbsa/QT0dZR+AlfA@public.gmane.org> >>> >>> Signed-off-by: Gregor Boirie <gregor.boirie-ITF29qwbsa/QT0dZR+AlfA@public.gmane.org> >> Snag here is that iio_interrupt_trigger is a very linux specific >> name and device tree bindings should be just about the hardware. >> >> Not entirely sure how we avoid this though as the use is rather >> hard to describe generically. >> >> cc'd device tree list and bindings maintainers. >> >> As a brief summary - this IIO trigger driver takes a generic >> interrupt (from whatever) and uses it to drive sampling of IIO devices. >> The interrupt might be associated with particularly simple sensors directly >> but is more commonly a gpio interrupt line used cause samples to be captured >> from unrelated devices. Sometimes the source of that interrupt can be a convoluted >> external mux setup over which linux has no control for example. > If linux has no control of the setup, then do we care? It's just some > blackbox driving a signal. > >> Any suggestions on appropriate naming? > I would think of it outside of IIO perhaps. We already have gpio-keys > which is kind of similar. Maybe just "external interrupt"? Is it always > a GPIO interrupt or could be polled GPIO or some other mechanism? Our setup uses an ARM software generated interrupt coming from an alternate core running a custom OS. Usage is however quite similar to GPIO irqs. [snip] Grégor. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/2] iio:iio-interrupt-trigger: device-tree support 2016-02-22 19:05 ` Rob Herring 2016-02-23 8:24 ` Gregor Boirie @ 2016-03-12 12:08 ` Jonathan Cameron 1 sibling, 0 replies; 4+ messages in thread From: Jonathan Cameron @ 2016-03-12 12:08 UTC (permalink / raw) To: Rob Herring Cc: Gregor Boirie, linux-iio-u79uwXL29TY76Z2rM5mHXA, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala On 22/02/16 19:05, Rob Herring wrote: > On Sun, Feb 21, 2016 at 07:55:24PM +0000, Jonathan Cameron wrote: >> On 19/02/16 19:18, Gregor Boirie wrote: >>> From: Grégor Boirie <gregor.boirie-ITF29qwbsa/QT0dZR+AlfA@public.gmane.org> >>> >>> Signed-off-by: Gregor Boirie <gregor.boirie-ITF29qwbsa/QT0dZR+AlfA@public.gmane.org> >> Snag here is that iio_interrupt_trigger is a very linux specific >> name and device tree bindings should be just about the hardware. >> >> Not entirely sure how we avoid this though as the use is rather >> hard to describe generically. >> >> cc'd device tree list and bindings maintainers. >> >> As a brief summary - this IIO trigger driver takes a generic >> interrupt (from whatever) and uses it to drive sampling of IIO devices. >> The interrupt might be associated with particularly simple sensors directly >> but is more commonly a gpio interrupt line used cause samples to be captured >> from unrelated devices. Sometimes the source of that interrupt can be a convoluted >> external mux setup over which linux has no control for example. > > If linux has no control of the setup, then do we care? It's just some > blackbox driving a signal. > >> Any suggestions on appropriate naming? > > I would think of it outside of IIO perhaps. We already have gpio-keys > which is kind of similar. Maybe just "external interrupt"? Is it always > a GPIO interrupt or could be polled GPIO or some other mechanism? The challenge is that we need to be able to capture it's use. > > Could you add "trigger-gpios" to every device that uses it and allow for > it to appear multiple times? It somewhat depends on how static setting > the trigger source is whether that would be appropriate. Right now we don't have a device - the interrupt trigger is only soft associated (via sysfs) with it's users at a later date. I think we just have 'make up a device' for this to represent the use case so we can probe the interrupt trigger driver in iio. sensor sampling trigger perhaps? > >> We aren't really describing hardware here, rather a policy decision on what >> a given interrupt is to be used for. >> >> I suppose ultimately we could take the view this should be handled via another >> route (from userspace via an appropriate configfs interface for example). > > You would still need to know which GPIOs you could use or assign, so I > think we need something in DT. Absolutely. Short of allowing completely generic grabbing from a configfs call of an interrupt, definitely need to specify which interrupts are suitable for use like this. I think a 'fictional' device is going to have to exist to allow this.. Jonathan ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-12 12:08 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <cover.1455908065.git.gregor.boirie@parrot.com> [not found] ` <d8f7902dbfe6e911e6ac0d1117502a02b1212022.1455908065.git.gregor.boirie@parrot.com> [not found] ` <d8f7902dbfe6e911e6ac0d1117502a02b1212022.1455908065.git.gregor.boirie-ITF29qwbsa/QT0dZR+AlfA@public.gmane.org> 2016-02-21 19:55 ` [PATCH v1 1/2] iio:iio-interrupt-trigger: device-tree support Jonathan Cameron [not found] ` <56CA162C.5010406-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> 2016-02-22 19:05 ` Rob Herring 2016-02-23 8:24 ` Gregor Boirie 2016-03-12 12:08 ` Jonathan Cameron
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).