[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbJ=KiwVoeK2TgO8kMuYQ2U-LaUOdL1d7w-q+9Ggb-JnA@mail.gmail.com>
Date: Wed, 13 Feb 2013 13:51:12 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Lars Poeschel <poeschel@...onage.de>
Cc: Grant Likely <grant.likely@...retlab.ca>,
Lars Poeschel <larsi@....tu-dresden.de>,
rob.herring@...xeda.com, rob@...dley.net,
devicetree-discuss@...ts.ozlabs.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org,
spi-devel-general@...ts.sourceforge.net
Subject: Re: [PATCH v2] gpio: mcp23s08: convert driver to DT
On Wed, Feb 13, 2013 at 12:13 PM, Lars Poeschel <poeschel@...onage.de> wrote:
> On Monday 11 February 2013 at 22:25:51, Grant Likely wrote:
>>
>> However, is the pullup selection per-gpio line? If so, then why not
>> encode it into the flags field of the gpio specifier?
>
> Yes, the pullup is per-gpio line. I am working on that. It turns out, that
> this is a bit difficult for me, as there is no real documentation and no
> other driver is doing it or something similar yet. Exception are very few
> gpio soc drivers where situation is a bit different. They seem to rely an
> fixed global gpio numbers and they are always memory mapped.
> But as I said I am working on it...
Part of your problem is that pull-up is pin control territory.
We invented that subsystem for a reason, and that reason
was that the GPIO subsystem had a hard time accomodating
things like this.
If you look in drivers/pinctrl/pinctrl-abx500.c which is my
latest submitted pinctrl driver you can see that this is basically
a quite simple GPIO chip, we just model it as a pin controller
with a GPIO front-end too exactly because it can do things
like multiplexing, pull-up and pull-down.
Have you considered this approach?
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists