| /kernel/linux/linux-4.19/Documentation/devicetree/bindings/gpio/ |
| D | gpio.txt | 1 Specifying GPIO information for devices 5 ----------------- 8 properties, each containing a 'gpio-list': 10 gpio-list ::= <single-gpio> [gpio-list] 11 single-gpio ::= <gpio-phandle> <gpio-specifier> 12 gpio-phandle : phandle to gpio controller node 13 gpio-specifier : Array of #gpio-cells specifying specific gpio 16 GPIO properties should be named "[<name>-]gpios", with <name> being the purpose 17 of this GPIO for the device. While a non-existent <name> is considered valid 19 for new bindings. Also, GPIO properties named "[<name>-]gpio" are valid and old [all …]
|
| D | nvidia,tegra186-gpio.txt | 1 NVIDIA Tegra186 GPIO controllers 3 Tegra186 contains two GPIO controllers; a main controller and an "AON" 9 The Tegra186 GPIO controller allows software to set the IO direction of, and 10 read/write the value of, numerous GPIO signals. Routing of GPIO signals to 11 package balls is under the control of a separate pin controller HW block. Two 14 a) Security registers, which allow configuration of allowed access to the GPIO 15 register set. These registers exist in a single contiguous block of physical 17 varies between the different GPIO controllers. 20 that wishes to configure access to the GPIO registers needs access to these 21 registers to do so. Code which simply wishes to read or write GPIO data does not [all …]
|
| D | renesas,gpio-rcar.txt | 1 * Renesas R-Car GPIO Controller 5 - compatible: should contain one or more of the following: 6 - "renesas,gpio-r8a7743": for R8A7743 (RZ/G1M) compatible GPIO controller. 7 - "renesas,gpio-r8a7745": for R8A7745 (RZ/G1E) compatible GPIO controller. 8 - "renesas,gpio-r8a77470": for R8A77470 (RZ/G1C) compatible GPIO controller. 9 - "renesas,gpio-r8a7778": for R8A7778 (R-Car M1) compatible GPIO controller. 10 - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller. 11 - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller. 12 - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2-W) compatible GPIO controller. 13 - "renesas,gpio-r8a7792": for R8A7792 (R-Car V2H) compatible GPIO controller. [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/gpio/ |
| D | gpio.txt | 1 Specifying GPIO information for devices 5 ----------------- 7 GPIO properties should be named "[<name>-]gpios", with <name> being the purpose 8 of this GPIO for the device. While a non-existent <name> is considered valid 10 for new bindings. Also, GPIO properties named "[<name>-]gpio" are valid and old 14 GPIO properties can contain one or more GPIO phandles, but only in exceptional 16 distinct functions, reference each of them under its own property, giving it a 18 several GPIOs serve the same function (e.g. a parallel data line). 23 The following example could be used to describe GPIO pins used as device enable 24 and bit-banged data signals: [all …]
|
| D | nvidia,tegra186-gpio.txt | 1 NVIDIA Tegra186 GPIO controllers 3 Tegra186 contains two GPIO controllers; a main controller and an "AON" 9 The Tegra186 GPIO controller allows software to set the IO direction of, and 10 read/write the value of, numerous GPIO signals. Routing of GPIO signals to 11 package balls is under the control of a separate pin controller HW block. Two 14 a) Security registers, which allow configuration of allowed access to the GPIO 15 register set. These registers exist in a single contiguous block of physical 17 varies between the different GPIO controllers. 20 that wishes to configure access to the GPIO registers needs access to these 21 registers to do so. Code which simply wishes to read or write GPIO data does not [all …]
|
| /kernel/linux/linux-4.19/Documentation/driver-api/gpio/ |
| D | drivers-on-gpio.rst | 2 Subsystem drivers using GPIO 5 Note that standard kernel drivers exist for common GPIO tasks and will provide 6 the right in-kernel and userspace APIs/ABIs for the job, and that these 10 - leds-gpio: drivers/leds/leds-gpio.c will handle LEDs connected to GPIO 13 - ledtrig-gpio: drivers/leds/trigger/ledtrig-gpio.c will provide a LED trigger, 14 i.e. a LED will turn on/off in response to a GPIO line going high or low 15 (and that LED may in turn use the leds-gpio as per above). 17 - gpio-keys: drivers/input/keyboard/gpio_keys.c is used when your GPIO line 18 can generate interrupts in response to a key press. Also supports debounce. 20 - gpio-keys-polled: drivers/input/keyboard/gpio_keys_polled.c is used when your [all …]
|
| D | legacy.rst | 2 Legacy GPIO Interfaces 5 This provides an overview of GPIO access conventions on Linux. 11 What is a GPIO? 13 A "General Purpose Input/Output" (GPIO) is a flexible software-controlled 15 to Linux developers working with embedded and custom hardware. Each GPIO 16 represents a bit connected to a particular pin, or "ball" on Ball Grid Array 21 System-on-Chip (SOC) processors heavily rely on GPIOs. In some cases, every 22 non-dedicated pin can be configured as a GPIO; and most chips have at least 25 often have a few such pins to help with pin scarcity on SOCs; and there are 26 also "GPIO Expander" chips that connect using the I2C or SPI serial busses. [all …]
|
| D | driver.rst | 2 GPIO Descriptor Driver Interface 5 This document serves as a guide for GPIO chip drivers writers. Note that it 6 describes the new descriptor-based interface. For a description of the 7 deprecated integer-based GPIO interface please refer to gpio-legacy.txt. 9 Each GPIO controller driver needs to include the following header, which defines 10 the structures used to define a GPIO driver: 12 #include <linux/gpio/driver.h> 18 Inside a GPIO driver, individual GPIOs are identified by their hardware number, 19 which is a unique number between 0 and n, n being the number of GPIOs managed by 20 the chip. This number is purely internal: the hardware number of a particular [all …]
|
| D | intro.rst | 6 GPIO Interfaces 10 GPIOs in drivers, and how to write a driver for a device that provides GPIOs 13 Due to the history of GPIO interfaces in the kernel, there are two different 16 - The descriptor-based interface is the preferred way to manipulate GPIOs, 17 and is described by all the files in this directory excepted gpio-legacy.txt. 18 - The legacy integer-based interface which is considered deprecated (but still 19 usable for compatibility reasons) is documented in gpio-legacy.txt. 21 The remainder of this document applies to the new descriptor-based interface. 22 gpio-legacy.txt contains the same information applied to the legacy 23 integer-based interface. [all …]
|
| D | consumer.rst | 2 GPIO Descriptor Consumer Interface 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 gpio-legacy.txt. 13 Drivers that can't work without standard GPIO calls should have Kconfig entries 14 that depend on GPIOLIB or select GPIOLIB. The functions that allow a driver to 17 #include <linux/gpio/consumer.h> 23 - Simple compile coverage with e.g. COMPILE_TEST - it does not matter that 27 - Truly optional GPIOLIB support - where the driver does not really make use 28 of the GPIOs on certain compile-time configurations for certain systems, but [all …]
|
| /kernel/linux/linux-5.10/Documentation/driver-api/gpio/ |
| D | drivers-on-gpio.rst | 2 Subsystem drivers using GPIO 5 Note that standard kernel drivers exist for common GPIO tasks and will provide 6 the right in-kernel and userspace APIs/ABIs for the job, and that these 10 - leds-gpio: drivers/leds/leds-gpio.c will handle LEDs connected to GPIO 13 - ledtrig-gpio: drivers/leds/trigger/ledtrig-gpio.c will provide a LED trigger, 14 i.e. a LED will turn on/off in response to a GPIO line going high or low 15 (and that LED may in turn use the leds-gpio as per above). 17 - gpio-keys: drivers/input/keyboard/gpio_keys.c is used when your GPIO line 18 can generate interrupts in response to a key press. Also supports debounce. 20 - gpio-keys-polled: drivers/input/keyboard/gpio_keys_polled.c is used when your [all …]
|
| D | legacy.rst | 2 Legacy GPIO Interfaces 5 This provides an overview of GPIO access conventions on Linux. 11 What is a GPIO? 13 A "General Purpose Input/Output" (GPIO) is a flexible software-controlled 15 to Linux developers working with embedded and custom hardware. Each GPIO 16 represents a bit connected to a particular pin, or "ball" on Ball Grid Array 21 System-on-Chip (SOC) processors heavily rely on GPIOs. In some cases, every 22 non-dedicated pin can be configured as a GPIO; and most chips have at least 25 often have a few such pins to help with pin scarcity on SOCs; and there are 26 also "GPIO Expander" chips that connect using the I2C or SPI serial busses. [all …]
|
| D | driver.rst | 2 GPIO Driver Interface 5 This document serves as a guide for writers of GPIO chip drivers. 7 Each GPIO controller driver needs to include the following header, which defines 8 the structures used to define a GPIO driver:: 10 #include <linux/gpio/driver.h> 16 A GPIO chip handles one or more GPIO lines. To be considered a GPIO chip, the 18 line is not general purpose, it is not GPIO and should not be handled by a 19 GPIO chip. The use case is the indicative: certain lines in a system may be 20 called GPIO but serve a very particular purpose thus not meeting the criteria 21 of a general purpose I/O. On the other hand a LED driver line may be used as a [all …]
|
| D | intro.rst | 6 GPIO Interfaces 10 GPIOs in drivers, and how to write a driver for a device that provides GPIOs 13 Due to the history of GPIO interfaces in the kernel, there are two different 16 - The descriptor-based interface is the preferred way to manipulate GPIOs, 17 and is described by all the files in this directory excepted gpio-legacy.txt. 18 - The legacy integer-based interface which is considered deprecated (but still 19 usable for compatibility reasons) is documented in gpio-legacy.txt. 21 The remainder of this document applies to the new descriptor-based interface. 22 gpio-legacy.txt contains the same information applied to the legacy 23 integer-based interface. [all …]
|
| D | consumer.rst | 2 GPIO Descriptor Consumer Interface 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 gpio-legacy.txt. 13 Drivers that can't work without standard GPIO calls should have Kconfig entries 14 that depend on GPIOLIB or select GPIOLIB. The functions that allow a driver to 17 #include <linux/gpio/consumer.h> 23 - Simple compile coverage with e.g. COMPILE_TEST - it does not matter that 27 - Truly optional GPIOLIB support - where the driver does not really make use 28 of the GPIOs on certain compile-time configurations for certain systems, but [all …]
|
| /kernel/linux/linux-5.10/drivers/gpio/ |
| D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 3 # GPIO infrastructure and drivers 10 the architecture to provide a custom asm/gpio.h implementation 15 bool "GPIO Support" 17 This enables GPIO support through the generic GPIO library. 19 one or more of the GPIO drivers below. 31 using a stack allocated buffer to a dynamically allocated buffer. 51 bool "Debug GPIO calls" 54 Say Y here to add some extra checks and diagnostics to GPIO calls. 57 non-sleeping contexts. They can make bitbanged serial protocols [all …]
|
| D | TODO | 1 This is a place for planning the ongoing long-term work in the GPIO 5 GPIO descriptors 7 Starting with commit 79a9becda894 the GPIO subsystem embarked on a journey 8 to move away from the global GPIO numberspace and toward a descriptor-based 9 approach. This means that GPIO consumers, drivers and machine descriptions 10 ideally have no use or idea of the global GPIO numberspace that has/was 11 used in the inception of the GPIO subsystem. 16 The underlying motivation for this is that the GPIO numberspace has become 18 establish the numberspace at compile-time, making it hard to add any numbers 19 in the middle (such as if you missed a pin on a chip) without the numberspace [all …]
|
| D | gpiolib-devres.c | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * devres.c - managed gpio resources 11 #include <linux/gpio.h> 12 #include <linux/gpio/consumer.h> 27 struct gpio_desc **this = res, **gpio = data; in devm_gpiod_match() local 29 return *this == *gpio; in devm_gpiod_match() 47 * devm_gpiod_get - Resource-managed gpiod_get() 48 * @dev: GPIO consumer 49 * @con_id: function within the GPIO consumer 50 * @flags: optional GPIO initialization flags [all …]
|
| /kernel/linux/linux-4.19/drivers/gpio/ |
| D | Kconfig | 2 # GPIO infrastructure and drivers 9 the architecture to provide a custom asm/gpio.h implementation 14 bool "GPIO Support" 17 This enables GPIO support through the generic GPIO library. 19 one or more of the GPIO drivers below. 31 using a stack allocated buffer to a dynamically allocated buffer. 51 bool "Debug GPIO calls" 54 Say Y here to add some extra checks and diagnostics to GPIO calls. 57 non-sleeping contexts. They can make bitbanged serial protocols 62 bool "/sys/class/gpio/... (sysfs interface)" [all …]
|
| /kernel/linux/linux-5.10/Documentation/admin-guide/gpio/ |
| D | gpio-aggregator.rst | 1 .. SPDX-License-Identifier: GPL-2.0-only 3 GPIO Aggregator 6 The GPIO Aggregator provides a mechanism to aggregate GPIOs, and expose them as 7 a new gpio_chip. This supports the following use cases. 11 ----------------------------- 13 GPIO controllers are exported to userspace using /dev/gpiochip* character 15 system permissions, on an all-or-nothing basis: either a GPIO controller is 16 accessible for a user, or it is not. 18 The GPIO Aggregator provides access control for a set of one or more GPIOs, by 19 aggregating them into a new gpio_chip, which can be assigned to a group or user [all …]
|
| D | sysfs.rst | 1 GPIO Sysfs Interface for Userspace 7 Documentation/ABI/obsolete/sysfs-gpio AND NEW USERSPACE CONSUMERS 11 Refer to the examples in tools/gpio/* for an introduction to the new 13 include/uapi/linux/gpio.h 16 ------------------------ 18 configure a sysfs user interface to GPIOs. This is different from the 19 debugfs interface, since it provides control over GPIO direction and 20 value instead of just showing a gpio state summary. Plus, it could be 24 know for example that GPIO #23 controls the write protect line used to 26 may need to temporarily remove that protection, first importing a GPIO, [all …]
|
| /kernel/linux/linux-4.19/arch/m68k/include/asm/ |
| D | mcfgpio.h | 2 * Coldfire generic GPIO support. 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 #include <asm-generic/gpio.h> 23 int __mcfgpio_get_value(unsigned gpio); 24 void __mcfgpio_set_value(unsigned gpio, int value); 25 int __mcfgpio_direction_input(unsigned gpio); 26 int __mcfgpio_direction_output(unsigned gpio, int value); 27 int __mcfgpio_request(unsigned gpio); 28 void __mcfgpio_free(unsigned gpio); 31 static inline int __gpio_get_value(unsigned gpio) in __gpio_get_value() argument [all …]
|
| /kernel/linux/linux-5.10/arch/m68k/include/asm/ |
| D | mcfgpio.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * Coldfire generic GPIO support. 12 #include <asm-generic/gpio.h> 15 int __mcfgpio_get_value(unsigned gpio); 16 void __mcfgpio_set_value(unsigned gpio, int value); 17 int __mcfgpio_direction_input(unsigned gpio); 18 int __mcfgpio_direction_output(unsigned gpio, int value); 19 int __mcfgpio_request(unsigned gpio); 20 void __mcfgpio_free(unsigned gpio); 23 static inline int __gpio_get_value(unsigned gpio) in __gpio_get_value() argument [all …]
|
| /kernel/linux/linux-4.19/Documentation/devicetree/bindings/pinctrl/ |
| D | st,stm32-pinctrl.txt | 1 * STM32 GPIO and Pin Mux/Config controller 3 STMicroelectronics's STM32 MCUs intregrate a GPIO and Pin mux/config hardware 5 also provides ability to multiplex and configure the output of various on-chip 10 - compatible: value should be one of the following: 11 "st,stm32f429-pinctrl" 12 "st,stm32f469-pinctrl" 13 "st,stm32f746-pinctrl" 14 "st,stm32f769-pinctrl" 15 "st,stm32h743-pinctrl" 16 "st,stm32mp157-pinctrl" [all …]
|
| /kernel/linux/linux-4.19/Documentation/gpio/ |
| D | sysfs.txt | 1 GPIO Sysfs Interface for Userspace 5 Documentation/ABI/obsolete/sysfs-gpio AND NEW USERSPACE CONSUMERS 9 Refer to the examples in tools/gpio/* for an introduction to the new 11 include/uapi/linux/gpio.h 14 ------------------------ 16 configure a sysfs user interface to GPIOs. This is different from the 17 debugfs interface, since it provides control over GPIO direction and 18 value instead of just showing a gpio state summary. Plus, it could be 22 know for example that GPIO #23 controls the write protect line used to 24 may need to temporarily remove that protection, first importing a GPIO, [all …]
|