| /OK3568_Linux_fs/u-boot/doc/device-tree-bindings/gpio/ |
| H A 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 21 GPIO properties can contain one or more GPIO phandles, but only in exceptional [all …]
|
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/gpio/ |
| H A 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 …]
|
| H A 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 …]
|
| /OK3568_Linux_fs/u-boot/include/asm-generic/ |
| H A D | gpio.h | 4 * SPDX-License-Identifier: GPL-2.0+ 15 * Generic GPIO API for U-Boot 17 * -- 20 * - gpio_request_by_name() 21 * - dm_gpio_get_value() etc. 23 * For now we need a dm_ prefix on some functions to avoid name collision. 24 * -- 26 * GPIOs are numbered from 0 to GPIO_COUNT-1 which value is defined 29 * Each GPIO can be an input or output. If an input then its value can 35 * In some cases the operation may fail, for example if the GPIO number [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/driver-api/gpio/ |
| H A 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 …]
|
| H A 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 …]
|
| H A 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 …]
|
| H A 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 …]
|
| H A 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 …]
|
| H A D | board.rst | 2 GPIO Mappings 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 gpio-legacy.txt (actually, there is no real mapping possible with the old 11 corresponding GPIO). 13 All platforms can enable the GPIO library, but if the platform strictly 14 requires GPIO functionality to be present, it needs to select GPIOLIB from its 20 ----------- 22 exact way to do it depends on the GPIO controller providing the GPIOs, see the 25 GPIOs mappings are defined in the consumer device's node, in a property named [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpio/ |
| H A 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 …]
|
| H A 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 …]
|
| H A 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 …]
|
| H A D | gpio-pcf857x.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Driver for pcf857x, pca857x, and pca967x I2C GPIO expanders 8 #include <linux/gpio/driver.h> 62 * write register. Writing a "one" bit (to match the reset state) lets 63 * that pin be used as an input; it's not an open-drain model, but acts 64 * a bit like one. This is described as "quasi-bidirectional"; read the 67 * Many other I2C GPIO expander chips (like the pca953x models) have 85 /*-------------------------------------------------------------------------*/ 87 /* Talk to 8-bit I/O expander */ 99 /* Talk to 16-bit I/O expander */ [all …]
|
| H A D | gpiolib.c | 1 // SPDX-License-Identifier: GPL-2.0 13 #include <linux/gpio.h> 17 #include <linux/gpio/driver.h> 18 #include <linux/gpio/machine.h> 23 #include <uapi/linux/gpio.h> 26 #include "gpiolib-of.h" 27 #include "gpiolib-acpi.h" 28 #include "gpiolib-cdev.h" 29 #include "gpiolib-sysfs.h" 32 #include <trace/events/gpio.h> [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/gpio/ |
| H A D | Kconfig | 2 # GPIO infrastructure and drivers 5 menu "GPIO Support" 8 bool "Enable Driver Model for GPIO drivers" 11 Enable driver model for GPIO access. The standard GPIO 13 the GPIO uclass. Drivers provide methods to query the 15 is defined in include/asm-generic/gpio.h. 18 bool "Enable GPIO hog support" 22 Enable gpio hog support 23 The GPIO chip may contain GPIO hog definitions. GPIO hogging 24 is a mechanism providing automatic GPIO request and config- [all …]
|
| H A D | tegra_gpio.c | 2 * NVIDIA Tegra20 GPIO handling. 3 * (C) Copyright 2010-2012,2015 6 * SPDX-License-Identifier: GPL-2.0+ 22 #include <asm/gpio.h> 23 #include <dm/device-internal.h> 24 #include <dt-bindings/gpio/gpio.h> 36 int base_gpio; /* Port number for this port (0, 1,.., n-1) */ 39 /* Information about each port at run-time */ 42 int base_gpio; /* Port number for this port (0, 1,.., n-1) */ 45 /* Return config of pin 'gpio' as GPIO (1) or SFIO (0) */ [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/admin-guide/gpio/ |
| H A 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 …]
|
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/arch/m68k/include/asm/ |
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/pinctrl/ |
| H A D | qcom,pmic-gpio.txt | 1 Qualcomm PMIC GPIO block 3 This binding describes the GPIO block(s) found in the 8xxx series of 6 - compatible: 10 "qcom,pm8005-gpio" 11 "qcom,pm8018-gpio" 12 "qcom,pm8038-gpio" 13 "qcom,pm8058-gpio" 14 "qcom,pm8916-gpio" 15 "qcom,pm8917-gpio" 16 "qcom,pm8921-gpio" [all …]
|
| H A D | brcm,bcm2835-gpio.txt | 1 Broadcom BCM2835 GPIO (and pinmux) controller 3 The BCM2835 GPIO module is a combined GPIO controller, (GPIO) interrupt 7 - compatible: "brcm,bcm2835-gpio" 8 - compatible: should be one of: 9 "brcm,bcm2835-gpio" - BCM2835 compatible pinctrl 10 "brcm,bcm7211-gpio" - BCM7211 compatible pinctrl 11 "brcm,bcm2711-gpio" - BCM2711 compatible pinctrl 12 "brcm,bcm7211-gpio" - BCM7211 compatible pinctrl 13 - reg: Should contain the physical address of the GPIO module's registers. 14 - gpio-controller: Marks the device node as a GPIO controller. [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/driver-api/ |
| H A D | pinctl.rst | 9 - Enumerating and naming controllable pins 11 - Multiplexing of pins, pads, fingers (etc) see below for details 13 - Configuration of pins, pads, fingers (etc), such as software-controlled 14 biasing and driving mode specific pins, such as pull-up/down, open drain, 17 Top-level interface 22 - A pin controller is a piece of hardware, usually a set of registers, that 28 - PINS are equal to pads, fingers, balls or whatever packaging input or 31 there may be several such number spaces in a system. This pin space may 32 be sparse - i.e. there may be gaps in the space with numbers where no 35 When a PIN CONTROLLER is instantiated, it will register a descriptor to the [all …]
|
| /OK3568_Linux_fs/kernel/include/linux/gpio/ |
| H A D | driver.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 12 #include <linux/pinctrl/pinconf-generic.h> 30 * struct gpio_irq_chip - GPIO interrupt controller 36 * GPIO IRQ chip implementation, provided by GPIO driver. 43 * Interrupt translation domain; responsible for mapping between GPIO 67 * If non-NULL, will be set as the parent of this GPIO interrupt 68 * controller's IRQ domain to establish a hierarchical interrupt 77 * This callback translates a child hardware IRQ offset to a parent 78 * hardware IRQ offset on a hierarchical interrupt chip. The child 79 * hardware IRQs correspond to the GPIO index 0..ngpio-1 (see the [all …]
|