lkml.org 
[lkml]   [2011]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [LinuxPPS] [PATCH 2/2] pps: new client driver using IRQs
    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
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2011-04-29 10:19    [W:0.039 / U:60.576 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site