Home
last modified time | relevance | path

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

123456

/Documentation/userspace-api/gpio/
Dchardev.rst1 .. SPDX-License-Identifier: GPL-2.0
4 GPIO Character Device Userspace API
8 ``include/uapi/linux/gpio.h.``
18 Read Documentation/driver-api/gpio/drivers-on-gpio.rst to avoid reinventing
21 Similarly, for multi-function lines there may be other subsystems, such as
23 Documentation/driver-api/pwm.rst, Documentation/w1/index.rst etc, that
26 Basic examples using the character device API can be found in ``tools/gpio/*``.
28 The API is based around two major objects, the :ref:`gpio-v2-chip` and the
29 :ref:`gpio-v2-line-request`.
31 .. _gpio-v2-chip:
[all …]
Dchardev_v1.rst1 .. SPDX-License-Identifier: GPL-2.0
4 GPIO Character Device Userspace API (v1)
20 The API is based around three major objects, the :ref:`gpio-v1-chip`, the
21 :ref:`gpio-v1-line-handle`, and the :ref:`gpio-v1-line-event`.
26 .. _gpio-v1-chip:
31 The Chip represents a single GPIO chip and is exposed to userspace using device
34 Each chip supports a number of GPIO lines,
35 :c:type:`chip.lines<gpiochip_info>`. Lines on the chip are identified by an
36 ``offset`` in the range from 0 to ``chip.lines - 1``, i.e. `[0,chip.lines)`.
38 Lines are requested from the chip using either gpio-get-linehandle-ioctl.rst
[all …]
Dgpio-handle-set-config-ioctl.rst1 .. SPDX-License-Identifier: GPL-2.0
11 gpio-v2-line-set-config-ioctl.rst.
16 GPIOHANDLE_SET_CONFIG_IOCTL - Update the configuration of previously requested lines.
29 The file descriptor of the GPIO character device, as returned in the
30 :c:type:`request.fd<gpiohandle_request>` by gpio-get-linehandle-ioctl.rst.
34 requested lines.
39 Update the configuration of previously requested lines, without releasing the
42 The configuration applies to all requested lines.
44 The same :ref:`gpio-get-linehandle-config-rules` and
45 :ref:`gpio-get-linehandle-config-support` that apply when requesting the
[all …]
Dgpio-v2-line-set-config-ioctl.rst1 .. SPDX-License-Identifier: GPL-2.0
12 GPIO_V2_LINE_SET_CONFIG_IOCTL - Update the configuration of previously requested lines.
25 The file descriptor of the GPIO character device, as returned in the
26 :c:type:`request.fd<gpio_v2_line_request>` by gpio-v2-get-line-ioctl.rst.
30 requested lines.
35 Update the configuration of previously requested lines, without releasing the
38 The new configuration must specify a configuration for all requested lines.
40 The same :ref:`gpio-v2-get-line-config-rules` and
41 :ref:`gpio-v2-get-line-config-support` that apply when requesting the lines
48 bi-directional lines between input and output, but it may also be used to
[all …]
Dgpio-handle-set-line-values-ioctl.rst1 .. SPDX-License-Identifier: GPL-2.0
10 gpio-v2-line-set-values-ioctl.rst.
15 GPIO_HANDLE_SET_LINE_VALUES_IOCTL - Set the values of all requested output lines.
28 The file descriptor of the GPIO character device, as returned in the
29 :c:type:`request.fd<gpiohandle_request>` by gpio-get-linehandle-ioctl.rst.
37 Set the values of all requested output lines.
46 Only the values of output lines may be set.
47 Attempting to set the value of input lines is an error (**EPERM**).
54 On error -1 and the ``errno`` variable is set appropriately.
55 Common error codes are described in error-codes.rst.
Dgpio-handle-get-line-values-ioctl.rst1 .. SPDX-License-Identifier: GPL-2.0
10 gpio-v2-line-get-values-ioctl.rst.
15 GPIOHANDLE_GET_LINE_VALUES_IOCTL - Get the values of all requested lines.
28 The file descriptor of the GPIO character device, as returned in the
29 :c:type:`request.fd<gpiohandle_request>` by gpio-get-linehandle-ioctl.rst.
37 Get the values of all requested lines.
46 The values of both input and output lines may be read.
48 For output lines, the value returned is driver and configuration dependent and
62 On error -1 and the ``errno`` variable is set appropriately.
63 Common error codes are described in error-codes.rst.
Dgpio-v2-line-get-values-ioctl.rst1 .. SPDX-License-Identifier: GPL-2.0
12 GPIO_V2_LINE_GET_VALUES_IOCTL - Get the values of requested lines.
25 The file descriptor of the GPIO character device, as returned in the
26 :c:type:`request.fd<gpio_v2_line_request>` by gpio-v2-get-line-ioctl.rst.
30 to indicate the subset of requested lines to get.
35 Get the values of requested lines.
44 The values of both input and output lines may be read.
46 For output lines, the value returned is driver and configuration dependent and
57 On error -1 and the ``errno`` variable is set appropriately.
58 Common error codes are described in error-codes.rst.
Dgpio-v2-get-line-ioctl.rst1 .. SPDX-License-Identifier: GPL-2.0
12 GPIO_V2_GET_LINE_IOCTL - Request a line or lines from the kernel.
25 The file descriptor of the GPIO character device returned by `open()`.
28 The :c:type:`line_request<gpio_v2_line_request>` specifying the lines
37 :ref:`gpio-v2-line-request`.
39 A number of lines may be requested in the one line request, and request
40 operations are performed on the requested lines by the kernel as atomically
41 as possible. e.g. gpio-v2-line-get-values-ioctl.rst will read all the
42 requested lines at once.
44 The state of a line, including the value of output lines, is guaranteed to
[all …]
Dgpio-v2-line-set-values-ioctl.rst1 .. SPDX-License-Identifier: GPL-2.0
12 GPIO_V2_LINE_SET_VALUES_IOCTL - Set the values of requested output lines.
25 The file descriptor of the GPIO character device, as returned in the
26 :c:type:`request.fd<gpio_v2_line_request>` by gpio-v2-get-line-ioctl.rst.
30 to indicate the subset of requested lines to set and ``bits`` set to
36 Set the values of requested output lines.
45 Only the values of output lines may be set.
53 On error -1 and the ``errno`` variable is set appropriately.
54 Common error codes are described in error-codes.rst.
/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
11 lines, giving you the LED sysfs interface
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
20 - gpio-keys-polled: drivers/input/keyboard/gpio_keys_polled.c is used when your
[all …]
Dusing-gpio.rst2 Using GPIO Lines in Linux
5 The Linux kernel exists to abstract and present hardware to users. GPIO lines
7 and preferred way to use GPIO lines is to let kernel hardware drivers deal
12 Documentation/driver-api/gpio/drivers-on-gpio.rst
18 help to refine it, see Documentation/process/submitting-patches.rst.
20 In Linux GPIO lines also have a userspace ABI.
22 The userspace ABI is intended for one-off deployments. Examples are prototypes,
23 factory lines, maker community projects, workshop specimen, production tools,
24 industrial automation, PLC-type use cases, door controllers, in short a piece
27 software-hardware interface to be set up. They should not have a natural fit
[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
17 lines must conform to the definition: General Purpose Input/Output. If 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
[all …]
/Documentation/devicetree/bindings/input/
Dgpio-matrix-keypad.txt1 * GPIO driven matrix keypad device tree bindings
3 GPIO driven matrix keypad is used to interface a SoC with a matrix keypad.
4 The matrix keypad supports multiple row and column lines, a key can be
6 keypad can sense a key-press and key-release by means of GPIO lines and
7 report the event using GPIO interrupts to the cpu.
10 - compatible: Should be "gpio-matrix-keypad"
11 - row-gpios: List of gpios used as row lines. The gpio specifier
12 for this property depends on the gpio controller to
13 which these row lines are connected.
14 - col-gpios: List of gpios used as column lines. The gpio specifier
[all …]
/Documentation/devicetree/bindings/gpio/
Dnuvoton,sgpio.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/gpio/nuvoton,sgpio.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Jim LIU <JJLIU0@nuvoton.com>
21 GPIO pins can be programmed to support the following options
22 - Support interrupt option for each input port and various interrupt
23 sensitivity options (level-high, level-low, edge-high, edge-low)
24 - ngpios is number of nuvoton,input-ngpios GPIO lines and nuvoton,output-ngpios GPIO lines.
25 nuvoton,input-ngpios GPIO lines is only for GPI.
[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 …]
Dintel,ixp4xx-gpio.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/gpio/intel,ixp4xx-gpio.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Intel IXP4xx XScale Networking Processors GPIO Controller
10 This GPIO controller is found in the Intel IXP4xx
11 processors. It supports 16 GPIO lines.
12 The interrupt portions of the GPIO controller is hierarchical.
13 The synchronous edge detector is part of the GPIO block, but the
15 main IXP4xx interrupt controller which has a 1-to-1 mapping for
[all …]
Dnxp,pcf8575.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/gpio/nxp,pcf8575.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: PCF857x-compatible I/O expanders
10 - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
13 The PCF857x-compatible chips have "quasi-bidirectional" I/O lines that can be
14 driven high by a pull-up current source or driven low to ground. This
25 - maxim,max7328
26 - maxim,max7329
[all …]
Dgpio-grgpio.txt3 The GRGPIO GPIO core is available in the GRLIB VHDL IP core library.
10 - name : Should be "GAISLER_GPIO" or "01_01a"
12 - reg : Address and length of the register set for the device
14 - interrupts : Interrupt numbers for this device
18 - nbits : The number of gpio lines. If not present driver assumes 32 lines.
20 - irqmap : An array with an index for each gpio line. An index is either a valid
/Documentation/devicetree/bindings/spi/
Dspi-gpio.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/spi/spi-gpio.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: SPI-GPIO
10 - Rob Herring <robh@kernel.org>
13 This represents a group of 3-n GPIO lines used for bit-banged SPI on
14 dedicated GPIO lines.
17 - $ref: /schemas/spi/spi-controller.yaml#
21 const: spi-gpio
[all …]
/Documentation/admin-guide/gpio/
Dgpio-mockup.rst1 .. SPDX-License-Identifier: GPL-2.0-only
3 GPIO Testing Driver
8 This module has been obsoleted by the more flexible gpio-sim.rst.
14 The GPIO Testing Driver (gpio-mockup) provides a way to create simulated GPIO
15 chips for testing purposes. The lines exposed by these chips can be accessed
16 using the standard GPIO character device interface as well as manipulated
20 --------------------------------------------
22 When loading the gpio-mockup driver a number of parameters can be passed to the
28 pairs. Each pair defines the base GPIO number (non-negative integer)
29 and the first number after the last of this chip. If the base GPIO
[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
7 chips for testing purposes. The lines exposed by these chips can be accessed
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
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 …]
/Documentation/devicetree/bindings/serial/
Dnxp,sc16is7xx.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: NXP SC16IS7xx Advanced Universal Asynchronous Receiver-Transmitter (UART)
10 - Hugo Villeneuve <hvilleneuve@dimonoff.com>
15 - nxp,sc16is740
16 - nxp,sc16is741
17 - nxp,sc16is750
18 - nxp,sc16is752
19 - nxp,sc16is760
[all …]
/Documentation/devicetree/bindings/auxdisplay/
Dhit,hd44780.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Geert Uytterhoeven <geert@linux-m68k.org>
14 LCDs that can display one or more lines of text. It exposes an M6800 bus
15 interface, which can be used in either 4-bit or 8-bit mode. By using a
16 GPIO expander it is possible to use the driver with one of the popular I2C
24 data-gpios:
26 GPIO pins connected to the data signal lines DB0-DB7 (8-bit mode) or
27 DB4-DB7 (4-bit mode) of the LCD Controller's bus interface.
[all …]
/Documentation/dev-tools/
Dgpio-sloppy-logic-analyzer.rst1 .. SPDX-License-Identifier: GPL-2.0
4 Linux Kernel GPIO based sloppy logic analyzer
12 This document briefly describes how to run the GPIO based in-kernel sloppy
15 The sloppy logic analyzer will utilize a few GPIO lines in input mode on a
16 system to rapidly sample these digital lines, which will, if the Nyquist
18 appeared on these lines. One way to use it is to analyze external traffic
19 connected to these GPIO lines with wires (i.e. digital probes), acting as a
22 Another feature is to snoop on on-chip peripherals if the I/O cells of these
23 peripherals can be used in GPIO input mode at the same time as they are being
26 control subsystem such pin controllers are called "non-strict": a certain pin
[all …]
/Documentation/devicetree/bindings/timestamp/
Dnvidia,tegra194-hte.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/timestamp/nvidia,tegra194-hte.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Dipen Patel <dipenp@nvidia.com>
14 known as GTE GPIO and GTE IRQ, which can monitor subset of GPIO and on chip
15 IRQ lines for the state change respectively, upon detection it will record
18 to enable or disable for the hardware timestamping. The GTE GPIO monitors
19 GPIO lines from the AON (always on) GPIO controller.
24 - nvidia,tegra194-gte-aon
[all …]

123456