X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fasm-generic%2Fgpio.h;h=0af599f86df5bee53efa1745a833d386df6665a6;hb=cb7ea82059069c6509c26b1f705982c6a919a3fe;hp=b1cf95c687b082b1526cdb619f9c759ee9366afd;hpb=32ec159844d7b76f199b07412dd054ad842bdd58;p=u-boot diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index b1cf95c687..0af599f86d 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -433,6 +433,18 @@ int gpio_request_list_by_name(struct udevice *dev, const char *list_name, struct gpio_desc *desc_list, int max_count, int flags); +/** + * dm_gpio_request() - manually request a GPIO + * + * Note: This function should only be used for testing / debugging. Instead. + * use gpio_request_by_name() to pull GPIOs from the device tree. + * + * @desc: GPIO description of GPIO to request (see dm_gpio_lookup_name()) + * @label: Label to attach to the GPIO while claimed + * @return 0 if OK, -ve on error + */ +int dm_gpio_request(struct gpio_desc *desc, const char *label); + /** * gpio_get_list_count() - Returns the number of GPIOs in a list *