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
66
77 #include "gpiolib.h"
88
9+/*
10+ * **DEPRECATED** This function is deprecated and must not be used in new code.
11+ */
912 void gpio_free(unsigned gpio)
1013 {
1114 gpiod_free(gpio_to_desc(gpio));
@@ -17,6 +20,8 @@ EXPORT_SYMBOL_GPL(gpio_free); · 5 unmodified lines
1720 * @gpio: the GPIO number
1821 * @flags: GPIO configuration as specified by GPIOF_*
1922 * @label: a literal description string of this GPIO
23+ *
24+ * **DEPRECATED** This function is deprecated and must not be used in new code.
2025 */
2126 int gpio_request_one(unsigned gpio, unsigned long flags, const char *label)
2227 {
@@ -53,6 +58,9 @@ int gpio_request_one(unsigned gpio, unsigned long flags, const char *label) · 30 unmodified lines
5358 }
5459 EXPORT_SYMBOL_GPL(gpio_request_one);
5560
61+/*
62+ * **DEPRECATED** This function is deprecated and must not be used in new code.
63+ */
5664 int gpio_request(unsigned gpio, const char *label)
5765 {
5866 struct gpio_desc *desc = gpio_to_desc(gpio);
@@ -69,6 +77,8 @@ EXPORT_SYMBOL_GPL(gpio_request); · 10 unmodified lines
6977 * gpio_request_array - request multiple GPIOs in a single call
7078 * @array: array of the 'struct gpio'
7179 * @num: how many GPIOs in the array
80+ *
81+ * **DEPRECATED** This function is deprecated and must not be used in new code.
7282 */
7383 int gpio_request_array(const struct gpio *array, size_t num)
7484 {
@@ -92,6 +102,8 @@ EXPORT_SYMBOL_GPL(gpio_request_array); · 17 unmodified lines
92102 * gpio_free_array - release multiple GPIOs in a single call
93103 * @array: array of the 'struct gpio'
94104 * @num: how many GPIOs in the array
105+ *
106+ * **DEPRECATED** This function is deprecated and must not be used in new code.
95107 */
96108 void gpio_free_array(const struct gpio *array, size_t num)
97109 {
drivers/gpio/gpiolib-of.c+2−0
@@ -414,6 +414,8 @@ out: · 413 unmodified lines
414414 * @propname: Name of property containing gpio specifier(s)
415415 * @index: index of the GPIO
416416 *
417+ * **DEPRECATED** This function is deprecated and must not be used in new code.
418+ *
417419 * Returns GPIO number to use with Linux generic GPIO API, or one of the errno
418420 * value on the error condition.
419421 */

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