We've recently had someone try to use of_get_named_gpio() in new code. Mark legacy interfaces as deprecated in kernel docs to avoid any confusion.
Unified · Split
| @@ -6,6 +6,9 @@ · 5 unmodified lines | ||
| 6 | 6 | |
| 7 | 7 | #include "gpiolib.h" |
| 8 | 8 | |
| 9 | +/* | |
| 10 | + * **DEPRECATED** This function is deprecated and must not be used in new code. | |
| 11 | + */ | |
| 9 | 12 | void gpio_free(unsigned gpio) |
| 10 | 13 | { |
| 11 | 14 | gpiod_free(gpio_to_desc(gpio)); |
| @@ -17,6 +20,8 @@ EXPORT_SYMBOL_GPL(gpio_free); · 5 unmodified lines | ||
| 17 | 20 | * @gpio: the GPIO number |
| 18 | 21 | * @flags: GPIO configuration as specified by GPIOF_* |
| 19 | 22 | * @label: a literal description string of this GPIO |
| 23 | + * | |
| 24 | + * **DEPRECATED** This function is deprecated and must not be used in new code. | |
| 20 | 25 | */ |
| 21 | 26 | int gpio_request_one(unsigned gpio, unsigned long flags, const char *label) |
| 22 | 27 | { |
| @@ -53,6 +58,9 @@ int gpio_request_one(unsigned gpio, unsigned long flags, const char *label) · 30 unmodified lines | ||
| 53 | 58 | } |
| 54 | 59 | EXPORT_SYMBOL_GPL(gpio_request_one); |
| 55 | 60 | |
| 61 | +/* | |
| 62 | + * **DEPRECATED** This function is deprecated and must not be used in new code. | |
| 63 | + */ | |
| 56 | 64 | int gpio_request(unsigned gpio, const char *label) |
| 57 | 65 | { |
| 58 | 66 | struct gpio_desc *desc = gpio_to_desc(gpio); |
| @@ -69,6 +77,8 @@ EXPORT_SYMBOL_GPL(gpio_request); · 10 unmodified lines | ||
| 69 | 77 | * gpio_request_array - request multiple GPIOs in a single call |
| 70 | 78 | * @array: array of the 'struct gpio' |
| 71 | 79 | * @num: how many GPIOs in the array |
| 80 | + * | |
| 81 | + * **DEPRECATED** This function is deprecated and must not be used in new code. | |
| 72 | 82 | */ |
| 73 | 83 | int gpio_request_array(const struct gpio *array, size_t num) |
| 74 | 84 | { |
| @@ -92,6 +102,8 @@ EXPORT_SYMBOL_GPL(gpio_request_array); · 17 unmodified lines | ||
| 92 | 102 | * gpio_free_array - release multiple GPIOs in a single call |
| 93 | 103 | * @array: array of the 'struct gpio' |
| 94 | 104 | * @num: how many GPIOs in the array |
| 105 | + * | |
| 106 | + * **DEPRECATED** This function is deprecated and must not be used in new code. | |
| 95 | 107 | */ |
| 96 | 108 | void gpio_free_array(const struct gpio *array, size_t num) |
| 97 | 109 | { |
| @@ -414,6 +414,8 @@ out: · 413 unmodified lines | ||
| 414 | 414 | * @propname: Name of property containing gpio specifier(s) |
| 415 | 415 | * @index: index of the GPIO |
| 416 | 416 | * |
| 417 | + * **DEPRECATED** This function is deprecated and must not be used in new code. | |
| 418 | + * | |
| 417 | 419 | * Returns GPIO number to use with Linux generic GPIO API, or one of the errno |
| 418 | 420 | * value on the error condition. |
| 419 | 421 | */ |