lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMz4kuJrUtC6HL0Lbuqsoa2cMB9-2zuHMii1v7Y_-jCyKiL8qQ@mail.gmail.com>
Date:   Fri, 24 Mar 2017 19:56:12 +0800
From:   Baolin Wang <baolin.wang@...aro.org>
To:     Chanwoo Choi <cw00.choi@...sung.com>
Cc:     myungjoo.ham@...sung.com, robh+dt@...nel.org,
        Mark Rutland <mark.rutland@....com>,
        Mark Brown <broonie@...nel.org>,
        Linaro Kernel Mailman List <linaro-kernel@...ts.linaro.org>,
        LKML <linux-kernel@...r.kernel.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH 1/2] extcon: usb-gpio: Add level trigger support

Hi,

On 24 March 2017 at 19:08, Chanwoo Choi <cw00.choi@...sung.com> wrote:
> Hi,
>
> On 2017년 03월 20일 16:59, Baolin Wang wrote:
>> Now extcon-usb-gpio only supports for GPIO egdge trigger, but VBUS/ID
>> gpios' detection can be triggered by the level trigger on some platforms.
>> Thus intoduce one property 'extcon-gpio,level-trigger' to identify this
>> situation.
>>
>> Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
>> ---
>>  .../devicetree/bindings/extcon/extcon-usb-gpio.txt |    3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt
>> index dfc14f7..191504b 100644
>> --- a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt
>> +++ b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt
>> @@ -9,6 +9,9 @@ Required properties:
>>  Either one of id-gpio or vbus-gpio must be present. Both can be present as well.
>>  - id-gpio: gpio for USB ID pin. See gpio binding.
>>  - vbus-gpio: gpio for USB VBUS pin.
>> +- extcon-gpio,level-trigger: Boolean, set this gpio's interrupt flag to
>
> It is 'extcon-usb-gpio' instead of 'extcon-gpio'.

Sure.

>
>> +level trigger. If not specified defaults to false, gpio's interrupt flag
>> +defaults to edge trigger.
>
> I understand why you need the new flag.
> But, I'm not sure it is right way to add the new flag for interrupt flag.
>
> IMHO, I think that we need to find the more proper way to get the interrupt flag
> or maybe, we may need to implement the new helper api to get the interrupt
> flag for gpio pin when we use the gpio as the interrupt source,

Yes, I agree with you. We already have helper functions to get
interrupt flag from device tree, but we can not get the irq number of
GPIO to configure in device tree, then I introduce one new flag to
indicate the trigger type. But I like to change the patch if there are
any good suggestion. Thanks.

-- 
Baolin.wang
Best Regards

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ