Home
last modified time | relevance | path

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

12345678910>>...17

/linux/tools/gpio/
H A Dgpio-utils.c1 // 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 …]
H A Dgpio-hammer.c1 // 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 …]
H A Dlsgpio.c1 // 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/Documentation/driver-api/gpio/
H A 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 …]
H A 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 …]
/linux/Documentation/userspace-api/gpio/
H A 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 …]
H A 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 …]
H A 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 …]
H A 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 …]
H A 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 …]
/linux/include/uapi/linux/
H A Dgpio.h1 /* 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/Documentation/devicetree/bindings/gpio/
H A 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 …]
H A 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 …]
H A 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 …]
/linux/drivers/staging/greybus/
H A Dgpio.c1 // 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/tools/testing/selftests/gpio/
H A Dgpio-sim.sh2 # 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/Documentation/admin-guide/gpio/
H A 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 …]
H A 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 …]
H A 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
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
18 The GPIO Aggregator provides access control for a set of one or more GPIOs, by
22 grab the full GPIO controller, and no longer needs to care about which GPIOs to
25 Aggregated GPIO controllers are instantiated and destroyed by writing to
26 write-only attribute files in sysfs.
[all …]
/linux/drivers/gpio/
H A Dgpio-mockup.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * GPIO Testing Device Driver
6 * Copyright (C) 2015-2016 Bamvor Jian Zhang <bamv2005@gmail.com>
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/Documentation/devicetree/bindings/spi/
H A 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 …]
/linux/Documentation/devicetree/bindings/auxdisplay/
H A 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 …]
/linux/drivers/media/i2c/
H A Dmax9271.h1 /* 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 …]
/linux/arch/arm64/boot/dts/bitmain/
H A Dbm1880-sophon-edge.dts1 // 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/Documentation/dev-tools/
H A 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 …]

12345678910>>...17