/Linux-v6.1/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-v6.1/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-v6.1/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-v6.1/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-v6.1/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 46 #define irq_data_to_gpio_chip(d) (d->domain->host_data) 53 ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_LINE_COUNT, in gb_gpio_line_count_operation() 56 ggc->line_max = response.count; in gb_gpio_line_count_operation() 63 struct gbphy_device *gbphy_dev = ggc->gbphy_dev; in gb_gpio_activate_operation() 71 ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_ACTIVATE, in gb_gpio_activate_operation() [all …]
|
/Linux-v6.1/arch/arm64/boot/dts/qcom/ |
D | msm8916-pins.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. 8 blsp1_uart1_default: blsp1-uart1-default { 13 drive-strength = <16>; 14 bias-disable; 17 blsp1_uart1_sleep: blsp1-uart1-sleep { 19 function = "gpio"; 21 drive-strength = <2>; 22 bias-pull-down; 25 blsp1_uart2_default: blsp1-uart2-default { [all …]
|
/Linux-v6.1/Documentation/admin-guide/gpio/ |
D | gpio-mockup.rst | 1 .. SPDX-License-Identifier: GPL-2.0-only 3 GPIO Testing Driver 6 The GPIO Testing Driver (gpio-mockup) 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 When loading the gpio-mockup driver a number of parameters can be passed to the 20 pairs. Each pair defines the base GPIO number (non-negative integer) 21 and the first number after the last of this chip. If the base GPIO 22 is -1, the gpiolib will assign it automatically. while the following [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-v6.1/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/ | egrep ^line` 32 for LINE in $LINES; do 33 if [ -e $CONFIGFS_DIR/$CHIP/$BANK/$LINE/hog ]; then 82 fail "Unable to set the number of lines" [all …]
|
/Linux-v6.1/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 devicetree bindings 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 …]
|
/Linux-v6.1/Documentation/devicetree/bindings/gpio/ |
D | intel,ixp4xx-gpio.txt | 1 Intel IXP4xx XScale Networking Processors GPIO 3 This GPIO controller is found in the Intel IXP4xx processors. 4 It supports 16 GPIO lines. 6 The interrupt portions of the GPIO controller is hierarchical: 7 the synchronous edge detector is part of the GPIO block, but the 10 the first 12 GPIO lines to 12 system interrupts. 12 The remaining 4 GPIO lines can not be used for receiving 15 The interrupt parent of this GPIO controller must be the 20 - compatible : Should be 21 "intel,ixp4xx-gpio" [all …]
|
D | nxp,pcf8575.yaml | 1 # 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 …]
|
/Linux-v6.1/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 <bamv2005@gmail.com> 13 #include <linux/gpio/driver.h> 30 * We're storing two values per chip: the GPIO base and the number 31 * of GPIO lines. 38 * struct gpio_pin_status - structure describing a GPIO status 39 * @dir: Configures direction of gpio as "in" or "out" 40 * @value: Configures status of the gpio as 0(low) or 1(high) 50 struct gpio_mockup_line_status *lines; member [all …]
|
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 23 Linux GPIO number as those descriptions are external to the Linux kernel [all …]
|
/Linux-v6.1/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-v6.1/Documentation/driver-api/hte/ |
D | tegra194-hte.rst | 1 .. SPDX-License-Identifier: GPL-2.0+ 7 ----------- 9 (Generic Timestamping Engine) instances: 1) GPIO GTE and 2) LIC 15 GPIO GTE 16 -------- 18 This GTE instance timestamps GPIO in real time. For that to happen GPIO 19 needs to be configured as input. The always on (AON) GPIO controller instance 20 supports timestamping GPIOs in real time and it has 39 GPIO lines. The GPIO GTE 21 and AON GPIO controller are tightly coupled as it requires very specific bits 22 to be set in GPIO config register before GPIO GTE can be used, for that GPIOLIB [all …]
|
/Linux-v6.1/drivers/tty/serial/ |
D | serial_mctrl_gpio.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 3 * Helpers for controlling modem lines via GPIO 13 #include <linux/gpio/consumer.h> 29 * Opaque descriptor for modem lines controlled by GPIOs 36 * Set state of the modem control output lines via GPIOs. 41 * Get state of the modem control input lines from GPIOs. 47 * Get state of the modem control output lines from GPIOs. 63 * Returns a pointer to the allocated mctrl structure if ok, -ENOMEM on 71 * Returns a pointer to the allocated mctrl structure if ok, -ENOMEM on 85 * Enable gpio interrupts to report status line changes. [all …]
|
/Linux-v6.1/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 81 * struct max9271_device - max9271 device 89 * max9271_wake_up() - Wake up the serializer by issuing an i2c transaction 98 * max9271_set_serial_link() - Enable/disable serial link 107 * max9271_configure_i2c() - Configure I2C bus parameters 120 * max9271_set_high_threshold() - Enable or disable reverse channel high [all …]
|
/Linux-v6.1/arch/arm64/boot/dts/bitmain/ |
D | bm1880-sophon-edge.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 7 /dts-v1/; 12 * GPIO name legend: proper name = the GPIO line is used as GPIO 15 * "[PER]" = pin is muxed for [peripheral] (not GPIO) 19 * Line names are taken from the schematic "sophon-edge-schematics" 22 * For the lines routed to the external connectors the 23 * lines are named after the 96Boards CE Specification 1.0, 29 * lines i.e. "[FOO]", the GPIO named lines "GPIO-A" thru "GPIO-L" 30 * are the only ones actually used for GPIO. 34 compatible = "bitmain,sophon-edge", "bitmain,bm1880"; [all …]
|
/Linux-v6.1/Documentation/devicetree/bindings/timestamp/ |
D | nvidia,tegra194-hte.yaml | 1 # 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 …]
|