linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PULL gpio-for-next] gpio: make flags mandatory for gpiod_get functions
       [not found] <1434404169-4639-1-git-send-email-u.kleine-koenig@pengutronix.de>
@ 2015-07-06  9:07 ` Uwe Kleine-König
  2015-07-06  9:09   ` [PATCH gpio-for-next 05/10] media: i2c/adp1653: set enable gpio to output Uwe Kleine-König
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2015-07-06  9:07 UTC (permalink / raw)
  To: Linus Walleij, Alexandre Courbot
  Cc: linux-gpio, kernel, Aloisio Almeida Jr, Charles Gorand,
	Daniel Mack, David Airlie, dri-devel, Ezequiel Garcia,
	Felipe Balbi, Greg Kroah-Hartman, Haojian Zhuang, Hartmut Knaack,
	Heikki Krogerus, Irina Tirdea, Jonathan Cameron,
	Kishon Vijay Abraham I, Lars-Peter Clausen, Lauro Ramos Venancio,
	linux-iio, linux-media, linux-nfc, linux-omap, linux-usb,
	Mauro Carvalho Chehab, Oleg Zhurakivskyy, Pavel Machek,
	Peter Meerwald, Robert Jarzmik, Sakari Ailus, Samuel Ortiz,
	Tiberiu Breana

Hello,

now that all patches that were in next hit Linus Torvalds' tree and
v4.2-rc1 is out here comes the promised pull request that makes usage of
the flags parameter mandatory for gpiod_get et al:

The following changes since commit d770e558e21961ad6cfdf0ff7df0eb5d7d4f0754:

  Linux 4.2-rc1 (2015-07-05 11:01:52 -0700)

are available in the git repository at:

  git://git.pengutronix.de/git/ukl/linux.git tags/gpiod-flags-for-4.3

for you to fetch changes up to b17d1bf16cc72a374a48d748940f700009d40ff4:

  gpio: make flags mandatory for gpiod_get functions (2015-07-06 10:39:24 +0200)

----------------------------------------------------------------
The last patch in this series makes the flags parameter for the various
gpiod_get* functions mandatory and so allows to remove an ugly cpp hack
introduced in commit 39b2bbe3d715 (gpio: add flags argument to gpiod_get*()
functions) for v3.17-rc1.

The other nine commits fix the last remaining users of these functions that
don't pass flags yet. (Only etraxfs-uart wasn't fixed; this driver's use of the
gpiod functions needs fixing anyhow.)

----------------------------------------------------------------

According to the coccinelle-script I wrote all users (apart from
etraxfs-uart) are fixed now.

As some of the maintainers requested it, I'll resend the patches
contained in this series as a reply to this mail.

It would be great if this could be put into next via the gpio tree to
give new users enough time to adapt their patches.

Thanks
Uwe

Uwe Kleine-König (10):
      drm/msm/dp: use flags argument of devm_gpiod_get to set direction
      drm/tilcdc: panel: make better use of gpiod API
      iio: light: stk3310: use flags argument of devm_gpiod_get
      iio: magn: bmc150: use flags argument of devm_gpiod_get
      media: i2c/adp1653: set enable gpio to output
      NFC: nxp-nci_i2c: use flags argument of devm_gpiod_get_index
      phy: tusb1210: make better use of gpiod API
      usb: dwc3: pci: make better use of gpiod API
      usb: pass flags parameter to gpiod_get functions
      gpio: make flags mandatory for gpiod_get functions

 drivers/gpio/devres.c                  | 18 ++++----
 drivers/gpio/gpiolib.c                 | 16 +++----
 drivers/gpu/drm/msm/edp/edp_ctrl.c     | 17 +------
 drivers/gpu/drm/tilcdc/tilcdc_panel.c  | 22 +++------
 drivers/iio/light/stk3310.c            |  6 +--
 drivers/iio/magnetometer/bmc150_magn.c |  6 +--
 drivers/media/i2c/adp1653.c            |  2 +-
 drivers/nfc/nxp-nci/i2c.c              | 10 ++---
 drivers/phy/phy-tusb1210.c             | 30 +++++--------
 drivers/usb/dwc3/dwc3-pci.c            | 26 ++++++-----
 drivers/usb/gadget/udc/pxa27x_udc.c    |  2 +-
 drivers/usb/phy/phy-generic.c          |  6 ++-
 include/linux/gpio/consumer.h          | 82 ++++++++++------------------------
 13 files changed, 88 insertions(+), 155 deletions(-)

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH gpio-for-next 05/10] media: i2c/adp1653: set enable gpio to output
  2015-07-06  9:07 ` [PULL gpio-for-next] gpio: make flags mandatory for gpiod_get functions Uwe Kleine-König
@ 2015-07-06  9:09   ` Uwe Kleine-König
  0 siblings, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2015-07-06  9:09 UTC (permalink / raw)
  To: Linus Walleij, Alexandre Courbot
  Cc: linux-gpio, kernel, Pavel Machek, Sakari Ailus,
	Mauro Carvalho Chehab, linux-media

Without setting the direction of a gpio to output a call to
gpiod_set_value doesn't have a defined outcome.

Furthermore this is one caller less that stops us making the flags
argument to gpiod_get*() mandatory.

Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/i2c/adp1653.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c
index c70ababce954..5dd39775d6ca 100644
--- a/drivers/media/i2c/adp1653.c
+++ b/drivers/media/i2c/adp1653.c
@@ -465,7 +465,7 @@ static int adp1653_of_init(struct i2c_client *client,
 
 	of_node_put(child);
 
-	pd->enable_gpio = devm_gpiod_get(&client->dev, "enable");
+	pd->enable_gpio = devm_gpiod_get(&client->dev, "enable", GPIOD_OUT_LOW);
 	if (!pd->enable_gpio) {
 		dev_err(&client->dev, "Error getting GPIO\n");
 		return -EINVAL;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-06  9:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1434404169-4639-1-git-send-email-u.kleine-koenig@pengutronix.de>
2015-07-06  9:07 ` [PULL gpio-for-next] gpio: make flags mandatory for gpiod_get functions Uwe Kleine-König
2015-07-06  9:09   ` [PATCH gpio-for-next 05/10] media: i2c/adp1653: set enable gpio to output Uwe Kleine-König

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).