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]
Date:   Mon, 20 Feb 2017 16:38:09 +0100
From:   Bartosz Golaszewski <bgolaszewski@...libre.com>
To:     Sekhar Nori <nsekhar@...com>
Cc:     David Lechner <david@...hnology.com>,
        Kevin Hilman <khilman@...libre.com>,
        Michael Turquette <mturquette@...libre.com>,
        Patrick Titiano <ptitiano@...libre.com>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Russell King <linux@...linux.org.uk>,
        linux-devicetree <devicetree@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        arm-soc <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 4/4] ARM: dts: da850-evm: add the UI expander node

2017-02-20 10:36 GMT+01:00 Sekhar Nori <nsekhar@...com>:
> On Thursday 16 February 2017 11:45 PM, Bartosz Golaszewski wrote:
>> If we're using the UI board and want vpif capture, we need to select
>> the video capture functionality by driving the sel_c pin low on the
>> tca6416 expander and sel_a & sel_b pins high. Do it statically by
>> hogging relevant GPIOs in the device tree.
>>
>> Signed-off-by: Bartosz Golaszewski <bgolaszewski@...libre.com>
>> ---

[snip]

>>
>> +                             sel_a {
>> +                                     gpio-hog;
>> +                                     gpios = <7 GPIO_ACTIVE_HIGH>;
>> +                                     output-high;
>> +                                     line-name = "sel_a";
>> +                             };
>> +
>> +                             sel_b {
>> +                                     gpio-hog;
>> +                                     gpios = <6 GPIO_ACTIVE_HIGH>;
>> +                                     output-high;
>> +                                     line-name = "sel_b";
>> +                             };
>> +
>> +                             sel_c {
>> +                                     gpio-hog;
>> +                                     gpios = <5 GPIO_ACTIVE_HIGH>;
>> +                                     output-low;
>> +                                     line-name = "sel_c";
>
> I think this is better handled by using an enable-gpios property in vpif
> capture device-tree node. So in the vpif capture node you would have:
>
>         enable-gpios =  <&tca6416 7 GPIO_ACTIVE_HIGH
>                          &tca6416 6 GPIO_ACTIVE_HIGH
>                          &tca6416 5 GPIO_ACTIVE_LOW>;
>
> and in the vpif capture driver, you would request each of these gpios
> using: devm_gpiod_get_array_optional(.., .., GPIOD_OUT_HIGH);
>

I'm not sure about this one - the result is the same (function still
defined statically in the DT) while now it requires changes to the
vpif driver too.

Is there any other reason we'd prefer this approach?

Thanks,
Bartosz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ