Re: [PATCH 0/2] GPIO support for Socionext Synquacer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31 October 2017 at 13:13, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
> On Tue, Oct 31, 2017 at 1:27 PM, Ard Biesheuvel
> <ard.biesheuvel@xxxxxxxxxx> wrote:
>
>> I currently have this in my DTS:
>>
>> &gpio {
>>     dsw3_1 {
>>         gpios = <0 GPIO_ACTIVE_HIGH>;
>>         gpio-hog;
>>         input;
>>     };
>>
>>     dsw3_2 {
>>         gpios = <1 GPIO_ACTIVE_HIGH>;
>>         gpio-hog;
>>         input;
>>     };
>>
>>     dsw3_3 {
>>         gpios = <2 GPIO_ACTIVE_HIGH>;
>>         gpio-hog;
>>         input;
>>     };
>>
>>     dsw3_4 {
>>         gpios = <3 GPIO_ACTIVE_HIGH>;
>>         gpio-hog;
>>         input;
>>     };
>>
>>     dsw3_5 {
>>         gpios = <4 GPIO_ACTIVE_HIGH>;
>>         gpio-hog;
>>         input;
>>     };
>>
>>     dsw3_6 {
>>         gpios = <5 GPIO_ACTIVE_HIGH>;
>>         gpio-hog;
>>         input;
>>     };
>>
>>     dsw3_7 {
>>         gpios = <6 GPIO_ACTIVE_HIGH>;
>>         gpio-hog;
>>         input;
>>     };
>>
>>     dsw3_8 {
>>         gpios = <7 GPIO_ACTIVE_HIGH>;
>>         gpio-hog;
>>         input;
>>     };
>>
>> for the 8 DIP switches that are connected to GPIO lines.
>
> I have no idea how to make proper use of DIP switches really.
> We *could* route them as inputs using GPIO keys, but it would
> maybe give people the idea that it is a good idea to start
> prying them at runtime.
>
> If they don't have a usecase I would just leave them as this.
>
> I guess/hope they will not be used by userspace either.
>

Not a clue. I guess I can remove the hogs, and simply describe them
using the names.

They are probably more useful at boot time, i.e., to clear the NVRAM
and to en/disable secure boot etc.

>> So I can add the names for all the lines that have a purpose, but is
>> that orthogonal to hogging?
>
> Naming is orthogonal to hogging and should be a functional name
> for the line, preferably header name, else rail name or something
> else reasonable.
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux