Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Vasily Khoruzhick <anarsoul@gmail.com>
Cc: arm-linux <linux-arm-kernel@lists.infradead.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	Ben Dooks <ben-linux@fluff.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-gpio@vger.kernel.org
Subject: Re: DT on s3c24xx
Date: Thu, 18 Dec 2014 08:52:05 +0100	[thread overview]
Message-ID: <20141218075205.GB10857@pengutronix.de> (raw)
In-Reply-To: <CA+E=qVf4nT5x-fRFBu=Wv_VKUnEMAEP4GgJG8em8NyUFkwtbPg@mail.gmail.com>

Hello,

[Cc += linusw, linux-gpio]

On Wed, Dec 17, 2014 at 10:04:24PM +0300, Vasily Khoruzhick wrote:
> I'd like to port several s3c24xx to DT, and I'm stuck with s3c24xx LCD
> controller and power drivers for H1940 and RX1950.
> 
> Please see [1]. I want to move this function into another LCD power
> driver, but I'm not sure what to do with s3c_gpio_cfgpin(). I need to
> change pin function in runtime, and as far as I understand it should
> be handled via pinctrl driver somehow. But how?
You can pass >1 pinctrl setups to a node:

	somedevice {
		pinctrl-names = "default", "foo", "bar";
		pinctrl-0 = <&pinctrl_somedevice_default>;
		pinctrl-1 = <&pinctrl_somedevice_foo>;
		pinctrl-2 = <&pinctrl_somedevice_bar>;
		cfg-gpios = <&gpio4 12 3>, <&gpio2 7 5>;
	};

Then I think you can fiddle with pinctrl_select_state(). For the gpios
you can then use the standard gpiod_{request,direction_{in,out}put}
combo.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

       reply	other threads:[~2014-12-18  7:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CA+E=qVf4nT5x-fRFBu=Wv_VKUnEMAEP4GgJG8em8NyUFkwtbPg@mail.gmail.com>
2014-12-18  7:52 ` Uwe Kleine-König [this message]
2014-12-18  8:34   ` DT on s3c24xx Vasily Khoruzhick
2014-12-18 13:42     ` Alexandre Courbot
2014-12-18 14:53     ` 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=20141218075205.GB10857@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=anarsoul@gmail.com \
    --cc=ben-linux@fluff.org \
    --cc=kgene.kim@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-samsung-soc@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