lkml.org 
[lkml]   [2011]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] gpio: add pin biasing and drive mode to gpiolib
On Wed, 20 Apr 2011 14:38:01 +0200
Linus Walleij <linus.walleij@linaro.org> wrote:

> 2011/4/20 Ben Nizette <bn@niasdigital.com>:
> > On 19/04/2011, at 6:38 PM, Alan Cox wrote:
> >> Leaving aside the current input/output and on/off bits I would go for
> >> being able to do
> >>
> >>       gpio_get_property(gpio, GPIO_BIAS, GPIO_BIAS_WHATEVER);
> >>       gpio_set_property(gpio, GPIO_BIAS, GPIO_BIAS_WHATEVER_ELSE);
> >
> > Yeah I'm all for that so long as the capability constants are defined by the gpio
> > provider, eg <linux/gpio/mygpioexpander.h>.  There's no way gpiolib should be
> > keeping a big ole list of every possible config option for every gpio provider.
>
> OK I buy that. I will refactor this solution to some opaque call instead
> and start from there.
>
> > Well, maybe gpiolib can know about the options (eg GPIO_BIAS) so long
> > as it doesn't have to enumerate every possible value.
>
> I will drop that even, one parameter is better than two if one of them
> is custom nevertheless. What difference does it make..

One parameter means its completely useless and we'll have to go change
the API.

Without the 'operation' being a parameter of its own no driver knows how
to answer the question 'is this shared operation A'

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-04-20 16:57    [W:0.100 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site