Home
last modified time | relevance | path

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

12345678910>>...44

/kernel/linux/linux-6.6/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 …]
/kernel/linux/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 …]
/kernel/linux/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 …]
/kernel/linux/linux-6.6/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.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/gpio/nvidia,tegra186-gpio.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: NVIDIA Tegra GPIO Controller (Tegra186 and later)
10 - Thierry Reding <thierry.reding@gmail.com>
11 - Jon Hunter <jonathanh@nvidia.com>
14 Tegra186 contains two GPIO controllers; a main controller and an "AON"
20 The Tegra186 GPIO controller allows software to set the IO direction of,
21 and read/write the value of, numerous GPIO signals. Routing of GPIO signals
[all …]
Dgpio-mmio.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/gpio/gpio-mmio.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Generic MMIO GPIO
10 - Linus Walleij <linus.walleij@linaro.org>
11 - Bartosz Golaszewski <brgl@bgdev.pl>
14 Some simple GPIO controllers may consist of a single data register or a pair
15 of set/clear-bit registers. Such controllers are common for glue logic in
16 FPGAs or ASICs. Commonly, these controllers are accessed over memory-mapped
[all …]
/kernel/linux/linux-6.6/drivers/gpio/
DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
3 # GPIO infrastructure and drivers
7 bool "GPIO Support"
9 This enables GPIO support through the generic GPIO library.
11 one or more of the GPIO drivers below.
23 using a stack allocated buffer to a dynamically allocated buffer.
47 this symbol, but new drivers should use the generic gpio-regmap
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 …]
/kernel/linux/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 …]
/kernel/linux/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 …]
/kernel/linux/linux-6.6/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 …]
Dgpio-sim.rst1 .. SPDX-License-Identifier: GPL-2.0-or-later
3 Configfs GPIO Simulator
6 The configfs GPIO Simulator (gpio-sim) provides a way to create simulated GPIO
8 using the standard GPIO character device interface as well as manipulated
12 ------------------------
14 The gpio-sim module registers a configfs subsystem called ``'gpio-sim'``. For
17 The user can create a hierarchy of configfs groups and items as well as modify
21 **Group:** ``/config/gpio-sim``
23 This is the top directory of the gpio-sim configfs tree.
25 **Group:** ``/config/gpio-sim/gpio-device``
[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 …]
/kernel/linux/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 …]
/kernel/linux/linux-6.6/arch/m68k/include/asm/
Dmcfgpio.h1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Coldfire generic GPIO support.
12 #include <linux/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 …]

12345678910>>...44