You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
extcon: usb-gpio: use flags argument of devm_gpiod_get to set direction
Since 39b2bbe3d7 (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.
Without this patch there is no call to gpiod_direction_input but the
gpio is used for irq reporting and for that the line should be in input
mode.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
This commit is contained in:
committed by
Chanwoo Choi
parent
d71aadda19
commit
35eed7a076
@@ -114,7 +114,7 @@ static int usb_extcon_probe(struct platform_device *pdev)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
info->dev = dev;
|
info->dev = dev;
|
||||||
info->id_gpiod = devm_gpiod_get(&pdev->dev, "id");
|
info->id_gpiod = devm_gpiod_get(&pdev->dev, "id", GPIOD_IN);
|
||||||
if (IS_ERR(info->id_gpiod)) {
|
if (IS_ERR(info->id_gpiod)) {
|
||||||
dev_err(dev, "failed to get ID GPIO\n");
|
dev_err(dev, "failed to get ID GPIO\n");
|
||||||
return PTR_ERR(info->id_gpiod);
|
return PTR_ERR(info->id_gpiod);
|
||||||
|
|||||||
Reference in New Issue
Block a user