Home
last modified time | relevance | path

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

1234567891011

/linux-6.12.1/drivers/tty/serial/
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 …]
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-6.12.1/sound/soc/
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-6.12.1/Documentation/devicetree/bindings/soc/tegra/
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-6.12.1/Documentation/devicetree/bindings/serial/
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 …]
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-6.12.1/drivers/gpio/
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()
50 set_bit(FLAG_ACTIVE_LOW, &desc->flags); in gpio_request_one()
75 /* Compatibility: assume unavailable "valid" GPIOs will appear later */ in gpio_request()
78 return -EPROBE_DEFER; in gpio_request()
92 * devm_gpio_request - request a GPIO for a managed device
93 * @dev: device to request the GPIO for
99 * GPIOs requested with this function will be automatically freed
[all …]
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 …]
/linux-6.12.1/drivers/staging/olpc_dcon/
Dolpc_dcon_xo_1.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright © 2006-2007 Red Hat, Inc.
6 * Copyright © 2006-2007 Advanced Micro Devices, Inc.
37 static struct gpio_desc *gpios[5]; variable
46 gpios[i] = devm_gpiod_get(&dcon->client->dev, pin[i].name, in dcon_init_xo_1()
48 if (IS_ERR(gpios[i])) { in dcon_init_xo_1()
49 ret = PTR_ERR(gpios[i]); in dcon_init_xo_1()
50 pr_err("failed to request %s GPIO: %d\n", pin[i].name, in dcon_init_xo_1()
69 dcon->curr_src = cs5535_gpio_isset(OLPC_GPIO_DCON_LOAD, GPIO_OUTPUT_VAL) in dcon_init_xo_1()
72 dcon->pending_src = dcon->curr_src; in dcon_init_xo_1()
[all …]
Dolpc_dcon_xo_1_5.c1 // SPDX-License-Identifier: GPL-2.0
36 #define VX855_GENL_PURPOSE_OUTPUT 0x44c /* PMIO_Rx4c-4f */
68 static struct gpio_desc *gpios[3]; variable
94 gpios_table.dev_id = dev_name(&dcon->client->dev); in dcon_init_xo_1_5()
99 gpios[i] = devm_gpiod_get(&dcon->client->dev, pin[i].name, in dcon_init_xo_1_5()
101 if (IS_ERR(gpios[i])) { in dcon_init_xo_1_5()
102 ret = PTR_ERR(gpios[i]); in dcon_init_xo_1_5()
103 pr_err("failed to request %s GPIO: %d\n", pin[i].name, in dcon_init_xo_1_5()
116 dcon->curr_src = (inl(VX855_GENL_PURPOSE_OUTPUT) & 0x1000) ? in dcon_init_xo_1_5()
118 dcon->pending_src = dcon->curr_src; in dcon_init_xo_1_5()
[all …]
/linux-6.12.1/Documentation/driver-api/gpio/
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-6.12.1/drivers/bus/
Dts-nbus.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * NBUS driver for TS-4600 based boards
5 * Copyright (c) 2016 - Savoir-faire Linux
8 * This driver implements a GPIOs bit-banged bus, called the NBUS by Technologic
10 * TS-4600 SoM.
21 #include <linux/ts-nbus.h>
40 * request all gpios required by the bus.
45 ts_nbus->data = devm_gpiod_get_array(&pdev->dev, "ts,data", in ts_nbus_init_pdata()
47 if (IS_ERR(ts_nbus->data)) in ts_nbus_init_pdata()
48 return dev_err_probe(&pdev->dev, PTR_ERR(ts_nbus->data), in ts_nbus_init_pdata()
[all …]
/linux-6.12.1/drivers/extcon/
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-6.12.1/Documentation/devicetree/bindings/net/
Dfsl,fec.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Shawn Guo <shawnguo@kernel.org>
11 - Wei Fang <wei.fang@nxp.com>
12 - NXP Linux Team <linux-imx@nxp.com>
15 - $ref: ethernet-controller.yaml#
20 - enum:
21 - fsl,imx25-fec
22 - fsl,imx27-fec
[all …]
Dethernet-phy.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/net/ethernet-phy.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Andrew Lunn <andrew@lunn.ch>
11 - Florian Fainelli <f.fainelli@gmail.com>
12 - Heiner Kallweit <hkallweit1@gmail.com>
14 # The dt-schema tools will generate a select statement first by using
21 pattern: "^ethernet-phy(@[a-f0-9]+)?$"
24 - $nodename
[all …]
/linux-6.12.1/drivers/watchdog/
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-6.12.1/Documentation/devicetree/bindings/power/reset/
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-6.12.1/Documentation/devicetree/bindings/net/can/
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-6.12.1/Documentation/devicetree/bindings/i2c/
Di2c-imx.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/i2c/i2c-imx.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Freescale Inter IC (I2C) and High Speed Inter IC (HS-I2C) for i.MX
10 - Oleksij Rempel <o.rempel@pengutronix.de>
13 - $ref: /schemas/i2c/i2c-controller.yaml#
18 - const: fsl,imx1-i2c
19 - const: fsl,imx21-i2c
20 - const: fsl,vf610-i2c
[all …]
/linux-6.12.1/drivers/phy/motorola/
Dphy-mapphone-mdm6600.c1 // SPDX-License-Identifier: GPL-2.0
62 PHY_MDM6600_CMD_NO_BYPASS, /* Request normal USB mode */
63 PHY_MDM6600_CMD_BP_SHUTDOWN_REQ, /* Request device power off */
111 struct gpio_desc *enable_gpio = ddata->ctrl_gpios[PHY_MDM6600_ENABLE]; in phy_mdm6600_init()
113 if (!ddata->enabled) in phy_mdm6600_init()
114 return -EPROBE_DEFER; in phy_mdm6600_init()
124 struct gpio_desc *enable_gpio = ddata->ctrl_gpios[PHY_MDM6600_ENABLE]; in phy_mdm6600_power_on()
126 if (!ddata->enabled) in phy_mdm6600_power_on()
127 return -ENODEV; in phy_mdm6600_power_on()
132 if (pm_runtime_enabled(&x->dev)) in phy_mdm6600_power_on()
[all …]
/linux-6.12.1/drivers/pinctrl/renesas/
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-6.12.1/arch/arm/mach-pxa/
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 …]
/linux-6.12.1/drivers/hsi/clients/
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-6.12.1/arch/mips/include/asm/mach-au1x00/
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-6.12.1/include/linux/gpio/
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 …]

1234567891011