From: Rodolfo Giometti <giometti@enneenne.com>
To: Tim Harvey <tharvey@gateworks.com>,
"discussions@linuxpps.org" <discussions@linuxpps.org>
Cc: linux-kernel@vger.kernel.org,
Koen Vandeputte <koen.vandeputte@ncentric.com>
Subject: Re: [PATCH] pps-gpio: use IRQ edge config when not capturing both edges
Date: Sun, 10 Sep 2017 12:43:58 +0200 [thread overview]
Message-ID: <cf61eeea-f0a4-5a0c-e5b1-350aec64d073@enneenne.com> (raw)
In-Reply-To: <1504900414-1514-1-git-send-email-tharvey@gateworks.com>
On 08/09/2017 21:53, Tim Harvey wrote:
> PPS signals with very short pulse-widths can be missed if their state
> changes by the time the interrupt handler reads the GPIO pin state.
>
> To avoid this in the case where we are only looking for one edge we can
> use the edge configuration for the pin state but fall back to reading the
> pin if both edges are being watched.
I disagree. The "rising_edge" status should be get from the hardware and not
derived by an empirical computation. Or, at least, it should be specifically
activated by setting something like this:
pps {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pps>;
gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>;
Yes-I-want-get-signal-status-in-an-epirical-way;
compatible = "pps-gpio";
status = "okay";
};
This setting should also print a warning in order to be clear for the user that
he/she should know what he/she is doing.
Then the code should check also the compatibility with property
"assert-falling-edge"...
Ciao,
Rodolfo
--
HCE Engineering e-mail: giometti@hce-engineering.it
GNU/Linux Solutions giometti@enneenne.com
Linux Device Driver giometti@linux.it
Embedded Systems phone: +39 349 2432127
UNIX programming skype: rodolfo.giometti
Cosino Project - the quick prototyping embedded system - www.cosino.it
Freelance ICT Italia - Consulente ICT Italia - www.consulenti-ict.it
next prev parent reply other threads:[~2017-09-10 10:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-08 19:53 Tim Harvey
2017-09-10 10:43 ` Rodolfo Giometti [this message]
2017-09-12 15:54 ` Tim Harvey
2017-09-12 16:22 ` Rodolfo Giometti
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=cf61eeea-f0a4-5a0c-e5b1-350aec64d073@enneenne.com \
--to=giometti@enneenne.com \
--cc=discussions@linuxpps.org \
--cc=koen.vandeputte@ncentric.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tharvey@gateworks.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®