[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTikkxkDBOgQpGr9ZGzqFeHLmWGg+GQ@mail.gmail.com>
Date: Wed, 29 Jun 2011 08:18:59 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Stijn Devriendt <highguy@...il.com>
Cc: Kyungmin Park <kmpark@...radead.org>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
linux-kernel@...r.kernel.org,
Haojian Zhuang <haojian.zhuang@...il.com>,
Rohit Vaswani <rvaswani@...eaurora.org>,
Grant Likely <grant.likely@...retlab.ca>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Russell King <linux@....linux.org.uk>,
Ben Nizette <bn@...sdigital.com>,
Lee Jones <lee.jones@...aro.org>,
H Hartley Sweeten <hartleys@...ionengravers.com>,
linux-arm-kernel@...ts.infradead.org,
Kurt Van Dijck <kurt.van.dijck@....be>
Subject: Re: [PATCH 0/2] RFC: gpio: driver-local pin configuration
2011/6/28 Stijn Devriendt <highguy@...il.com>:
> On Mon, Jun 27, 2011 at 2:37 PM, Linus Walleij <linus.walleij@...aro.org> wrote:
>> On Mon, Jun 27, 2011 at 2:02 PM, Mark Brown
>>> How about device tree usage? I guess there we'd end up doing it by
>>> putting the configuration on the GPIO end of things rather than on the
>>> GPIO user side?
>>
>> Sorry I can't quite understand that, please elaborate!
>>
>
> I have some code doing this as well (in a very limited fashion):
>
> int of_request_gpio(..., int* remaining_flags)
> {
> of_get_gpio_flags(of_dev, i, remaining_flags)
> if (flags & bias_X) {
> gpio_set_bias(gpio, ...)
> flags &= ~bias_X
> }
> // interpret all generic flags here
> };
>
> So drivers need not worry about all gpio flags and special things.
> They just request the pin; what they receive is a fully configured
> pin (with the exception of unknown flags passed out via
> remaining_flags).
Sorry there is something I don't get here or there is something you
assume, maybe.
How does this kind of design account for the case where you need
to change the biasing at runtime?
Thanks,
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