/linux-6.14.4/tools/gpio/ |
D | gpio-utils.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * GPIO tools - helpers library for the GPIO tools 17 #include <linux/gpio.h> 18 #include "gpio-utils.h" 20 #define CONSUMER "gpio-utils" 23 * DOC: Operation of gpio 27 * ioctl, including request and release for lines of gpio, read/write 28 * the value of gpio. If the user want to do lots of read and write of 29 * lines of gpio, user should use this type of api. 32 * following api will request gpio lines, do the operation and then [all …]
|
D | gpio-hammer.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * gpio-hammer - example swiss army knife to shake GPIO lines on a system 8 * gpio-hammer -n <device-name> -o <offset1> -o <offset2> 22 #include <linux/gpio.h> 23 #include "gpio-utils.h" 25 int hammer_device(const char *device_name, unsigned int *lines, int num_lines, in hammer_device() argument 30 char swirr[] = "-\\|/"; in hammer_device() 39 ret = gpiotools_request_line(device_name, lines, num_lines, in hammer_device() 40 &config, "gpio-hammer"); in hammer_device() 55 fprintf(stdout, "Hammer lines ["); in hammer_device() [all …]
|
D | gpio-event-mon.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * gpio-event-mon - monitor GPIO line events from userspace 8 * gpio-event-mon -n <device-name> -o <offset> 25 #include <linux/gpio.h> 26 #include "gpio-utils.h" 29 unsigned int *lines, in monitor_device() argument 42 return -ENOMEM; in monitor_device() 45 if (cfd == -1) { in monitor_device() 46 ret = -errno; in monitor_device() 51 ret = gpiotools_request_line(device_name, lines, num_lines, config, in monitor_device() [all …]
|
D | lsgpio.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * lsgpio - example on how to list the GPIO lines on a system 8 * lsgpio <-n device-name> 22 #include <linux/gpio.h> 24 #include "gpio-utils.h" 45 .name = "active-low", 49 .name = "open-drain", 53 .name = "open-source", 57 .name = "pull-up", 61 .name = "pull-down", [all …]
|
/linux-6.14.4/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 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 …]
|
D | using-gpio.rst | 2 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 …]
|
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 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 …]
|
/linux-6.14.4/Documentation/userspace-api/gpio/ |
D | chardev.rst | 1 .. 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 …]
|
D | chardev_v1.rst | 1 .. 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 …]
|
D | gpio-handle-set-config-ioctl.rst | 1 .. 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 …]
|
D | gpio-v2-line-set-config-ioctl.rst | 1 .. 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 …]
|
/linux-6.14.4/include/uapi/linux/ |
D | gpio.h | 1 /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 3 * <linux/gpio.h> - userspace ABI for the GPIO character devices 21 * Must be a multiple of 8 to ensure 32/64-bit alignment of structs. 26 * struct gpiochip_info - Information about a certain GPIO chip 27 * @name: the Linux kernel name of this GPIO chip 28 * @label: a functional name for this GPIO chip, such as a product 30 * @lines: number of GPIO lines on this chip 35 __u32 lines; member 39 * Maximum number of requested lines. 41 * Must be no greater than 64, as bitmaps are restricted here to 64-bits [all …]
|
/linux-6.14.4/Documentation/devicetree/bindings/gpio/ |
D | gpio-mmio.yaml | 1 # 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 <[email protected]> 11 - Bartosz Golaszewski <[email protected]> 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 …]
|
D | nuvoton,sgpio.yaml | 1 # 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 <[email protected]> 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 …]
|
D | intel,ixp4xx-gpio.yaml | 1 # 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 …]
|
/linux-6.14.4/Documentation/devicetree/bindings/input/ |
D | gpio-matrix-keypad.txt | 1 * 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 …]
|
/linux-6.14.4/drivers/staging/greybus/ |
D | gpio.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * GPIO Greybus driver. 14 #include <linux/gpio/driver.h> 22 /* --> make them just a flags field */ 38 struct gb_gpio_line *lines; member 47 return d->domain->host_data; in irq_data_to_gpio_chip() 55 ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_LINE_COUNT, in gb_gpio_line_count_operation() 58 ggc->line_max = response.count; in gb_gpio_line_count_operation() 65 struct gbphy_device *gbphy_dev = ggc->gbphy_dev; in gb_gpio_activate_operation() 73 ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_ACTIVATE, in gb_gpio_activate_operation() [all …]
|
/linux-6.14.4/tools/testing/selftests/gpio/ |
D | gpio-sim.sh | 2 # SPDX-License-Identifier: GPL-2.0 6 CONFIGFS_DIR="/sys/kernel/config/gpio-sim" 7 MODULE="gpio-sim" 11 echo "GPIO $MODULE test FAIL" 17 echo "GPIO $MODULE test SKIP" 26 if [ "$BANK" = "live" -o "$BANK" = "dev_name" ]; then 30 LINES=`ls $CONFIGFS_DIR/$CHIP/$BANK/ | grep -E ^line` 32 for LINE in $LINES; do 33 if [ -e $CONFIGFS_DIR/$CHIP/$BANK/$LINE/hog ]; then 76 fail "Unable to set the number of lines" [all …]
|
/linux-6.14.4/Documentation/admin-guide/gpio/ |
D | gpio-mockup.rst | 1 .. 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 …]
|
D | gpio-sim.rst | 1 .. 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 …]
|
/linux-6.14.4/Documentation/devicetree/bindings/spi/ |
D | spi-gpio.yaml | 1 # 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 <[email protected]> 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 …]
|
/linux-6.14.4/drivers/gpio/ |
D | gpio-mockup.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * GPIO Testing Device Driver 6 * Copyright (C) 2015-2016 Bamvor Jian Zhang <[email protected]> 15 #include <linux/gpio/driver.h> 31 * We're storing two values per chip: the GPIO base and the number 32 * of GPIO lines. 39 * struct gpio_pin_status - structure describing a GPIO status 40 * @dir: Configures direction of gpio as "in" or "out" 41 * @value: Configures status of the gpio as 0(low) or 1(high) 42 * @pull: Configures the current pull of the GPIO as 0 (pull-down) or [all …]
|
/linux-6.14.4/Documentation/devicetree/bindings/auxdisplay/ |
D | hit,hd44780.yaml | 1 # 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 …]
|
/linux-6.14.4/Documentation/devicetree/bindings/serial/ |
D | nxp,sc16is7xx.yaml | 1 # 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 <[email protected]> 15 - nxp,sc16is740 16 - nxp,sc16is741 17 - nxp,sc16is750 18 - nxp,sc16is752 19 - nxp,sc16is760 [all …]
|
/linux-6.14.4/drivers/media/i2c/ |
D | max9271.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 3 * Copyright (C) 2017-2020 Jacopo Mondi 4 * Copyright (C) 2017-2020 Kieran Bingham 5 * Copyright (C) 2017-2020 Laurent Pinchart 6 * Copyright (C) 2017-2020 Niklas Söderlund 84 * struct max9271_device - max9271 device 92 * max9271_wake_up() - Wake up the serializer by issuing an i2c transaction 101 * max9271_set_serial_link() - Enable/disable serial link 110 * max9271_configure_i2c() - Configure I2C bus parameters 123 * max9271_set_high_threshold() - Enable or disable reverse channel high [all …]
|