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]
Date:	Fri, 20 Sep 2013 19:59:00 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Alexandre Courbot <acourbot@...dia.com>
Cc:	Arnd Bergmann <arnd@...db.de>,
	Grant Likely <grant.likely@...aro.org>,
	Thierry Reding <thierry.reding@...il.com>,
	Stephen Warren <swarren@...dotorg.org>,
	Alexandre Courbot <gnurou@...il.com>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [RFC 5/5] gpiolib: update documentation

On Wed, Sep 4, 2013 at 1:29 PM, Alexandre Courbot <acourbot@...dia.com> wrote:

> +The GPIO framework has quite a bit of history behind it. Currently there exist
> +two different (although very similar) ways of using GPIOs:
> +
> +  - The legacy integer-based interface represents GPIOs as integers. This is
> +    the "historic" way of accessing GPIOs and it was done so because it makes
> +    GPIOs easy to represent and also allows for the compiler to statically know
> +    the GPIO number and use fast-paths on GPIOs for which performance matters.
> +    However, GPIOs can easily be forged this way, and the maximum number of
> +    GPIOs in the system must be known in advance. Functions of this interface
> +    are prefixed with "gpio_".
> +
> +  - The new descriptor-based interface represents GPIOs as an opaque pointer.
> +    This ensures GPIOs are properly acquired before usage, and also does not
> +    presume anything about their underlying implementation. This interface
> +    provides get/put functions to acquire GPIOs according to their function for
> +    a particular device, similarly to e.g. the regulator framework. For these
> +    reasons, it is the preferred way to access GPIOs. Its functions are prefixed
> +    with "gpiod_".

I would put all the new style gpiod_* based things on top of the file, and
all the old stuff under a separate heading below DEPRECATED LEGACY INTERFACE
so it's crystal clear that this is going away.

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