public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Diego Elio Pettenò" <flameeyes@flameeyes.eu>,
	"Grant Likely" <grant.likely@secretlab.ca>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Linus Walleij" <linus.walleij@stericsson.com>,
	"Denis Turischev" <denis@compulab.co.il>
Subject: Re: [PATCH] gpio: add support for ITE IT87xx Super I/O GPIO.
Date: Mon, 19 Mar 2012 06:56:36 -0700	[thread overview]
Message-ID: <20120319135636.GA30456@ericsson.com> (raw)
In-Reply-To: <CACRpkdbZJR7NObUQCkjCEu3KedS5bfD4TuMGakL_N7BxKNUJnA@mail.gmail.com>

On Mon, Mar 19, 2012 at 04:26:44AM -0400, Linus Walleij wrote:
> On Mon, Mar 19, 2012 at 1:54 AM, Guenter Roeck
> <guenter.roeck@ericsson.com> wrote:
> > On Sun, Mar 18, 2012 at 07:14:45PM -0400, Linus Walleij wrote:
> >> On Sat, Mar 17, 2012 at 7:53 PM, Diego Elio Pettenņ
> >> <flameeyes@flameeyes.eu> wrote:
> >>
> >> > Another reason to have a MFD driver would be to allow tweaking the few
> >> > more knobs that (at least IT8728F) expose, such as the ability to switch
> >> > a few pre-defined inputs and outputs to GPIO instead, and so on...
> >>
> >> Hm that sounds an awful lot like pin multiplexing. Is that the case?
> >>
> > Depending on the chip configuration, a physical pin may be a GPIO pin, or a UART pin,
> > or a fan control pin, or a FD pin, or something else. This does not apply to all pins,
> > but to many of the GPIO pins.
> 
> OK that is pinmuxing, if that is to be software-controlled the place to do
> it is in drivers/pinctrl. (Documentation/pinctrl.txt gives the backrgound.)
> 
> The rule is in that case to put the driver below drivers/pinctrl/* and also
> expose a gpiolib interface from that driver.
> 
> As we convert drivers to the new pinctrl interfaces we tend to move them
> from drivers/gpio to drivers/pinctrl. But no biggie, if pinctrl is added later,
> it can be moved by then. I'm mainly concerned with blocking any
> extra custom interfaces to the gpio drivers.
> 
Personally I would not dare touch those pins. If a pin is configured as UART pin
(or whatever), it is quite unlikely that it is exposed as GPIO pin. Worst case,
changing the configuration may result in broken hardware. Not sure what is supposed
to be gained by enabling the user to do that.

Guenter

  reply	other threads:[~2012-03-19 14:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-16 19:48 [PATCH] gpio: add support for ITE IT87xx Super I/O GPIO Diego Elio Pettenò
2012-03-17  3:01 ` Guenter Roeck
     [not found] ` <20120317123151.AAF9A3E0952@localhost>
2012-03-17 18:53   ` Diego Elio Pettenò
2012-03-18 16:07     ` Guenter Roeck
2012-03-19 15:51       ` Diego Elio Pettenò
2012-03-18 23:14     ` Linus Walleij
2012-03-19  0:54       ` Guenter Roeck
2012-03-19  8:26         ` Linus Walleij
2012-03-19 13:56           ` Guenter Roeck [this message]
2012-03-19 14:05             ` Linus Walleij
2012-03-19 16:39               ` Guenter Roeck
2012-03-19 16:01         ` Diego Elio Pettenò
2012-03-19 16:43           ` Guenter Roeck
2012-03-19 16:54             ` Diego Elio Pettenò
2012-03-19 17:22               ` Guenter Roeck

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=20120319135636.GA30456@ericsson.com \
    --to=guenter.roeck@ericsson.com \
    --cc=denis@compulab.co.il \
    --cc=flameeyes@flameeyes.eu \
    --cc=grant.likely@secretlab.ca \
    --cc=linus.walleij@linaro.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-kernel@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