Home
last modified time | relevance | path

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

12345678910>>...41

/linux/Documentation/userspace-api/gpio/
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`.
23 Where "line event" is used in this document it refers to the request that can
24 monitor a line for edge events, not the edge events themselves.
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,
36 ``offset`` in the range from 0 to ``chip.lines - 1``, i.e. `[0,chip.lines)`.
[all …]
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 Dgpio-get-lineinfo-watch-ioctl.rst1 .. SPDX-License-Identifier: GPL-2.0
11 gpio-v2-get-lineinfo-watch-ioctl.rst.
16 GPIO_GET_LINEINFO_WATCH_IOCTL - Enable watching a line for changes to its
30 The file descriptor of the GPIO character device returned by `open()`.
34 the ``offset`` set to indicate the line to watch
39 Enable watching a line for changes to its request state and configuration
40 information. Changes to line info include a line being requested, released
44 Watching line info is not generally required, and would typically only be
47 The line info does NOT include the line value.
49 The line must be requested using gpio-get-linehandle-ioctl.rst or
[all …]
/linux/arch/arm/boot/dts/nuvoton/
H A Dnuvoton-npcm750-runbmc-olympus.dts1 // SPDX-License-Identifier: GPL-2.0
5 /dts-v1/;
6 #include "nuvoton-npcm750.dtsi"
7 #include "nuvoton-npcm750-runbmc-olympus-pincfg.dtsi"
9 #include <dt-bindings/i2c/i2c.h>
10 #include <dt-bindings/gpio/gpio.h>
43 stdout-path = &serial3;
50 iio-hwmon {
51 compatible = "iio-hwmon";
52 io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>,
[all …]
/linux/arch/arm64/boot/dts/hisilicon/
H A Dhi3670-hikey970.dts1 // SPDX-License-Identifier: GPL-2.0
10 /dts-v1/;
11 #include <dt-bindings/gpio/gpio.h>
14 #include "hikey970-pinctrl.dtsi"
15 #include "hikey970-pmic.dtsi"
19 compatible = "hisilicon,hi3670-hikey970", "hisilicon,hi3670";
34 stdout-path = "serial6:115200n8";
43 wlan_en: wlan-en-1-8v {
44 compatible = "regulator-fixed";
45 regulator-name = "wlan-en-regulator";
[all …]
H A Dhi3660-hikey960.dts1 // SPDX-License-Identifier: GPL-2.0
9 /dts-v1/;
12 #include "hikey960-pinctrl.dtsi"
13 #include <dt-bindings/gpio/gpio.h>
14 #include <dt-bindings/input/input.h>
15 #include <dt-bindings/interrupt-controller/irq.h>
16 #include <dt-bindings/usb/pd.h>
20 compatible = "hisilicon,hi3660-hikey960", "hisilicon,hi3660";
35 stdout-path = "serial6:115200n8";
44 reserved-memory {
[all …]
H A Dhi6220-hikey.dts1 // SPDX-License-Identifier: GPL-2.0
9 /dts-v1/;
11 #include "hikey-pinctrl.dtsi"
12 #include <dt-bindings/gpio/gpio.h>
16 compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220";
26 stdout-path = "serial3:115200n8";
32 * 0x05e0,0000 - 0x05ef,ffff: MCU firmware runtime using
33 * 0x05f0,1000 - 0x05f0,1fff: Reboot reason
34 * 0x06df,f000 - 0x06df,ffff: Mailbox message data
35 * 0x0740,f000 - 0x0740,ffff: MCU firmware section
[all …]
/linux/Documentation/driver-api/gpio/
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
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
21 of a general purpose I/O. On the other hand a LED driver line may be used as a
[all …]
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
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
21 GPIO line cannot generate interrupts, so it needs to be periodically polled
[all …]
/linux/Documentation/admin-guide/gpio/
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
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``
27 **Attribute:** ``/config/gpio-sim/gpio-device/dev_name``
[all …]
/linux/arch/arm/boot/dts/aspeed/
H A Daspeed-bmc-opp-palmetto.dts1 // SPDX-License-Identifier: GPL-2.0+
2 /dts-v1/;
4 #include "aspeed-g4.dtsi"
5 #include <dt-bindings/gpio/aspeed-gpio.h>
9 compatible = "tyan,palmetto-bmc", "aspeed,ast2400";
12 stdout-path = &uart5;
20 reserved-memory {
21 #address-cells = <1>;
22 #size-cells = <1>;
26 no-map;
[all …]
H A Daspeed-bmc-lenovo-hr855xg2.dts1 // SPDX-License-Identifier: GPL-2.0+
5 * Copyright (C) 2019-present Lenovo
8 /dts-v1/;
10 #include "aspeed-g5.dtsi"
11 #include <dt-bindings/gpio/aspeed-gpio.h>
15 compatible = "lenovo,hr855xg2-bmc", "aspeed,ast2500";
29 stdout-path = &uart5;
38 reserved-memory {
39 #address-cells = <1>;
40 #size-cells = <1>;
[all …]
H A Daspeed-bmc-lenovo-hr630.dts1 // SPDX-License-Identifier: GPL-2.0+
5 * Copyright (C) 2019-present Lenovo
8 /dts-v1/;
10 #include "aspeed-g5.dtsi"
11 #include <dt-bindings/gpio/aspeed-gpio.h>
15 compatible = "lenovo,hr630-bmc", "aspeed,ast2500";
29 stdout-path = &uart5;
38 reserved-memory {
39 #address-cells = <1>;
40 #size-cells = <1>;
[all …]
/linux/Documentation/devicetree/bindings/media/cec/
H A Dcec-gpio.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
4 $id: http://devicetree.org/schemas/media/cec/cec-gpio.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: HDMI CEC GPIO
10 - Hans Verkuil <hverkuil-cisco@xs4all.nl>
13 The HDMI CEC GPIO module supports CEC implementations where the CEC line is
14 hooked up to a pull-up GPIO line and - optionally - the HPD line is hooked up
15 to another GPIO line.
17 Please note:: the maximum voltage for the CEC line is 3.63V, for the HPD and
[all …]
/linux/Documentation/devicetree/bindings/pinctrl/
H A Dqcom,pmic-gpio.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/pinctrl/qcom,pmic-gpio.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Qualcomm PMIC GPIO block
10 - Bjorn Andersson <bjorn.andersson@linaro.org>
13 This binding describes the GPIO block(s) found in the 8xxx series of
19 - enum:
20 - qcom,pm2250-gpio
21 - qcom,pm660-gpio
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/
H A Dbase.c29 nvkm_gpio_drive(struct nvkm_gpio *gpio, int idx, int line, int dir, int out) in nvkm_gpio_drive() argument
31 return gpio->func->drive(gpio, line, dir, out); in nvkm_gpio_drive()
35 nvkm_gpio_sense(struct nvkm_gpio *gpio, int idx, int line) in nvkm_gpio_sense() argument
37 return gpio->func->sense(gpio, line); in nvkm_gpio_sense()
41 nvkm_gpio_reset(struct nvkm_gpio *gpio, u8 func) in nvkm_gpio_reset() argument
43 if (gpio->func->reset) in nvkm_gpio_reset()
44 gpio->func->reset(gpio, func); in nvkm_gpio_reset()
48 nvkm_gpio_find(struct nvkm_gpio *gpio, int idx, u8 tag, u8 line, in nvkm_gpio_find() argument
51 struct nvkm_device *device = gpio->subdev.device; in nvkm_gpio_find()
52 struct nvkm_bios *bios = device->bios; in nvkm_gpio_find()
[all …]
H A Dnv10.c29 nv10_gpio_sense(struct nvkm_gpio *gpio, int line) in nv10_gpio_sense() argument
31 struct nvkm_device *device = gpio->subdev.device; in nv10_gpio_sense()
32 if (line < 2) { in nv10_gpio_sense()
33 line = line * 16; in nv10_gpio_sense()
34 line = nvkm_rd32(device, 0x600818) >> line; in nv10_gpio_sense()
35 return !!(line & 0x0100); in nv10_gpio_sense()
37 if (line < 10) { in nv10_gpio_sense()
38 line = (line - 2) * 4; in nv10_gpio_sense()
39 line = nvkm_rd32(device, 0x60081c) >> line; in nv10_gpio_sense()
40 return !!(line & 0x04); in nv10_gpio_sense()
[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
41 * Must be no greater than 64, as bitmaps are restricted here to 64-bits
42 * for simplicity, and a multiple of 2 to ensure 32/64-bit alignment of
48 * The maximum number of configuration attributes associated with a line
[all …]
/linux/Documentation/firmware-guide/acpi/
H A Dgpio-properties.rst1 .. SPDX-License-Identifier: GPL-2.0
4 _DSD Device Properties Related to GPIO
10 the corresponding GPIO, which is pretty error prone (it depends on
31 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
34 Package () { "reset-gpios", Package () { ^BTH, 1, 1, 0 } },
35 Package () { "shutdown-gpios", Package () { ^BTH, 0, 0, 0 } },
40 The format of the supported GPIO property is::
52 If 1, the GPIO is marked as active_low.
56 it to 1 marks the GPIO as active low.
61 In our Bluetooth example the "reset-gpios" refers to the second GpioIo()
[all …]
/linux/arch/arm64/boot/dts/mediatek/
H A Dpumpkin-common.dtsi1 // SPDX-License-Identifier: GPL-2.0
7 #include <dt-bindings/gpio/gpio.h>
16 stdout-path = "serial0:921600n8";
21 compatible = "linaro,optee-tz";
26 gpio-keys {
27 compatible = "gpio-keys";
28 pinctrl-names = "default";
29 pinctrl-0 = <&gpio_keys_default>;
31 key-volume-up {
35 wakeup-source;
[all …]
/linux/drivers/gpio/
H A Dgpio-realtek-otto.c1 // SPDX-License-Identifier: GPL-2.0-only
3 #include <linux/gpio/driver.h>
29 /* Two bits per GPIO in IMR registers */
42 * realtek_gpio_ctrl - Realtek Otto GPIO driver data
45 * @base: Base address of the register block for a GPIO bank
49 * @bank_read: Read a bank setting as a single 32-bit value
50 * @bank_write: Write a bank setting as a single 32-bit value
51 * @imr_line_pos: Bit shift of an IRQ line's IMR value.
53 * The DIR, DATA, and ISR registers consist of four 8-bit port values, packed
54 * into a single 32-bit register. Use @bank_read (@bank_write) to get (assign)
[all …]
H A Dgpio-mmio.c1 // SPDX-License-Identifier: GPL-2.0+
3 * Generic driver for memory-mapped GPIO controllers.
10 * ..The simplest form of a GPIO controller that the driver supports is``
11 * `.just a single "data" register, where GPIO state can be read and/or `
16 __________|~$@~~~ %~ /o*o*o*o*o*o\ .. Implementing such a GPIO .
22 * . big-endian notation, just`. .. A bit more sophisticated controllers ,
23 * . register the device with -be`. .with a pair of set/clear-bit registers ,
29 * .. The expectation is that in at least some cases . ,-~~~-,
30 * .this will be used with roll-your-own ASIC/FPGA .` \ /
58 #include <linux/gpio/driver.h>
[all …]
/linux/Documentation/devicetree/bindings/gpio/
H A Dgpio.txt1 Specifying GPIO information for devices
5 -----------------
7 GPIO properties should be named "[<name>-]gpios", with <name> being the purpose
8 of this GPIO for the device. While a non-existent <name> is considered valid
10 for new bindings. Also, GPIO properties named "[<name>-]gpio" are valid and old
14 GPIO properties can contain one or more GPIO phandles, but only in exceptional
18 several GPIOs serve the same function (e.g. a parallel data line).
23 The following example could be used to describe GPIO pins used as device enable
24 and bit-banged data signals:
27 gpio-controller;
[all …]
H A Dgpio-zynq.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/gpio/gpio-zynq.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Xilinx Zynq GPIO controller
10 - Michal Simek <michal.simek@amd.com>
15 - xlnx,zynq-gpio-1.0
16 - xlnx,zynqmp-gpio-1.0
17 - xlnx,versal-gpio-1.0
18 - xlnx,pmc-gpio-1.0
[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
34 rmdir $CONFIGFS_DIR/$CHIP/$BANK/$LINE/hog || \
[all …]

12345678910>>...41