Re: [PATCH 2/2] iio: xilinx-xadc: Make IRQ optional

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

 



On 4/25/21 5:25 PM, Jonathan Cameron wrote:
On Sun, 25 Apr 2021 12:26:38 +0200
Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:

In some setups the IRQ signal of the XADC might not be wired to the host
system. The driver currently requires that an interrupt is specified. Make
the interrupt optional so the driver can be used in such setups where the
interrupt is not connected.

Since both buffered capture as well as events depend on the interrupt being
connected both are not available when the interrupt is not connected.

Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
Code looks fine to me but raises a question.  As there is no validate_trigger
callback in this driver, nothing stops it being associated with for example
an hrtimer trigger.  I don't think that will work so perhaps we should add the
callback?  If it does work, then the presence or not of an irq should not
change whether we register the buffer.

This is a good point. But the driver can actually work with a hrtimer trigger. You'd get aliasing problems and all that stuff, but if you only care about the instantaneous values it will work.

Without an IRQ we should only mask out the events and not register the triggers. Registering the buffer should be fine.

- Lars




[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