Home
last modified time | relevance | path

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

12345678910>>...30

/openbmc/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 …]
H A 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 …]
/openbmc/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 Dgpio-event-mon.c1 // 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 …]
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 …]
/openbmc/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 …]
/openbmc/linux/Documentation/devicetree/bindings/serial/
H A Dnxp,sc16is7xx.txt1 * 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 …]
/openbmc/gpioplus/src/gpioplus/
H A Dhandle.hpp26 /** @brief Creates handle flags from the gpio line flags
28 * @param[in] line_flags - Line flags used for population
54 * @brief Handle to a gpio line handle
55 * @details Provides a c++ interface for gpio handle operations
63 /** @brief Offset of the line on the gpio chip */
69 /** @brief Creates a new gpio handle
74 * @param[in] chip - The gpio chip which provides the handle
75 * @param[in] lines - A collection of lines the handle provides
76 * @param[in] flags - The flags applied to all lines
77 * @param[in] consumer_label - The functional name of this consumer
[all …]
/openbmc/linux/Documentation/devicetree/bindings/input/
H A 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 …]
/openbmc/qemu/include/hw/
H A Dqdev-core.h22 * -----------
31 * information to the caller and must be re-entrant.
57 * ---------------
62 * DeviceListener can save the QOpts passed to it for re-using it
73 DEV_NVECTORS_UNSPECIFIED = -1,
101 * struct DeviceClass - The base class for all devices.
107 * @sync_config: Callback function invoked when QMP command device-sync-config
136 * ensures a compile-time error if someone attempts to assign
137 * dc->props directly.
142 * @user_creatable: Can user instantiate with -device / device_add?
[all …]
/openbmc/linux/Documentation/devicetree/bindings/gpio/
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 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 …]
H A Dintel,ixp4xx-gpio.txt1 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 …]
/openbmc/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
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 …]
/openbmc/linux/Documentation/admin-guide/gpio/
H A Dgpio-mockup.rst1 .. 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 …]
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 …]
/openbmc/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 …]
/openbmc/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
82 fail "Unable to set the number of lines"
[all …]
/openbmc/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>
13 #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)
51 struct gpio_mockup_line_status *lines; member
[all …]
H A DTODO1 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 …]
/openbmc/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 …]
/openbmc/linux/drivers/tty/serial/
H A Dserial_mctrl_gpio.h1 /* 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 …]
/openbmc/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
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 …]

12345678910>>...30