* [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 03/10] iio: light: stk3310: use flags argument of devm_gpiod_get Uwe Kleine-König
2015-07-06 9:09 ` [PATCH gpio-for-next 04/10] iio: magn: bmc150: " Uwe Kleine-König
0 siblings, 2 replies; 4+ 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] 4+ messages in thread
* [PATCH gpio-for-next 03/10] iio: light: stk3310: use flags argument of devm_gpiod_get
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
2015-07-06 9:35 ` Breana, Tiberiu A
2015-07-06 9:09 ` [PATCH gpio-for-next 04/10] iio: magn: bmc150: " Uwe Kleine-König
1 sibling, 1 reply; 4+ 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, Tiberiu Breana, Jonathan Cameron,
Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, linux-iio
Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions)
which appeared in v3.17-rc1, the gpiod_get* functions take an additional
parameter that allows to specify direction and initial value for output.
Simplify driver accordingly. Furthermore this is one caller less that
stops us making the flags argument to gpiod_get*() mandatory.
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/iio/light/stk3310.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
index fee4297d7c8f..84c77d42a2c6 100644
--- a/drivers/iio/light/stk3310.c
+++ b/drivers/iio/light/stk3310.c
@@ -488,16 +488,12 @@ static int stk3310_gpio_probe(struct i2c_client *client)
dev = &client->dev;
/* gpio interrupt pin */
- gpio = devm_gpiod_get_index(dev, STK3310_GPIO, 0);
+ gpio = devm_gpiod_get_index(dev, STK3310_GPIO, 0, GPIOD_IN);
if (IS_ERR(gpio)) {
dev_err(dev, "acpi gpio get index failed\n");
return PTR_ERR(gpio);
}
- ret = gpiod_direction_input(gpio);
- if (ret)
- return ret;
-
ret = gpiod_to_irq(gpio);
dev_dbg(dev, "GPIO resource, no:%d irq:%d\n", desc_to_gpio(gpio), ret);
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH gpio-for-next 04/10] iio: magn: bmc150: use flags argument of devm_gpiod_get
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 03/10] iio: light: stk3310: use flags argument of devm_gpiod_get Uwe Kleine-König
@ 2015-07-06 9:09 ` Uwe Kleine-König
1 sibling, 0 replies; 4+ 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, Jonathan Cameron, Hartmut Knaack,
Lars-Peter Clausen, Peter Meerwald, Irina Tirdea, linux-iio
Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions)
which appeared in v3.17-rc1, the gpiod_get* functions take an additional
parameter that allows to specify direction and initial value for output.
Simplify driver accordingly. Furthermore this is one caller less that
stops us making the flags argument to gpiod_get*() mandatory.
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/iio/magnetometer/bmc150_magn.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/iio/magnetometer/bmc150_magn.c b/drivers/iio/magnetometer/bmc150_magn.c
index d4c178869991..187a31fdc35a 100644
--- a/drivers/iio/magnetometer/bmc150_magn.c
+++ b/drivers/iio/magnetometer/bmc150_magn.c
@@ -839,16 +839,12 @@ static int bmc150_magn_gpio_probe(struct i2c_client *client)
dev = &client->dev;
/* data ready GPIO interrupt pin */
- gpio = devm_gpiod_get_index(dev, BMC150_MAGN_GPIO_INT, 0);
+ gpio = devm_gpiod_get_index(dev, BMC150_MAGN_GPIO_INT, 0, GPIOD_IN);
if (IS_ERR(gpio)) {
dev_err(dev, "ACPI GPIO get index failed\n");
return PTR_ERR(gpio);
}
- ret = gpiod_direction_input(gpio);
- if (ret)
- return ret;
-
ret = gpiod_to_irq(gpio);
dev_dbg(dev, "GPIO resource, no:%d irq:%d\n", desc_to_gpio(gpio), ret);
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH gpio-for-next 03/10] iio: light: stk3310: use flags argument of devm_gpiod_get
2015-07-06 9:09 ` [PATCH gpio-for-next 03/10] iio: light: stk3310: use flags argument of devm_gpiod_get Uwe Kleine-König
@ 2015-07-06 9:35 ` Breana, Tiberiu A
0 siblings, 0 replies; 4+ messages in thread
From: Breana, Tiberiu A @ 2015-07-06 9:35 UTC (permalink / raw)
To: Uwe Kleine-König, Linus Walleij, Alexandre Courbot
Cc: linux-gpio@vger.kernel.org, kernel@pengutronix.de,
Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald, linux-iio@vger.kernel.org
PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBVd2UgS2xlaW5lLUvDtm5pZyBb
bWFpbHRvOnUua2xlaW5lLWtvZW5pZ0BwZW5ndXRyb25peC5kZV0NCj4gU2VudDogTW9uZGF5LCBK
dWx5IDYsIDIwMTUgMTI6MTAgUE0NCj4gVG86IExpbnVzIFdhbGxlaWo7IEFsZXhhbmRyZSBDb3Vy
Ym90DQo+IENjOiBsaW51eC1ncGlvQHZnZXIua2VybmVsLm9yZzsga2VybmVsQHBlbmd1dHJvbml4
LmRlOyBCcmVhbmEsIFRpYmVyaXUgQTsNCj4gSm9uYXRoYW4gQ2FtZXJvbjsgSGFydG11dCBLbmFh
Y2s7IExhcnMtUGV0ZXIgQ2xhdXNlbjsgUGV0ZXIgTWVlcndhbGQ7DQo+IGxpbnV4LWlpb0B2Z2Vy
Lmtlcm5lbC5vcmcNCj4gU3ViamVjdDogW1BBVENIIGdwaW8tZm9yLW5leHQgMDMvMTBdIGlpbzog
bGlnaHQ6IHN0azMzMTA6IHVzZSBmbGFncyBhcmd1bWVudCBvZg0KPiBkZXZtX2dwaW9kX2dldA0K
PiANCj4gU2luY2UgMzliMmJiZTNkNzE1IChncGlvOiBhZGQgZmxhZ3MgYXJndW1lbnQgdG8gZ3Bp
b2RfZ2V0KigpIGZ1bmN0aW9ucykNCj4gd2hpY2ggYXBwZWFyZWQgaW4gdjMuMTctcmMxLCB0aGUg
Z3Bpb2RfZ2V0KiBmd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vX3Byb2Jl
KHN0cnVjdCBpMmNfY2xpZW50DQo+ICpjbGllbnQpDQo+ICAJZGV2ID0gJmNsaWVudC0+ZGV2Ow0K
PiANCj4gIAkvKiBncGlvIGludGVycnVwdCBwaW4gKi8NCj4gLQlncGlvID0gZGV2bV9ncGlvZF9n
ZXRfaW5kZXgoZGV2LCBTVEszMzEwX0dQSU8sIDApOw0KPiArCWdwaW8gPSBkZXZtX2dwaW9kX2dl
dF9pbmRleChkZXYsIFNUSzMzMTBfR1BJTywgMCwgR1BJT0RfSU4pOw0KPiAgCWlmIChJU19FUlIo
Z3BpbykpIHsNCj4gIAkJZGV2X2VycihkZXYsICJhY3BpIGdwaW8gZ2V0IGluZGV4IGZhaWxlZFxu
Iik7DQo+ICAJCXJldHVybiBQVFJfRVJSKGdwaW8pOw0KPiAgCX0NCj4gDQo+IC0JcmV0ID0gZ3Bp
b2RfZGlyZWN0aW9uX2lucHV0KGdwaW8pOw0KPiAtCWlmIChyZXQpDQo+IC0JCXJldHVybiByZXQ7
DQo+IC0NCj4gIAlyZXQgPSBncGlvZF90b19pcnEoZ3Bpbyk7DQo+ICAJZGV2X2RiZyhkZXYsICJH
UElPIHJlc291cmNlLCBubzolZCBpcnE6JWRcbiIsIGRlc2NfdG9fZ3BpbyhncGlvKSwNCj4gcmV0
KTsNCj4gDQo+IC0tDQo+IDIuMS40DQoNCg==
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-07-06 9:35 UTC | newest]
Thread overview: 4+ 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 03/10] iio: light: stk3310: use flags argument of devm_gpiod_get Uwe Kleine-König
2015-07-06 9:35 ` Breana, Tiberiu A
2015-07-06 9:09 ` [PATCH gpio-for-next 04/10] iio: magn: bmc150: " 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).