lkml.org 
[lkml]   [2016]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH v3 2/2] usb: typec: Type-C Port Controller Interface driver (tcpci)
On Fri, Sep 30, 2016 at 5:12 PM, Jun Li <jun.li@nxp.com> wrote:
[ ... ]
>>
>> >> + err = devm_request_threaded_irq(tcpci->dev, client->irq, NULL,
>> >> + tcpci_irq,
>> >> + IRQF_TRIGGER_FALLING,
>> >
>> > IRQF_ONESHOT is required, and do we need the irq trigger to be
>> > IRQF_TRIGGER_LOW?
>> >
>>
>> Good question; I don't really know. IRQF_TRIGGER_FALLING definitely seems
>> to be wrong (and I don't recall where I got it from). Not sure about
>> IRQF_TRIGGER_LOW. Can you test on real hardware, by any chance ?
>>
>
> I tested on real hardware, IRQF_TRIGGER_LOW can work fine, so I think
> the right flag should be IRQF_TRIGGER_LOW | IRQF_ONESHOT.
>
I had wondered if the trigger should be part of the devicetree file.
However, TCPCI specifies (chapter 4, bullet point 6), that "The TCPC
shall have an open drain output, active low Alert# Pin. This pin is
used to indicate a change of state, where Alert# pin is asserted when
a ny Alert Bits are set."

Given that, I agree, and I'll add IRQF_TRIGGER_LOW.

Thanks,
Guenter

\
 
 \ /
  Last update: 2016-10-01 18:28    [W:0.105 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site