Home
last modified time | relevance | path

Searched +full:request +full:- +full:gpios (Results 1 – 25 of 193) sorted by relevance

12345678

/linux/drivers/tty/serial/
H A Dserial_mctrl_gpio.h1 /* SPDX-License-Identifier: GPL-2.0+ */
29 * Opaque descriptor for modem lines controlled by GPIOs
36 * Set state of the modem control output lines via GPIOs.
38 void mctrl_gpio_set(struct mctrl_gpios *gpios, unsigned int mctrl);
41 * Get state of the modem control input lines from GPIOs.
44 unsigned int mctrl_gpio_get(struct mctrl_gpios *gpios, unsigned int *mctrl);
47 * Get state of the modem control output lines from GPIOs.
51 mctrl_gpio_get_outputs(struct mctrl_gpios *gpios, unsigned int *mctrl);
56 struct gpio_desc *mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios,
60 * Request and set direction of modem control line GPIOs and set up irq
[all …]
H A Dserial_mctrl_gpio.c1 // SPDX-License-Identifier: GPL-2.0+
46 * mctrl_gpio_set - set gpios according to mctrl state
47 * @gpios: gpios to set
50 * Set the gpios according to the mctrl state.
52 void mctrl_gpio_set(struct mctrl_gpios *gpios, unsigned int mctrl) in mctrl_gpio_set() argument
59 if (gpios == NULL) in mctrl_gpio_set()
63 if (gpios->gpio[i] && mctrl_gpio_flags_is_dir_out(i)) { in mctrl_gpio_set()
64 desc_array[count] = gpios->gpio[i]; in mctrl_gpio_set()
74 * mctrl_gpio_to_gpiod - obtain gpio_desc of modem line index
75 * @gpios: gpios to look into
[all …]
/linux/sound/soc/
H A Dsoc-jack.c1 // SPDX-License-Identifier: GPL-2.0+
3 // soc-jack.c -- ALSA SoC jack handling
20 * snd_soc_jack_report - Report the current status for a jack
39 if (!jack || !jack->jack) in snd_soc_jack_report()
43 dapm = &jack->card->dapm; in snd_soc_jack_report()
45 mutex_lock(&jack->mutex); in snd_soc_jack_report()
47 jack->status &= ~mask; in snd_soc_jack_report()
48 jack->status |= status & mask; in snd_soc_jack_report()
52 list_for_each_entry(pin, &jack->pins, list) { in snd_soc_jack_report()
53 int enable = pin->mask & jack->status; in snd_soc_jack_report()
[all …]
/linux/Documentation/devicetree/bindings/serial/
H A Dfsl-mxs-auart.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/serial/fsl-mxs-auart.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Fabio Estevam <festevam@gmail.com>
13 - $ref: serial.yaml#
18 - const: fsl,imx23-auart
19 - const: alphascale,asm9260-auart
20 - items:
21 - enum:
[all …]
H A Dingenic,uart.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Paul Cercueil <paul@crapouillou.net>
13 - $ref: serial.yaml#
17 pattern: "^serial@[0-9a-f]+$"
21 - enum:
22 - ingenic,jz4740-uart
23 - ingenic,jz4750-uart
24 - ingenic,jz4760-uart
[all …]
/linux/Documentation/devicetree/bindings/soc/tegra/
H A Dnvidia,nvec.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Thierry Reding <thierry.reding@gmail.com>
11 - Jon Hunter <jonathanh@nvidia.com>
26 - description: divider clock
27 - description: fast clock
29 clock-names:
32 - const: div-clk
33 - const: fast-clk
[all …]
/linux/drivers/gpio/
H A Dgpiolib-legacy.c1 // SPDX-License-Identifier: GPL-2.0
25 * gpio_request_one - request a single GPIO with initial configuration
40 /* Compatibility: assume unavailable "valid" GPIOs will appear later */ in gpio_request_one()
43 return -EPROBE_DEFER; in gpio_request_one()
72 /* Compatibility: assume unavailable "valid" GPIOs will appear later */ in gpio_request()
75 return -EPROBE_DEFER; in gpio_request()
89 * devm_gpio_request - request a GPIO for a managed device
90 * @dev: device to request the GPIO for
96 * GPIOs requested with this function will be automatically freed
111 return -ENOMEM; in devm_gpio_request()
[all …]
H A Dgpio-ich.c1 // SPDX-License-Identifier: GPL-2.0+
3 * Intel ICH6-10, Series 5 and 6, Atom C2000 (Avoton/Rangeley) GPIO driver
19 * Each chunk of 32 GPIOs is manipulated via its own USE_SELx, IO_SELx, and
34 {0x00, 0x30, 0x40}, /* USE_SEL[1-3] offsets */
35 {0x04, 0x34, 0x44}, /* IO_SEL[1-3] offsets */
36 {0x0c, 0x38, 0x48}, /* LVL[1-3] offsets */
54 #define ICHX_WRITE(val, reg, base_res) outl(val, (reg) + (base_res)->start)
55 #define ICHX_READ(reg, base_res) inl((reg) + (base_res)->start)
74 /* Some chipsets have quirks, let these use their own request/get */
75 int (*request)(struct gpio_chip *chip, unsigned int offset); member
[all …]
H A Dgpio-stp-xway.c1 // SPDX-License-Identifier: GPL-2.0-only
85 u8 groups; /* we can drive 1-3 groups of 8bit each */
95 * xway_stp_get() - gpio_chip->get - get gpios.
105 return (xway_stp_r32(chip->virt, XWAY_STP_CPU0) & BIT(gpio)); in xway_stp_get()
109 * xway_stp_set() - gpio_chip->set - set gpios.
121 chip->shadow |= BIT(gpio); in xway_stp_set()
123 chip->shadow &= ~BIT(gpio); in xway_stp_set()
124 xway_stp_w32(chip->virt, chip->shadow, XWAY_STP_CPU0); in xway_stp_set()
125 if (!chip->reserved) in xway_stp_set()
126 xway_stp_w32_mask(chip->virt, 0, XWAY_STP_CON_SWU, XWAY_STP_CON0); in xway_stp_set()
[all …]
/linux/Documentation/driver-api/gpio/
H A Dboard.rst5 This document explains how GPIOs can be assigned to given devices and functions.
9 Kconfig. Then, how GPIOs are mapped depends on what the platform uses to
14 -----------
15 GPIOs can easily be mapped to devices and functions in the device tree. The
16 exact way to do it depends on the GPIO controller providing the GPIOs, see the
19 GPIOs mappings are defined in the consumer device's node, in a property named
20 <function>-gpios, where <function> is the function the driver will request
26 led-gpios = <&gpio 15 GPIO_ACTIVE_HIGH>, /* red */
30 power-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
33 Properties named <function>-gpio are also considered valid and old bindings use
[all …]
/linux/drivers/extcon/
H A Dextcon-intel-int3496.c1 // SPDX-License-Identifier: GPL-2.0
14 #include <linux/devm-helpers.h>
15 #include <linux/extcon-provider.h>
53 { "id-gpios", &id_gpios, 1, ACPI_GPIO_QUIRK_NO_IO_RESTRICTION },
54 { "vbus-gpios", &vbus_gpios, 1 },
55 { "mux-gpios", &mux_gpios, 1 },
63 if (IS_ERR_OR_NULL(data->vbus_boost)) in int3496_set_vbus_boost()
66 if (data->vbus_boost_enabled == enable) in int3496_set_vbus_boost()
70 ret = regulator_enable(data->vbus_boost); in int3496_set_vbus_boost()
72 ret = regulator_disable(data->vbus_boost); in int3496_set_vbus_boost()
[all …]
/linux/drivers/watchdog/
H A Dmena21_wdt.c1 // SPDX-License-Identifier: GPL-2.0+
34 struct gpio_desc *gpios[NUM_GPIOS]; member
46 reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST0]) ? (1 << 0) : 0; in a21_wdt_get_bootstatus()
47 reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST1]) ? (1 << 1) : 0; in a21_wdt_get_bootstatus()
48 reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST2]) ? (1 << 2) : 0; in a21_wdt_get_bootstatus()
57 gpiod_set_value(drv->gpios[GPIO_WD_ENAB], 1); in a21_wdt_start()
66 gpiod_set_value(drv->gpios[GPIO_WD_ENAB], 0); in a21_wdt_stop()
75 gpiod_set_value(drv->gpios[GPIO_WD_TRIG], 0); in a21_wdt_ping()
77 gpiod_set_value(drv->gpios[GPIO_WD_TRIG], 1); in a21_wdt_ping()
88 dev_err(wdt->parent, "Only 1 and 30 allowed as timeout\n"); in a21_wdt_set_timeout()
[all …]
/linux/Documentation/devicetree/bindings/power/reset/
H A Dgpio-restart.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/power/reset/gpio-restart.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Sebastian Reichel <sre@kernel.org>
16 request the given gpio line and install a restart handler. If the optional properties
17 'open-source' is not found, the GPIO line will be driven in the inactive state. Otherwise its
22 This will also cause an inactive->active edge condition, triggering positive edge triggered
23 reset. After a delay specified by active-delay, the GPIO is set to inactive, thus causing an
24 active->inactive edge, triggering negative edge triggered reset. After a delay specified by
[all …]
/linux/Documentation/devicetree/bindings/net/can/
H A Dfsl,flexcan.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
8 Flexcan CAN controller on Freescale's ARM and PowerPC system-on-a-chip (SOC).
11 - Marc Kleine-Budde <mkl@pengutronix.de>
14 - $ref: can-controller.yaml#
19 - enum:
20 - fsl,imx95-flexcan
21 - fsl,imx93-flexcan
22 - fsl,imx8qm-flexcan
[all …]
/linux/drivers/pinctrl/renesas/
H A Dgpio.c1 // SPDX-License-Identifier: GPL-2.0
6 * Copyright (C) 2009 - 2012 Paul Mundt
40 return chip->pfc; in gpio_to_pfc()
47 int idx = sh_pfc_get_pin_index(chip->pfc, offset); in gpio_get_data_reg()
48 struct sh_pfc_gpio_pin *gpio_pin = &chip->pins[idx]; in gpio_get_data_reg()
50 *reg = &chip->regs[gpio_pin->dreg]; in gpio_get_data_reg()
51 *bit = gpio_pin->dbit; in gpio_get_data_reg()
57 phys_addr_t address = dreg->reg; in gpio_read_data_reg()
58 void __iomem *mem = address - chip->mem->phys + chip->mem->virt; in gpio_read_data_reg()
60 return sh_pfc_read_raw_reg(mem, dreg->reg_width); in gpio_read_data_reg()
[all …]
/linux/arch/arm/mach-pxa/
H A Dam200epd.c2 * am200epd.c -- Platform device for AM200 EPD kit
12 * This work was made possible by help and equipment support from E-Ink
16 * on the AM200 EPD prototype kit/development kit with an E-Ink 800x600
35 #include <linux/platform_data/video-pxafb.h>
101 static int gpios[] = { LED_GPIO_PIN , STDBY_GPIO_PIN , RST_GPIO_PIN, variable
110 for (i = 0; i < ARRAY_SIZE(gpios); i++) { in am200_init_gpio_regs()
111 err = gpio_request(gpios[i], gpio_names[i]); in am200_init_gpio_regs()
113 dev_err(&am200_device->dev, "failed requesting " in am200_init_gpio_regs()
131 while (--i >= 0) in am200_init_gpio_regs()
132 gpio_free(gpios[i]); in am200_init_gpio_regs()
[all …]
H A Dam300epd.c2 * am300epd.c -- Platform device for AM300 EPD kit
10 * This work was made possible by help and equipment support from E-Ink
14 * on the AM300 EPD prototype kit/development kit with an E-Ink 800x600
32 #include "mfp-pxa25x.h"
34 #include <linux/platform_data/video-pxafb.h>
56 /* this is the 16-bit hdb bus 58-73 */
94 static int gpios[] = { PWR_GPIO_PIN, CFG_GPIO_PIN, RDY_GPIO_PIN, DC_GPIO_PIN, variable
103 wait_event(par->waitq, gpio_get_value(RDY_GPIO_PIN)); in am300_wait_event()
113 for (i = 0; i < ARRAY_SIZE(gpios); i++) { in am300_init_gpio_regs()
114 err = gpio_request(gpios[i], gpio_names[i]); in am300_init_gpio_regs()
[all …]
/linux/drivers/hsi/clients/
H A Dnokia-modem.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * nokia-modem.c
32 struct nokia_modem_gpio *gpios; member
45 dev_info(modem->device, "CMT rst line change detected\n"); in do_nokia_modem_rst_ind_tasklet()
47 if (modem->ssi_protocol) in do_nokia_modem_rst_ind_tasklet()
48 ssip_reset_event(modem->ssi_protocol); in do_nokia_modem_rst_ind_tasklet()
55 tasklet_schedule(&modem->nokia_modem_rst_ind_tasklet); in nokia_modem_rst_ind_isr()
65 for (i = 0; i < modem->gpio_amount; i++) { in nokia_modem_gpio_unexport()
66 sysfs_remove_link(&dev->kobj, modem->gpios[i].name); in nokia_modem_gpio_unexport()
67 gpiod_unexport(modem->gpios[i].gpio); in nokia_modem_gpio_unexport()
[all …]
/linux/include/linux/gpio/
H A Ddriver.h1 /* SPDX-License-Identifier: GPL-2.0 */
12 #include <linux/pinctrl/pinconf-generic.h>
48 * struct gpio_irq_chip - GPIO interrupt controller
78 * If non-NULL, will be set as the parent of this GPIO interrupt
90 * hardware IRQs correspond to the GPIO index 0..ngpio-1 (see the
98 * HWIRQ, return -EINVAL, but also make sure to fill in @valid_mask and
113 * &gpiochip_populate_parent_fwspec_twocell will be used. A four-cell
170 * Per GPIO IRQ chip lockdep class for IRQ request.
270 * bits from 0..(ngpios-1) set to "1" as in valid. The callback can
281 * If not %NULL, holds bitmask of GPIOs which are valid to be included
[all …]
/linux/arch/mips/include/asm/mach-au1x00/
H A Dgpio-au1000.h12 #include <asm/mach-au1x00/au1000.h>
15 * GPIO0-31 from GPIO1 block, GPIO200-215 from GPIO2 block.
22 #define ALCHEMY_GPIO1_MAX (ALCHEMY_GPIO1_BASE + ALCHEMY_GPIO1_NUM - 1)
23 #define ALCHEMY_GPIO2_MAX (ALCHEMY_GPIO2_BASE + ALCHEMY_GPIO2_NUM - 1)
47 return MAKE_IRQ(1, gpio - ALCHEMY_GPIO1_BASE); in au1000_gpio1_to_irq()
52 return -ENXIO; in au1000_gpio2_to_irq()
58 return ALCHEMY_GPIO1_BASE + (irq - AU1000_GPIO0_INT) + 0; in au1000_irq_to_gpio()
60 return -ENXIO; in au1000_irq_to_gpio()
65 gpio -= ALCHEMY_GPIO1_BASE; in au1500_gpio1_to_irq()
73 return -ENXIO; in au1500_gpio1_to_irq()
[all …]
/linux/Documentation/admin-guide/gpio/
H A Dgpio-virtuser.rst1 .. SPDX-License-Identifier: GPL-2.0-only
7 that request GPIOs and then control their behavior over debugfs. Virtual
8 consumer devices can be instantiated from device-tree or over configfs.
10 A virtual consumer uses the driver-facing GPIO APIs and allows to cover it with
11 automated tests driven by user-space. The GPIOs are requested using
12 ``gpiod_get_array()`` and so we support multiple GPIOs per connector ID.
15 -----------------------
17 The gpio-consumer module registers a configfs subsystem called
18 ``'gpio-virtuser'``. For details of the configfs filesystem, please refer to
25 **Group:** ``/config/gpio-virtuser``
[all …]
/linux/drivers/input/misc/
H A Drotary_encoder.c1 // SPDX-License-Identifier: GPL-2.0-only
11 * See file:Documentation/input/devices/rotary-encoder.rst for more information
26 #define DRV_NAME "rotary-encoder"
46 struct gpio_descs *gpios; member
51 signed char dir; /* 1 - clockwise, -1 - CCW */
61 for (i = 0; i < encoder->gpios->ndescs; ++i) { in rotary_encoder_get_state()
62 int val = gpiod_get_value_cansleep(encoder->gpios->desc[i]); in rotary_encoder_get_state()
65 if (encoder->encoding == ROTENC_GRAY && ret & 1) in rotary_encoder_get_state()
76 if (encoder->relative_axis) { in rotary_encoder_report_event()
77 input_report_rel(encoder->input, in rotary_encoder_report_event()
[all …]
/linux/drivers/pinctrl/qcom/
H A Dpinctrl-msm.h1 /* SPDX-License-Identifier: GPL-2.0-only */
38 * struct msm_pingroup - Qualcomm pingroup definition
118 * struct msm_gpio_wakeirq_map - Map of GPIOs and their wakeup pins
119 * @gpio: The GPIOs that are wakeup capable
120 * @wakeirq: The interrupt at the always-on interrupt controller
128 * struct msm_pinctrl_soc_data - Qualcomm pin controller driver configuration
135 * @ngpio: The number of pingroups the driver should expose as GPIOs.
137 * @wakeirq_map: The map of wakeup capable GPIOs and the pin at PDC/MPM
139 * @wakeirq_dual_edge_errata: If true then GPIOs using the wakeirq_map need
143 * @egpio_func: If non-zero then this SoC supports eGPIO. Even though in
[all …]
/linux/arch/arm/boot/dts/allwinner/
H A Dsun5i-r8-chip.dts5 * Maxime Ripard <maxime.ripard@free-electrons.com>
7 * This file is dual-licensed: you can use it either under the terms
46 /dts-v1/;
47 #include "sun5i-r8.dtsi"
48 #include "sunxi-common-regulators.dtsi"
50 #include <dt-bindings/gpio/gpio.h>
51 #include <dt-bindings/interrupt-controller/irq.h>
55 compatible = "nextthing,chip", "allwinner,sun5i-r8", "allwinner,sun5i-a13";
67 stdout-path = "serial0:115200n8";
71 compatible = "gpio-leds";
[all …]
/linux/Documentation/devicetree/bindings/display/tilcdc/
H A Dpanel.txt1 Device-Tree bindings for tilcdc DRM generic panel output driver
4 - compatible: value should be "ti,tilcdc,panel".
5 - panel-info: configuration info to configure LCDC correctly for the panel
6 - ac-bias: AC Bias Pin Frequency
7 - ac-bias-intrpt: AC Bias Pin Transitions per Interrupt
8 - dma-burst-sz: DMA burst size
9 - bpp: Bits per pixel
10 - fdd: FIFO DMA Request Delay
11 - sync-edge: Horizontal and Vertical Sync Edge: 0=rising 1=falling
12 - sync-ctrl: Horizontal and Vertical Sync: Control: 0=ignore
[all …]

12345678