summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>2026-05-11 13:02:54 +0200
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>2026-05-11 13:02:54 +0200
commitff010c4984fa5518bfbef5addce3f3b2c6555a5c (patch)
tree08c60cd33d4b65873e9189a32b39e54707dc8691 /include/linux
parentf76c8be440e53465a306c95a7d50ca8675252f82 (diff)
parent8a46bd2638f1ad6d1ed73dc3ab10919e67274738 (diff)
downloadlwn-ff010c4984fa5518bfbef5addce3f3b2c6555a5c.tar.gz
lwn-ff010c4984fa5518bfbef5addce3f3b2c6555a5c.zip
Merge tag 'ib-gpio-add-fwnode-gpiod-get-for-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into gpio/for-next
Immutable branch between the GPIO and PCI trees for v7.2 - add fwnode_gpiod_get() helper to GPIOLIB
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/gpio/consumer.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
index 3efb5cb1e1d1..e2601217a71d 100644
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
@@ -599,6 +599,15 @@ static inline int gpiod_disable_hw_timestamp_ns(struct gpio_desc *desc,
#endif /* CONFIG_GPIOLIB && CONFIG_HTE */
static inline
+struct gpio_desc *fwnode_gpiod_get(struct fwnode_handle *fwnode,
+ const char *con_id,
+ enum gpiod_flags flags,
+ const char *label)
+{
+ return fwnode_gpiod_get_index(fwnode, con_id, 0, flags, label);
+}
+
+static inline
struct gpio_desc *devm_fwnode_gpiod_get(struct device *dev,
struct fwnode_handle *fwnode,
const char *con_id,