devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Rob Herring <robh@kernel.org>
Cc: Markus Pargmann <mpa@pengutronix.de>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Alexandre Courbot <acourbot@nvidia.com>,
	Johan Hovold <johan@kernel.org>,
	Michael Welling <mwelling@ieee.org>,
	Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>,
	Grant Likely <grant.likely@linaro.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 3/4] gpio: dt-bindings: Declare gpio-hog optional for GPIO subnodes
Date: Wed, 9 Mar 2016 11:07:25 +0700	[thread overview]
Message-ID: <CACRpkdaem3OOP_TrZsUajxOB0ftYgLmcSr6LtFJpqN-4ETPe0A@mail.gmail.com> (raw)
In-Reply-To: <20160302154120.GA23716@rob-hp-laptop>

On Wed, Mar 2, 2016 at 10:41 PM, Rob Herring <robh@kernel.org> wrote:

> Requiring removing the gpio-hog to add a specific
> binding is a problem. AIUI, a hog will prevent any other user in the
> kernel. I think that is backwards in that a hog should only provide some
> default configuration/use.

I think there is some misunderstanding here.

- HOGS are done to hook a line up in a way so that
  it is *used* for something, such as biasing a MMC CD line
  in this example from arch/arm/boot/dts/ste-nomadik-s8815.dts:

        gpio3: gpio@101e7000 {
                /* This hog will bias the MMC/SD card detect line */
                mmcsd-gpio {
                        gpio-hog;
                        gpios = <16 0x0>;
                        output-low;
                        line-name = "card detect bias";
                };
        };

   So it's not like this line is "unused" or something.

- For the case when we want to just set up some default values
  in some registers for a GPIO line and just leave it for whatever
  consumer may turn up (whether a driver or e.g. userspace), we
  have had proposals for
  setting up initial values from the DT, using essentially the hog
  syntax but with another bool than "gpio-hog" obviously,
  "gpio-initval" or just leaving it blank was suggested in the former
  thread. (See switch discussion.)

So my view is if we want just initial configuration of lines, then handle
that separately, do not try to change the semantic meaning of the
hogs to be something else, let hogs be hogs.

Yours,
Linus Walleij

  reply	other threads:[~2016-03-09  4:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23  7:54 [PATCH 1/4] tools: gpio: Small updates for output format Markus Pargmann
2016-02-23  7:54 ` [PATCH 2/4] tools: gpio: Add necessary include paths Markus Pargmann
2016-02-23 13:26   ` Linus Walleij
2016-02-24  6:39     ` Markus Pargmann
2016-02-23  7:54 ` [PATCH 3/4] gpio: dt-bindings: Declare gpio-hog optional for GPIO subnodes Markus Pargmann
2016-02-23 13:37   ` Linus Walleij
2016-02-23 23:25   ` Rob Herring
2016-02-24  7:01     ` Markus Pargmann
2016-03-02 15:41       ` Rob Herring
2016-03-09  4:07         ` Linus Walleij [this message]
2016-03-09  3:53     ` Linus Walleij
2016-03-09  4:27       ` Rob Herring
2016-03-09  5:56         ` Linus Walleij
2016-02-23  7:54 ` [PATCH 4/4] gpio: Add parsing of DT GPIO line-names Markus Pargmann
2016-02-23 13:36   ` Linus Walleij
2016-02-24  7:03     ` Markus Pargmann
2016-03-15  8:41   ` Linus Walleij
2016-02-23 13:21 ` [PATCH 1/4] tools: gpio: Small updates for output format 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=CACRpkdaem3OOP_TrZsUajxOB0ftYgLmcSr6LtFJpqN-4ETPe0A@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=acourbot@nvidia.com \
    --cc=bamvor.zhangjian@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mpa@pengutronix.de \
    --cc=mwelling@ieee.org \
    --cc=robh@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).