From: Rodolfo Giometti <giometti@enneenne.com>
To: James Nuss <jamesnuss@nanometrics.ca>
Cc: Alexander Gordeev <lasaine@lvk.cs.msu.su>,
Ricardo Martins <rasm@fe.up.pt>,
linuxpps@ml.enneenne.com, linux-kernel@vger.kernel.org
Subject: Re: [LinuxPPS] [PATCH 2/2] pps: new client driver using IRQs
Date: Fri, 29 Apr 2011 10:15:32 +0200 [thread overview]
Message-ID: <20110429081531.GL11227@gundam.enneenne.com> (raw)
In-Reply-To: <BANLkTimG0vL3Ky=ARa+7XyW4PSFdg064YQ@mail.gmail.com>
On Thu, Apr 28, 2011 at 04:03:59PM -0400, James Nuss wrote:
> >> +
> >> + if (!(res->flags & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING))) {
> >> + pr_err(PPS_IRQ_NAME ": given IRQ resource must be edge triggered");
> >> + return -EINVAL;
> >> + }
> >
> > I think it doesn't actually expect that both flags are set because it
> > always treats it as assert in the irq handler. What does your signal
> > look like?
>
> The conditional logic is that one of either IRQF_TRIGGER_RISING or
> IRQF_TRIGGER_FALLING must be set. It doesn't make much sense to have
> neither set for PPS signals.
> My intention is that the driver is generic enough so you can register
> an IRQ resource with either IRQF_TRIGGER_RISING or
> IRQF_TRIGGER_FALLING and you will get and assert event for that edge.
> Clear events are not generated as you suggest but I believe this is
> OK.
> My signal is a simple low-to-high transition indicating the PPS. But I
> believe you could register a device using this driver referencing the
> other edge if required.
The driver is ok for me but if you say that your «intention is that
the driver is generic enough» you should consider adding CLEAR events
since some GPIOs controller can manager IRQs for both edges... ;)
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@enneenne.com
Linux Device Driver giometti@linux.it
Embedded Systems phone: +39 349 2432127
UNIX programming skype: rodolfo.giometti
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
prev parent reply other threads:[~2011-04-29 8:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-27 18:14 [PATCH 2/2] pps: new client driver using IRQs James Nuss
2011-04-27 18:58 ` Rodolfo Giometti
2011-04-28 11:22 ` [LinuxPPS] " Alexander Gordeev
2011-04-28 20:03 ` James Nuss
2011-04-28 20:55 ` Alexander Gordeev
2011-04-28 21:27 ` Alexander Gordeev
2011-04-29 4:31 ` Igor Plyatov
[not found] ` <4DBA3EC3.2020209@gmail.com>
2011-04-29 8:26 ` Rodolfo Giometti
2011-05-03 17:25 ` James Nuss
2011-05-04 5:24 ` Igor Plyatov
2011-05-05 15:07 ` James Nuss
2011-05-06 4:41 ` Igor Plyatov
2011-04-29 8:15 ` Rodolfo Giometti [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=20110429081531.GL11227@gundam.enneenne.com \
--to=giometti@enneenne.com \
--cc=jamesnuss@nanometrics.ca \
--cc=lasaine@lvk.cs.msu.su \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxpps@ml.enneenne.com \
--cc=rasm@fe.up.pt \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox