From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH v1 2/2] iio:iio-interrupt-trigger: sysfs poll support To: Gregor Boirie , Jonathan Cameron , linux-iio@vger.kernel.org References: <87bbff0671c93b998547114d7f595a0bee57e817.1455908065.git.gregor.boirie@parrot.com> <56CA195B.9010200@kernel.org> <56CAF1DD.8070807@parrot.com> <56CAF312.1040200@metafoo.de> <56CB0814.9040604@parrot.com> Cc: Hartmut Knaack , Peter Meerwald From: Lars-Peter Clausen Message-ID: <56CB13E3.8010305@metafoo.de> Date: Mon, 22 Feb 2016 14:57:55 +0100 MIME-Version: 1.0 In-Reply-To: <56CB0814.9040604@parrot.com> Content-Type: text/plain; charset=utf-8 List-ID: On 02/22/2016 02:07 PM, Gregor Boirie wrote: > On 02/22/2016 12:37 PM, Lars-Peter Clausen wrote: >> Add a sysfs file entry for each interrupt trigger instance allowing >> userspace to : >> * poll for interrupt events ; >>>> Why? >>> On our platform, several sensors are driven by a dedicated "real-time" >>> CPU (bare-metal context). This CPU interrupts Linux in a periodic manner >>> which in turn wakes a user process up to perform sensor fusion. >>> This sysfs poll support allows the user process to explictly wait for >>> this dedicated CPU interrupt to fetch data located in RAM then process >>> them. >> So you are only using the IIO trigger in this setup, but no buffers or >> devices? If you just want to forward the interrupt to userspace UIO might be >> the better solution in this case: >> https://www.kernel.org/doc/htmldocs/uio-howto/about.html >> >> - Lars > I forgot to mention I also need the trigger to initiate in-kernel sampling > for other IIO devices. These samples are also retrieved by the process > performing > fusion. You should still be able to export the interrupt using UIO by sharing the IRQ. - Lars