git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15299fa
)
dm: gpio: Return error when pull up/down is requested but set_flags ops is not implme...
author
Zixun LI
<admin@hifiphile.com>
Mon, 21 Oct 2024 15:04:51 +0000
(17:04 +0200)
committer
Tom Rini
<trini@konsulko.com>
Wed, 4 Dec 2024 20:11:43 +0000
(14:11 -0600)
Currently in _dm_gpio_set_flags() when set_flags ops is not implemented
direction_output()/_input() is used, but pull up/down is not supported by
these ops.
Signed-off-by: Zixun LI <admin@hifiphile.com>
drivers/gpio/gpio-uclass.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/gpio-uclass.c
b/drivers/gpio/gpio-uclass.c
index
0213271
..
da929c3
100644
(file)
--- a/
drivers/gpio/gpio-uclass.c
+++ b/
drivers/gpio/gpio-uclass.c
@@
-705,6
+705,9
@@
static int _dm_gpio_set_flags(struct gpio_desc *desc, ulong flags)
if (ops->set_flags) {
ret = ops->set_flags(dev, desc->offset, flags);
} else {
+ if (flags & GPIOD_MASK_PULL)
+ return -EINVAL;
+
if (flags & GPIOD_IS_OUT) {
bool value = flags & GPIOD_IS_OUT_ACTIVE;