All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Daniel Thompson <daniel.thompson@linaro.org>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	Jassi Brar <jaswinder.singh@linaro.org>,
	Masami Hiramatsu <masami.hiramatsu@linaro.org>
Subject: Re: [PATCH 0/2] GPIO support for Socionext Synquacer
Date: Tue, 31 Oct 2017 13:19:00 +0000	[thread overview]
Message-ID: <CAKv+Gu91afr_0_JzRs0b+TPwZy4g6JOnJA+EQndwCcS53NvktQ@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdb89o6b+os8RMUB-TN=Sz0UmGeesWYvqYbupNFF438kmA@mail.gmail.com>

On 31 October 2017 at 13:13, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Tue, Oct 31, 2017 at 1:27 PM, Ard Biesheuvel
> <ard.biesheuvel@linaro.org> 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.

  reply	other threads:[~2017-10-31 13:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27 20:21 [PATCH 0/2] GPIO support for Socionext Synquacer Ard Biesheuvel
2017-10-27 20:21 ` [PATCH 1/2] gpio: mb86s7x: share with other SoCs as module Ard Biesheuvel
2017-10-30 17:15   ` Ard Biesheuvel
2017-10-31 12:12   ` Linus Walleij
2017-10-27 20:21 ` [PATCH 2/2] gpio: mb86s70: Revert "Return error if requesting an already assigned gpio" Ard Biesheuvel
2017-10-28  1:53   ` Axel Lin
2017-10-31 12:14   ` Linus Walleij
2017-10-31 12:20 ` [PATCH 0/2] GPIO support for Socionext Synquacer Linus Walleij
2017-10-31 12:27   ` Ard Biesheuvel
2017-10-31 12:59     ` Ard Biesheuvel
2017-10-31 13:10       ` Linus Walleij
2017-10-31 13:13     ` Linus Walleij
2017-10-31 13:19       ` Ard Biesheuvel [this message]
2017-10-31 13:19     ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKv+Gu91afr_0_JzRs0b+TPwZy4g6JOnJA+EQndwCcS53NvktQ@mail.gmail.com \
    --to=ard.biesheuvel@linaro.org \
    --cc=daniel.thompson@linaro.org \
    --cc=jaswinder.singh@linaro.org \
    --cc=leif.lindholm@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=masami.hiramatsu@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.