| /kernel/linux/linux-5.10/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 …]
|
| /kernel/linux/linux-6.6/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 …]
|
| /kernel/linux/linux-6.6/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 …]
|
| /kernel/linux/linux-5.10/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 :doc:`drivers-on-gpio` 18 help to refine it, see :doc:`../../process/submitting-patches`. 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 …]
|
| /kernel/linux/linux-5.10/include/uapi/linux/ |
| D | gpio.h | 1 /* SPDX-License-Identifier: GPL-2.0 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 …]
|
| /kernel/linux/linux-6.6/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 …]
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/serial/ |
| D | nxp,sc16is7xx.txt | 1 * NXP SC16IS7xx advanced Universal Asynchronous Receiver-Transmitter (UART) 5 - compatible: Should be one of the following: 6 - "nxp,sc16is740" for NXP SC16IS740, 7 - "nxp,sc16is741" for NXP SC16IS741, 8 - "nxp,sc16is750" for NXP SC16IS750, 9 - "nxp,sc16is752" for NXP SC16IS752, 10 - "nxp,sc16is760" for NXP SC16IS760, 11 - "nxp,sc16is762" for NXP SC16IS762. 12 - reg: I2C address of the SC16IS7xx device. 13 - interrupts: Should contain the UART interrupt [all …]
|
| /kernel/linux/linux-5.10/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 …]
|
| /kernel/linux/linux-6.6/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 …]
|
| /kernel/linux/linux-6.6/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 52 return d->domain->host_data; in irq_data_to_gpio_chip() 60 ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_LINE_COUNT, in gb_gpio_line_count_operation() 63 ggc->line_max = response.count; in gb_gpio_line_count_operation() 70 struct gbphy_device *gbphy_dev = ggc->gbphy_dev; in gb_gpio_activate_operation() 78 ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_ACTIVATE, in gb_gpio_activate_operation() [all …]
|
| /kernel/linux/linux-5.10/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 …]
|
| /kernel/linux/linux-5.10/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 …]
|
| /kernel/linux/linux-5.10/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 (if any) and the number 21 of lines exposed by the chip. If the base GPIO is -1, the gpiolib 24 Example: gpio_mockup_ranges=-1,8,-1,16,405,4 [all …]
|
| /kernel/linux/linux-6.6/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 <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/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 …]
|
| /kernel/linux/linux-5.10/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 …]
|
| /kernel/linux/linux-6.6/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 <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 …]
|
| /kernel/linux/linux-6.6/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 …]
|