History

gpio: legacy: mark old interfaces as deprecated in kernel docs

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.

Bartosz Golaszewski committed 2 years ago

Commit f4028861 parent 66134762 files · +14 −0Browse files

Unified · Split

2 files
  1. drivers/gpio/gpiolib-legacy.c +12 −0
  2. drivers/gpio/gpiolib-of.c +2 −0
drivers/gpio/gpiolib-legacy.c+12−0
@@ -6,6 +6,9 @@ · 5 unmodified lines
6 6
7#include "gpiolib.h"7#include "gpiolib.h"
8 8
9/*
10 * **DEPRECATED** This function is deprecated and must not be used in new code.
11 */
9void gpio_free(unsigned gpio)12void gpio_free(unsigned gpio)
10{13{
11 gpiod_free(gpio_to_desc(gpio));14 gpiod_free(gpio_to_desc(gpio));
@@ -17,6 +20,8 @@ EXPORT_SYMBOL_GPL(gpio_free); · 5 unmodified lines
17 * @gpio: the GPIO number20 * @gpio: the GPIO number
18 * @flags: GPIO configuration as specified by GPIOF_*21 * @flags: GPIO configuration as specified by GPIOF_*
19 * @label: a literal description string of this GPIO22 * @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 */
21int gpio_request_one(unsigned gpio, unsigned long flags, const char *label)26int 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}
54EXPORT_SYMBOL_GPL(gpio_request_one);59EXPORT_SYMBOL_GPL(gpio_request_one);
55 60
61/*
62 * **DEPRECATED** This function is deprecated and must not be used in new code.
63 */
56int gpio_request(unsigned gpio, const char *label)64int gpio_request(unsigned gpio, const char *label)
57{65{
58 struct gpio_desc *desc = gpio_to_desc(gpio);66 struct gpio_desc *desc = gpio_to_desc(gpio);
@@ -69,6 +77,8 @@ EXPORT_SYMBOL_GPL(gpio_request); · 10 unmodified lines
69 * gpio_request_array - request multiple GPIOs in a single call77 * gpio_request_array - request multiple GPIOs in a single call
70 * @array: array of the 'struct gpio'78 * @array: array of the 'struct gpio'
71 * @num: how many GPIOs in the array79 * @num: how many GPIOs in the array
80 *
81 * **DEPRECATED** This function is deprecated and must not be used in new code.
72 */82 */
73int gpio_request_array(const struct gpio *array, size_t num)83int 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 * gpio_free_array - release multiple GPIOs in a single call102 * gpio_free_array - release multiple GPIOs in a single call
93 * @array: array of the 'struct gpio'103 * @array: array of the 'struct gpio'
94 * @num: how many GPIOs in the array104 * @num: how many GPIOs in the array
105 *
106 * **DEPRECATED** This function is deprecated and must not be used in new code.
95 */107 */
96void gpio_free_array(const struct gpio *array, size_t num)108void gpio_free_array(const struct gpio *array, size_t num)
97{109{
drivers/gpio/gpiolib-of.c+2−0
@@ -414,6 +414,8 @@ out: · 413 unmodified lines
414 * @propname: Name of property containing gpio specifier(s)414 * @propname: Name of property containing gpio specifier(s)
415 * @index: index of the GPIO415 * @index: index of the GPIO
416 *416 *
417 * **DEPRECATED** This function is deprecated and must not be used in new code.
418 *
417 * Returns GPIO number to use with Linux generic GPIO API, or one of the errno419 * Returns GPIO number to use with Linux generic GPIO API, or one of the errno
418 * value on the error condition.420 * value on the error condition.
419 */421 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t