/* * **DEPRECATED** This function is deprecated and must not be used in new code.
*/ void gpio_free(unsigned gpio)
{
gpiod_free(gpio_to_desc(gpio));
}
EXPORT_SYMBOL_GPL(gpio_free);
/** * gpio_request_one - request a single GPIO with initial configuration * @gpio: the GPIO number * @flags: GPIO configuration as specified by GPIOF_* * @label: a literal description string of this GPIO * * **DEPRECATED** This function is deprecated and must not be used in new code. * * Returns: * 0 on success, or negative errno on failure.
*/ int gpio_request_one(unsigned gpio, unsignedlong flags, constchar *label)
{ struct gpio_desc *desc; int err;
/* Compatibility: assume unavailable "valid" GPIOs will appear later */
desc = gpio_to_desc(gpio); if (!desc) return -EPROBE_DEFER;
err = gpiod_request(desc, label); if (err) return err;
/* * **DEPRECATED** This function is deprecated and must not be used in new code.
*/ int gpio_request(unsigned gpio, constchar *label)
{ struct gpio_desc *desc;
/* Compatibility: assume unavailable "valid" GPIOs will appear later */
desc = gpio_to_desc(gpio); if (!desc) return -EPROBE_DEFER;
/** * devm_gpio_request_one - request a single GPIO with initial setup * @dev: device to request for * @gpio: the GPIO number * @flags: GPIO configuration as specified by GPIOF_* * @label: a literal description string of this GPIO * * **DEPRECATED** This function is deprecated and must not be used in new code. * * Returns: * 0 on success, or negative errno on failure.
*/ int devm_gpio_request_one(struct device *dev, unsigned gpio, unsignedlong flags, constchar *label)
{ unsigned *dr; int rc;
dr = devres_alloc(devm_gpio_release, sizeof(unsigned), GFP_KERNEL); if (!dr) return -ENOMEM;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.