linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Linus Walleij <linus.walleij@linaro.org>, linux-gpio@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de
Subject: Re: configuration for nc pins without pull
Date: Thu, 28 May 2015 09:26:31 +0200	[thread overview]
Message-ID: <20150528072631.GE24769@pengutronix.de> (raw)
In-Reply-To: <20150322100059.GH5664@pengutronix.de>

On Sun, Mar 22, 2015 at 11:00:59AM +0100, Uwe Kleine-König wrote:
> Hello,
> 
> for a machine I want to configure a pin that is actually not connected
> to minimize floating. (I think this is sensible, isn't it?)
> 
> For the pinctrl I can use a hog group of the pinctrl device. At least
> one of the pins doesn't have a pullup/pulldown configuration though, so
> I want to mux it to its gpio function and set the gpio to output and the
> desired value.
> 
> Is there something nicer than defining an always-on regulator with gpios
> = <&gpio4 3 0> to accomplish that without additional code?
For the archive: Yes, there is something nicer in the meantime:

Since commit f625d4601759 (gpio: add GPIO hogging mechanism) which is
included in v4.1-rc1 you can do something like

&gpio3 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_gpio3hog>;

        ext-armclk {
                gpio-hog;
                gpios = <15 0>;
                output-low;
        };
};

in the devicetree (here for an i.MX25).

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2015-05-28  7:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-22 10:00 configuration for nc pins without pull Uwe Kleine-König
2015-03-22 14:40 ` Russell King - ARM Linux
2015-03-27  9:15 ` Linus Walleij
2015-05-28  7:26 ` Uwe Kleine-König [this message]

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=20150528072631.GE24769@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.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).