Skip to content

Commit 447e140

Browse files
andy-shevBartosz Golaszewski
authored andcommitted
gpio: Remove legacy API documentation
In order to discourage people to use old and legacy GPIO APIs remove the respective documentation completely. It also helps further cleanups of the legacy GPIO API leftovers, which is ongoing task. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Hu Haowen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 1613e60 commit 447e140

File tree

9 files changed

+2
-1900
lines changed

9 files changed

+2
-1900
lines changed

Documentation/driver-api/gpio/board.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ GPIO Mappings
44

55
This document explains how GPIOs can be assigned to given devices and functions.
66

7-
Note that it only applies to the new descriptor-based interface. For a
8-
description of the deprecated integer-based GPIO interface please refer to
9-
legacy.rst (actually, there is no real mapping possible with the old
10-
interface; you just fetch an integer from somewhere and request the
11-
corresponding GPIO).
12-
137
All platforms can enable the GPIO library, but if the platform strictly
148
requires GPIO functionality to be present, it needs to select GPIOLIB from its
159
Kconfig. Then, how GPIOs are mapped depends on what the platform uses to

Documentation/driver-api/gpio/consumer.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
GPIO Descriptor Consumer Interface
33
==================================
44

5-
This document describes the consumer interface of the GPIO framework. Note that
6-
it describes the new descriptor-based interface. For a description of the
7-
deprecated integer-based GPIO interface please refer to legacy.rst.
5+
This document describes the consumer interface of the GPIO framework.
86

97

108
Guidelines for GPIOs consumers

Documentation/driver-api/gpio/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Contents:
1313
consumer
1414
board
1515
drivers-on-gpio
16-
legacy
1716
bt8xxgpio
1817

1918
Core

Documentation/driver-api/gpio/intro.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@ The documents in this directory give detailed instructions on how to access
1010
GPIOs in drivers, and how to write a driver for a device that provides GPIOs
1111
itself.
1212

13-
Due to the history of GPIO interfaces in the kernel, there are two different
14-
ways to obtain and use GPIOs:
15-
16-
- The descriptor-based interface is the preferred way to manipulate GPIOs,
17-
and is described by all the files in this directory excepted legacy.rst.
18-
- The legacy integer-based interface which is considered deprecated (but still
19-
usable for compatibility reasons) is documented in legacy.rst.
20-
21-
The remainder of this document applies to the new descriptor-based interface.
22-
legacy.rst contains the same information applied to the legacy
23-
integer-based interface.
24-
2513

2614
What is a GPIO?
2715
===============

Documentation/driver-api/gpio/legacy.rst

Lines changed: 0 additions & 679 deletions
This file was deleted.

Documentation/translations/zh_CN/driver-api/gpio/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
:caption: 目录
1919
:maxdepth: 2
2020

21-
legacy
22-
2321
Todolist:
2422

2523
* intro

Documentation/translations/zh_CN/driver-api/gpio/legacy.rst

Lines changed: 0 additions & 618 deletions
This file was deleted.

Documentation/translations/zh_TW/gpio.txt

Lines changed: 0 additions & 574 deletions
This file was deleted.

include/linux/gpio.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
22
/*
3-
* <linux/gpio.h>
3+
* NOTE: This header *must not* be included.
44
*
55
* This is the LEGACY GPIO bulk include file, including legacy APIs. It is
66
* used for GPIO drivers still referencing the global GPIO numberspace,
@@ -16,8 +16,6 @@
1616

1717
struct device;
1818

19-
/* see Documentation/driver-api/gpio/legacy.rst */
20-
2119
/* make these flag values available regardless of GPIO kconfig options */
2220
#define GPIOF_DIR_OUT (0 << 0)
2321
#define GPIOF_DIR_IN (1 << 0)
@@ -121,8 +119,6 @@ static inline int gpio_to_irq(unsigned gpio)
121119

122120
int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
123121

124-
/* CONFIG_GPIOLIB: bindings for managed devices that want to request gpios */
125-
126122
int devm_gpio_request(struct device *dev, unsigned gpio, const char *label);
127123
int devm_gpio_request_one(struct device *dev, unsigned gpio,
128124
unsigned long flags, const char *label);

0 commit comments

Comments
 (0)