Home
last modified time | relevance | path

Searched +full:a +full:- +full:gpio (Results 1 – 25 of 1041) sorted by relevance

12345678910>>...42

/linux-5.10/Documentation/devicetree/bindings/gpio/
Dgpio.txt1 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 …]
Dnvidia,tegra186-gpio.txt1 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 …]
Dsnps,dw-apb-gpio.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/gpio/snps,dw-apb-gpio.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Synopsys DesignWare APB GPIO controller
10 Synopsys DesignWare GPIO controllers have a configurable number of ports,
12 GPIO-controller properties as desribed in this bindings file.
15 - Hoan Tran <hoan@os.amperecomputing.com>
16 - Serge Semin <fancer.lancer@gmail.com>
20 pattern: "^gpio@[0-9a-f]+$"
[all …]
/linux-5.10/Documentation/driver-api/gpio/
Ddrivers-on-gpio.rst2 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 …]
Dlegacy.rst2 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 …]
Ddriver.rst2 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 …]
Dintro.rst6 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 …]
Dconsumer.rst2 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 …]
Dboard.rst2 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 …]
/linux-5.10/drivers/gpio/
DKconfig1 # 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 …]
DTODO1 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 …]
Dgpiolib-devres.c1 /* 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 …]
Dgpio-pcf857x.c1 // 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 …]
/linux-5.10/Documentation/admin-guide/gpio/
Dgpio-aggregator.rst1 .. 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 …]
Dsysfs.rst1 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 …]
/linux-5.10/arch/m68k/include/asm/
Dmcfgpio.h1 /* 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 …]
/linux-5.10/Documentation/devicetree/bindings/pinctrl/
Dbrcm,bcm2835-gpio.txt1 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 …]
Dqcom,pmic-gpio.txt1 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 …]
Dpinctrl-st.txt3 Each multi-function pin is controlled, driven and routed through the
4 PIO multiplexing block. Each pin supports GPIO functionality (ALT0)
5 and multiple alternate functions(ALT1 - ALTx) that directly connect
8 When a pin is in GPIO mode, Output Enable (OE), Open Drain(OD), and
12 gpio driver to configure a pin.
14 GPIO bank can have one of the two possible types of interrupt-wirings.
16 First type is via irqmux, single interrupt is used by multiple gpio banks. This
18 a single pincontroller.
20 | |----> [gpio-bank (n) ]
21 | |----> [gpio-bank (n + 1)]
[all …]
/linux-5.10/Documentation/devicetree/bindings/power/reset/
Dgpio-poweroff.txt1 Driver a GPIO line that can be used to turn the power off.
4 At driver load time, the driver will request the given gpio line and
5 install a handler to power off the system. If the optional properties
6 'input' is not found, the GPIO line will be driven in the inactive
9 When the power-off handler is called, the gpio is configured as an
10 output, and drive active, so triggering a level triggered power off
11 condition. This will also cause an inactive->active edge condition, so
12 triggering positive edge triggered power off. After a delay of 100ms,
13 the GPIO is set to inactive, thus causing an active->inactive edge,
15 delay the GPIO is driver active again. If the power is still on and
[all …]
Dgpio-restart.txt1 Drive a GPIO line that can be used to restart the system from a restart
5 time, the driver will request the given gpio line and install a restart
6 handler. If the optional properties 'open-source' is not found, the GPIO line
11 priority order. The gpio is configured as an output, and driven active,
12 triggering a level triggered reset condition. This will also cause an
13 inactive->active edge condition, triggering positive edge triggered
14 reset. After a delay specified by active-delay, the GPIO is set to
15 inactive, thus causing an active->inactive edge, triggering negative edge
16 triggered reset. After a delay specified by inactive-delay, the GPIO
17 is driven active again. After a delay specified by wait-delay, the
[all …]
/linux-5.10/Documentation/driver-api/
Dpinctl.rst9 - 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 …]
/linux-5.10/include/asm-generic/
Dgpio.h1 /* SPDX-License-Identifier: GPL-2.0 */
11 #include <linux/gpio/driver.h>
12 #include <linux/gpio/consumer.h>
14 /* Platforms may implement their GPIO interface with library code,
15 * at a small performance cost for non-inlined operations and some
16 * extra memory (for code and for per-GPIO table entries).
18 * While the GPIO programming interface defines valid GPIO numbers
20 * smaller range 0..ARCH_NR_GPIOS-1.
23 * builtin/SoC GPIOs plus a number of GPIOs on expanders; the latter is
24 * actually an estimate of a board-specific value.
[all …]
/linux-5.10/include/linux/gpio/
Ddriver.h1 /* SPDX-License-Identifier: GPL-2.0 */
12 #include <linux/pinctrl/pinconf-generic.h>
29 * struct gpio_irq_chip - GPIO interrupt controller
35 * GPIO IRQ chip implementation, provided by GPIO driver.
42 * Interrupt translation domain; responsible for mapping between GPIO
66 * If non-NULL, will be set as the parent of this GPIO interrupt
67 * controller's IRQ domain to establish a hierarchical interrupt
76 * This callback translates a child hardware IRQ offset to a parent
77 * hardware IRQ offset on a hierarchical interrupt chip. The child
78 * hardware IRQs correspond to the GPIO index 0..ngpio-1 (see the
[all …]
/linux-5.10/include/linux/
Dgpio.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * <linux/gpio.h>
5 * This is the LEGACY GPIO bulk include file, including legacy APIs. It is
6 * used for GPIO drivers still referencing the global GPIO numberspace,
9 * If you're implementing a GPIO driver, only include <linux/gpio/driver.h>
10 * If you're implementing a GPIO consumer, only include <linux/gpio/consumer.h>
17 /* see Documentation/driver-api/gpio/legacy.rst */
19 /* make these flag values available regardless of GPIO kconfig options */
30 /* Gpio pin is active-low */
33 /* Gpio pin is open drain */
[all …]

12345678910>>...42