All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Anand Ashok Dumbre <anandash@xilinx.com>,
	Michal Simek <michal.simek@xilinx.com>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH 2/2] iio: xilinx-xadc: Make IRQ optional
Date: Sun, 25 Apr 2021 18:05:08 +0200	[thread overview]
Message-ID: <2d5f7509-a08e-91ec-dff7-2c70eb57aaa6@metafoo.de> (raw)
In-Reply-To: <20210425162559.11371323@jic23-huawei>

On 4/25/21 5:25 PM, Jonathan Cameron wrote:
> On Sun, 25 Apr 2021 12:26:38 +0200
> Lars-Peter Clausen <lars@metafoo.de> 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@metafoo.de>
> 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


      reply	other threads:[~2021-04-25 16:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25 10:26 [PATCH 1/2] iio: xilinx-xadc: Remove `irq` field from state struct Lars-Peter Clausen
2021-04-25 10:26 ` [PATCH 2/2] iio: xilinx-xadc: Make IRQ optional Lars-Peter Clausen
2021-04-25 15:25   ` Jonathan Cameron
2021-04-25 16:05     ` Lars-Peter Clausen [this message]

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=2d5f7509-a08e-91ec-dff7-2c70eb57aaa6@metafoo.de \
    --to=lars@metafoo.de \
    --cc=anandash@xilinx.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=michal.simek@xilinx.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.