[lkml]   [2017]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] pps-gpio: use IRQ edge config when not capturing both edges
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>;

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




HCE Engineering e-mail:
GNU/Linux Solutions
Linux Device Driver
Embedded Systems phone: +39 349 2432127
UNIX programming skype: rodolfo.giometti
Cosino Project - the quick prototyping embedded system -
Freelance ICT Italia - Consulente ICT Italia -

 \ /
  Last update: 2017-09-10 12:44    [W:0.024 / U:1.704 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site