[PATCH v2 0/2] Add definition for GPIO direction
sre at kernel.org
Wed Nov 6 23:08:46 AEDT 2019
On Wed, Nov 06, 2019 at 10:51:06AM +0200, Matti Vaittinen wrote:
> The patch series adds definitions for GPIO line directions.
> For occasional GPIO contributor like me it is always a pain to remember
> whether 1 or 0 was used for GPIO direction INPUT/OUTPUT. Judging the
> fact that I removed few comments like:
> /* Return 0 if output, 1 if input */
> /* This means "out" */
> return 1; /* input */
> return 0; /* output */
> it seems at least some others may find it hard to remember too. Adding
> defines for these values helps us who really have good - but short
> duration - memory :]
> This idea comes from RFC series for ROHM BD71828 PMIC and was initially
> discussed with Linus Walleij here:
> but as this has no dependencies to BD71828 work (which probably takes a
> while) I decided to make it independent series.
> Patches are compile-tested only. I have no HW to really test them. Thus I'd
> appreciate carefull review. This work is mainly about converting zeros
> and ones to the new defines but it wouldn't be first time I get it
> Changelog v2:
> - squashed patches 2-61 into patch 2.
> - dropped patch 62 (can be applied later)
> - rebased (cherry-picked) changes on top of GPIO devel branch.
> Patch 1:
> - adds the defines
> Patch 2:
> - convert drivers to use new defines
> This patch series is based on GPIO tree devel branch.
> Matti Vaittinen (2):
> gpio: Add definition for GPIO direction
> gpio: Use new GPIO_LINE_DIRECTION
> include/linux/gpio/driver.h | 3 +++
> 61 files changed, 214 insertions(+), 102 deletions(-)
Maybe also update the GPIO drivers in pinctrl?
$ git grep -l gpio_get_direction drivers/pinctrl
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the Linux-aspeed