linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: alsa-devel@alsa-project.org, linux-aspeed@lists.ozlabs.org,
	"David Daney" <david.daney@cavium.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Kuppuswamy Sathyanarayanan"
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Peter Tyser" <ptyser@xes-inc.com>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Marek Behun" <marek.behun@nic.cz>,
	"Fabio Estevam" <festevam@gmail.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	"Marek Vasut" <marek.vasut+renesas@gmail.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Kevin Hilman" <khilman@kernel.org>,
	"Michal Simek" <michal.simek@xilinx.com>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"Bartosz Golaszewski" <bgolaszewski@baylibre.com>,
	"Ludovic Desroches" <ludovic.desroches@microchip.com>,
	"Bamvor Jian Zhang" <bamv2005@gmail.com>,
	"Joel Stanley" <joel@jms.id.au>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	bcm-kernel-feedback-list@broadcom.com,
	"NXP Linux Team" <linux-imx@nxp.com>,
	linux-pwm@vger.kernel.org,
	"Grygorii Strashko" <grygorii.strashko@ti.com>,
	"Charles Keepax" <ckeepax@opensource.cirrus.com>,
	"Alexandre Torgue" <alexandre.torgue@st.com>,
	mazziesaccount@gmail.com, "Ray Jui" <rjui@broadcom.com>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"William Breathitt Gray" <vilhelm.gray@gmail.com>,
	linux-gpio@vger.kernel.org,
	"Richard Fitzgerald" <rf@opensource.cirrus.com>,
	"Santosh Shilimkar" <ssantosh@kernel.org>,
	linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	"Scott Branden" <sbranden@broadcom.com>,
	"Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Andrew Jeffery" <andrew@aj.id.au>,
	patches@opensource.cirrus.com, linux-kernel@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org,
	"Thorsten Scherer" <t.scherer@eckelmann.de>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Enrico Weigelt, metux IT consult" <info@metux.net>
Subject: Re: [PATCH v2 0/2] Add definition for GPIO direction
Date: Wed, 6 Nov 2019 13:08:46 +0100	[thread overview]
Message-ID: <20191106120846.5bunrqj3uz4khih5@earth.universe> (raw)
In-Reply-To: <cover.1573029228.git.matti.vaittinen@fi.rohmeurope.com>


[-- Attachment #1.1: Type: text/plain, Size: 2820 bytes --]

Hi,

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:
> https://lore.kernel.org/lkml/c06725c3dd34118a324907137758d8b85b3d4043.camel@fi.rohmeurope.com/
> 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
> wrong.
> 
> 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
> 
>  drivers/gpio/*
>  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
drivers/pinctrl/bcm/pinctrl-bcm2835.c
drivers/pinctrl/bcm/pinctrl-iproc-gpio.c
drivers/pinctrl/intel/pinctrl-baytrail.c
drivers/pinctrl/intel/pinctrl-cherryview.c
drivers/pinctrl/intel/pinctrl-intel.c
drivers/pinctrl/mediatek/pinctrl-mtk-common.c
drivers/pinctrl/mediatek/pinctrl-paris.c
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
drivers/pinctrl/pinctrl-amd.c
drivers/pinctrl/pinctrl-at91.c
drivers/pinctrl/pinctrl-axp209.c
drivers/pinctrl/pinctrl-ingenic.c
drivers/pinctrl/pinctrl-ocelot.c
drivers/pinctrl/pinctrl-oxnas.c
drivers/pinctrl/pinctrl-pic32.c
drivers/pinctrl/pinctrl-pistachio.c
drivers/pinctrl/pinctrl-rk805.c
drivers/pinctrl/pinctrl-rockchip.c
drivers/pinctrl/pinctrl-rza1.c
drivers/pinctrl/pinctrl-st.c
drivers/pinctrl/pinctrl-stmfx.c
drivers/pinctrl/pinctrl-sx150x.c
drivers/pinctrl/qcom/pinctrl-msm.c
drivers/pinctrl/stm32/pinctrl-stm32.c
drivers/pinctrl/vt8500/pinctrl-wmt.c

-- Sebastian

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-11-06 12:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06  8:51 [PATCH v2 0/2] Add definition for GPIO direction Matti Vaittinen
2019-11-06  8:51 ` [PATCH v2 1/2] gpio: " Matti Vaittinen
2019-11-07  8:20   ` Linus Walleij
2019-11-06  8:54 ` [PATCH v2 2/2] gpio: Use new GPIO_LINE_DIRECTION Matti Vaittinen
2019-11-06 14:22   ` Andy Shevchenko
2019-11-06 14:43   ` William Breathitt Gray
2019-11-06 17:35   ` Kuppuswamy Sathyanarayanan
2019-11-06 12:08 ` Sebastian Reichel [this message]
2019-11-06 12:25   ` [PATCH v2 0/2] Add definition for GPIO direction Vaittinen, Matti
2019-11-06 14:24     ` andriy.shevchenko
2019-11-07  8:26       ` Linus Walleij
2019-11-07  8:32         ` Geert Uytterhoeven
2019-11-07  8:52         ` Vaittinen, Matti
2019-11-07 12:08           ` Sebastian Reichel
2019-11-08  7:46             ` Nandor Han
2019-11-07  8:52         ` andriy.shevchenko
2019-11-07  8:22     ` Linus Walleij
2019-11-06 14:39 ` William Breathitt Gray
2019-11-06 17:28   ` Vaittinen, Matti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191106120846.5bunrqj3uz4khih5@earth.universe \
    --to=sre@kernel.org \
    --cc=alexandre.torgue@st.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andrew@aj.id.au \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bamv2005@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=david.daney@cavium.com \
    --cc=f.fainelli@gmail.com \
    --cc=festevam@gmail.com \
    --cc=grygorii.strashko@ti.com \
    --cc=info@metux.net \
    --cc=joel@jms.id.au \
    --cc=jonathanh@nvidia.com \
    --cc=kernel@pengutronix.de \
    --cc=khilman@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=marek.behun@nic.cz \
    --cc=marek.vasut+renesas@gmail.com \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=mazziesaccount@gmail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=michal.simek@xilinx.com \
    --cc=patches@opensource.cirrus.com \
    --cc=ptyser@xes-inc.com \
    --cc=rf@opensource.cirrus.com \
    --cc=rjui@broadcom.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=sbranden@broadcom.com \
    --cc=shawnguo@kernel.org \
    --cc=ssantosh@kernel.org \
    --cc=t.scherer@eckelmann.de \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=vilhelm.gray@gmail.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).