lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090615125025.GB19873@fluff.org.uk>
Date:	Mon, 15 Jun 2009 13:50:25 +0100
From:	Ben Dooks <ben-linux@...ff.org>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Ben Dooks <ben-linux@...ff.org>, Alek Du <alek.du@...el.com>,
	Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpiolib: Add gpio_detect, gpio_debounce and
	gpio_alt_func features to GPIOLIB

On Mon, Jun 15, 2009 at 11:02:53AM +0100, Mark Brown wrote:
> On Mon, Jun 15, 2009 at 10:50:23AM +0100, Ben Dooks wrote:
> > On Mon, Jun 15, 2009 at 05:15:02PM +0800, Alek Du wrote:
> 
> > > * gpio_alt_func is to set pin as alternative function or GPIO.
> 
> > gpio_alt_func is feature creep, I don't really belive this is the
> > best place to put it as it will be difficult to actually make this
> > generic for all gpio platforms.
> 
> Since the proposed API just passes a value through to the driver for the
> GPIO chip it looks generic enough - each chip can define whatever set of
> constants it likes.  I'd expect a large proportion of driver specific
> APIs would end up just the same.
> 
> Given the number of manufacturers that don't use a separate term like
> the PXA MFP for the alternative functions of their GPIOs it makes sense
> to have a gpiolib API for this.  Without one you end up having each
> driver needing to add its own API, and since the pins are just referred
> to as GPIOs in the documentation the API will have that in the name and
> look like it ought to be connected with gpiolib.

Yes, however I can see some horrible problems ahead as soon as people
try and then try and standardise the values passed through this. The
GPIO API was meant to be a lightweight way of allowing drivers at
GPIOs, now everyone seems to want to push whatever they feel like in.

-- 
Ben (ben@...ff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ