/linux-6.12.1/drivers/tty/serial/ |
D | serial_mctrl_gpio.c | 1 // SPDX-License-Identifier: GPL-2.0+ 22 int irq[UART_GPIO_MAX]; 23 unsigned int mctrl_prev; 29 unsigned int mctrl; 40 static bool mctrl_gpio_flags_is_dir_out(unsigned int idx) in mctrl_gpio_flags_is_dir_out() 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 57 unsigned int count = 0; in mctrl_gpio_set() [all …]
|
D | serial_mctrl_gpio.h | 1 /* 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. 50 unsigned int 51 mctrl_gpio_get_outputs(struct mctrl_gpios *gpios, unsigned int *mctrl); 56 struct gpio_desc *mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios, [all …]
|
/linux-6.12.1/sound/soc/ |
D | soc-jack.c | 1 // 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 33 void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) in snd_soc_jack_report() 37 unsigned int sync = 0; in snd_soc_jack_report() 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() [all …]
|
/linux-6.12.1/drivers/watchdog/ |
D | mena21_wdt.c | 1 // SPDX-License-Identifier: GPL-2.0+ 34 struct gpio_desc *gpios[NUM_GPIOS]; member 42 static unsigned int a21_wdt_get_bootstatus(struct a21_wdt_drv *drv) in a21_wdt_get_bootstatus() 44 int reset = 0; in a21_wdt_get_bootstatus() 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() 53 static int a21_wdt_start(struct watchdog_device *wdt) in a21_wdt_start() 57 gpiod_set_value(drv->gpios[GPIO_WD_ENAB], 1); in a21_wdt_start() 62 static int a21_wdt_stop(struct watchdog_device *wdt) in a21_wdt_stop() [all …]
|
/linux-6.12.1/drivers/gpio/ |
D | gpiolib-of.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 * Copyright (c) 2007-2008 MontaVista Software, Inc. 26 #include "gpiolib-of.h" 29 * This is Linux-specific flags. By default controllers' and Linux' mapping 31 * Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended. 44 * of_gpio_named_count() - Count GPIOs for a device 45 * @np: device node to count GPIOs for 48 * The function returns the count of GPIOs specified for a node. 52 * Either number of GPIOs defined in the property, or 53 * * %-EINVAL for an incorrectly formed "gpios" property, or [all …]
|
/linux-6.12.1/Documentation/driver-api/gpio/ |
D | consumer.rst | 8 Guidelines for GPIOs consumers 13 obtain and use GPIOs are available by including the following file:: 21 - Simple compile coverage with e.g. COMPILE_TEST - it does not matter that 25 - Truly optional GPIOLIB support - where the driver does not really make use 26 of the GPIOs on certain compile-time configurations for certain systems, but 27 will use it under other compile-time configurations. In this case the 35 All the functions that work with the descriptor-based GPIO interface are 42 Obtaining and Disposing GPIOs 45 With the descriptor-based interface, GPIOs are identified with an opaque, 46 non-forgeable handler that must be obtained through a call to one of the [all …]
|
/linux-6.12.1/drivers/pinctrl/qcom/ |
D | pinctrl-qdf2xxx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * device. The driver which controls this device is pinctrl-msm.c. Each 8 * with pinctrl-msm.c. This means that all TLMM drivers are pin control 11 * This pin control driver is intended to be used only an ACPI-enabled 14 * a GPIO-only driver. The alternative is to duplicate the GPIO code of 15 * pinctrl-msm.c into another driver. 23 #include "pinctrl-msm.h" 31 static int qdf2xxx_pinctrl_probe(struct platform_device *pdev) in qdf2xxx_pinctrl_probe() 37 unsigned int i; in qdf2xxx_pinctrl_probe() 39 unsigned int avail_gpios; /* The number of GPIOs we support */ in qdf2xxx_pinctrl_probe() [all …]
|
/linux-6.12.1/drivers/platform/x86/siemens/ |
D | simatic-ipc-batt.c | 1 // SPDX-License-Identifier: GPL-2.0 20 #include <linux/hwmon-sysfs.h> 25 #include <linux/platform_data/x86/simatic-ipc-base.h> 28 #include "simatic-ipc-batt.h" 39 struct gpio_desc *gpios[3]; member 47 if (priv.gpios[2]) { in simatic_ipc_batt_read_gpio() 48 gpiod_set_value(priv.gpios[2], 1); in simatic_ipc_batt_read_gpio() 52 if (gpiod_get_value_cansleep(priv.gpios[0])) in simatic_ipc_batt_read_gpio() 54 else if (gpiod_get_value_cansleep(priv.gpios[1])) in simatic_ipc_batt_read_gpio() 57 if (priv.gpios[2]) in simatic_ipc_batt_read_gpio() [all …]
|
/linux-6.12.1/drivers/net/mdio/ |
D | mdio-mux-gpio.c | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <linux/mdio-mux.h> 18 struct gpio_descs *gpios; member 22 static int mdio_mux_gpio_switch_fn(int current_child, int desired_child, in mdio_mux_gpio_switch_fn() 33 gpiod_set_array_value_cansleep(s->gpios->ndescs, s->gpios->desc, in mdio_mux_gpio_switch_fn() 34 s->gpios->info, values); in mdio_mux_gpio_switch_fn() 39 static int mdio_mux_gpio_probe(struct platform_device *pdev) in mdio_mux_gpio_probe() 42 struct gpio_descs *gpios; in mdio_mux_gpio_probe() local 43 int r; in mdio_mux_gpio_probe() 45 gpios = devm_gpiod_get_array(&pdev->dev, NULL, GPIOD_OUT_LOW); in mdio_mux_gpio_probe() [all …]
|
/linux-6.12.1/drivers/gpu/drm/panel/ |
D | panel-ronbo-rb070d30.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright (C) 2018-2019, Bridge Systems BV 4 * Copyright (C) 2018-2019, Bootlin 7 * This file based on panel-ilitek-ili9881c.c 15 #include <linux/media-bus-format.h> 37 } gpios; member 45 static int rb070d30_panel_prepare(struct drm_panel *panel) in rb070d30_panel_prepare() 48 int ret; in rb070d30_panel_prepare() 50 ret = regulator_enable(ctx->supply); in rb070d30_panel_prepare() 52 dev_err(&ctx->dsi->dev, "Failed to enable supply: %d\n", ret); in rb070d30_panel_prepare() [all …]
|
/linux-6.12.1/drivers/hwmon/ |
D | gpio-fan.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * gpio-fan.c - Hwmon driver for fans connected to GPIO lines. 26 int rpm; 27 int ctrl_val; 35 struct mutex lock; /* lock GPIOs operations. */ 36 int num_gpios; 37 struct gpio_desc **gpios; member 38 int num_speed; 40 int speed_index; 41 int resume_speed; [all …]
|
/linux-6.12.1/drivers/hsi/clients/ |
D | nokia-modem.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * nokia-modem.c 18 static unsigned int pm = 1; 19 module_param(pm, int, 0400); 30 int nokia_modem_rst_ind_irq; 32 struct nokia_modem_gpio *gpios; member 33 int gpio_amount; 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() [all …]
|
/linux-6.12.1/arch/arm/boot/dts/intel/ixp/ |
D | intel-ixp42x-goramo-multilink.dts | 1 // SPDX-License-Identifier: ISC 5 * - MultiLink Basic (a box) 6 * - MultiLink Max (19" rack mount) 9 * This is one of the few devices supporting the IXP4xx High-Speed Serial 14 /dts-v1/; 16 #include "intel-ixp42x.dtsi" 17 #include <dt-bindings/input/input.h> 21 compatible = "goramo,multilink-router", "intel,ixp42x"; 22 #address-cells = <1>; 23 #size-cells = <1>; [all …]
|
D | intel-ixp42x-linksys-nslu2.dts | 1 // SPDX-License-Identifier: ISC 6 /dts-v1/; 8 #include "intel-ixp42x.dtsi" 9 #include <dt-bindings/input/input.h> 14 #address-cells = <1>; 15 #size-cells = <1>; 25 stdout-path = "uart0:115200n8"; 33 compatible = "gpio-leds"; 34 led-status { 36 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; [all …]
|
D | intel-ixp42x-iomega-nas100d.dts | 1 // SPDX-License-Identifier: ISC 6 /dts-v1/; 8 #include "intel-ixp42x.dtsi" 9 #include <dt-bindings/input/input.h> 13 compatible = "iom,nas-100d", "intel,ixp42x"; 14 #address-cells = <1>; 15 #size-cells = <1>; 25 stdout-path = "uart0:115200n8"; 33 compatible = "gpio-leds"; 34 led-wlan { [all …]
|
D | intel-ixp42x-dlink-dsm-g600.dts | 1 // SPDX-License-Identifier: ISC 3 * Device Tree file for D-Link DSM-G600 revision A based on IXP420 11 /dts-v1/; 13 #include "intel-ixp42x.dtsi" 14 #include <dt-bindings/input/input.h> 17 model = "D-Link DSM-G600 rev A"; 18 compatible = "dlink,dsm-g600-a", "intel,ixp42x"; 19 #address-cells = <1>; 20 #size-cells = <1>; 30 stdout-path = "uart0:115200n8"; [all …]
|
/linux-6.12.1/drivers/input/misc/ |
D | rotary_encoder.c | 1 // 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" 44 unsigned int pos; 46 struct gpio_descs *gpios; member 48 unsigned int *irq; 51 signed char dir; /* 1 - clockwise, -1 - CCW */ 53 unsigned int last_stable; 56 static unsigned int rotary_encoder_get_state(struct rotary_encoder *encoder) in rotary_encoder_get_state() 58 int i; in rotary_encoder_get_state() [all …]
|
D | gpio_decoder.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/ 24 static int gpio_decoder_get_gpios_state(struct gpio_decoder *decoder) in gpio_decoder_get_gpios_state() 26 struct gpio_descs *gpios = decoder->input_gpios; in gpio_decoder_get_gpios_state() local 27 unsigned int ret = 0; in gpio_decoder_get_gpios_state() 28 int i, val; in gpio_decoder_get_gpios_state() 30 for (i = 0; i < gpios->ndescs; i++) { in gpio_decoder_get_gpios_state() 31 val = gpiod_get_value_cansleep(gpios->desc[i]); in gpio_decoder_get_gpios_state() 33 dev_err(decoder->dev, in gpio_decoder_get_gpios_state() 35 desc_to_gpio(gpios->desc[i]), val); in gpio_decoder_get_gpios_state() [all …]
|
/linux-6.12.1/drivers/mux/ |
D | gpio.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * GPIO-controlled multiplexer driver 20 struct gpio_descs *gpios; member 23 static int mux_gpio_set(struct mux_control *mux, int state) in mux_gpio_set() 25 struct mux_gpio *mux_gpio = mux_chip_priv(mux->chip); in mux_gpio_set() 31 gpiod_set_array_value_cansleep(mux_gpio->gpios->ndescs, in mux_gpio_set() 32 mux_gpio->gpios->desc, in mux_gpio_set() 33 mux_gpio->gpios->info, values); in mux_gpio_set() 43 { .compatible = "gpio-mux", }, 48 static int mux_gpio_probe(struct platform_device *pdev) in mux_gpio_probe() [all …]
|
/linux-6.12.1/arch/arm64/boot/dts/freescale/ |
D | imx8mp-msc-sm2s-14N0600E.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 5 /dts-v1/; 7 #include "imx8mp-msc-sm2s.dtsi" 33 gbe0-int-hog { 34 gpio-hog; 36 gpios = <3 GPIO_ACTIVE_LOW>; 39 gbe1-int-hog { 40 gpio-hog; 42 gpios = <4 GPIO_ACTIVE_LOW>; 45 cam2-rst-hog { [all …]
|
/linux-6.12.1/drivers/bus/ |
D | ts-nbus.c | 1 // 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. 42 static int ts_nbus_init_pdata(struct platform_device *pdev, in ts_nbus_init_pdata() 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() [all …]
|
/linux-6.12.1/drivers/staging/olpc_dcon/ |
D | olpc_dcon_xo_1.c | 1 // 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 39 static int dcon_init_xo_1(struct dcon_priv *dcon) in dcon_init_xo_1() 42 int ret, i; in dcon_init_xo_1() 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() 69 dcon->curr_src = cs5535_gpio_isset(OLPC_GPIO_DCON_LOAD, GPIO_OUTPUT_VAL) in dcon_init_xo_1() [all …]
|
/linux-6.12.1/include/sound/ |
D | soc-jack.h | 1 /* SPDX-License-Identifier: GPL-2.0 3 * soc-jack.h 12 * struct snd_soc_jack_pin - Describes a pin to update based on jack detection 16 * @invert: if non-zero then pin is enabled when status is not reported 22 int mask; 27 * struct snd_soc_jack_zone - Describes voltage zones of jack detection 37 unsigned int min_mv; 38 unsigned int max_mv; 39 unsigned int jack_type; 40 unsigned int debounce_time; [all …]
|
/linux-6.12.1/Documentation/devicetree/bindings/media/ |
D | samsung,s5c73m3.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 11 - Sylwester Nawrocki <s.nawrocki@samsung.com> 14 The S5C73M3 camera ISP supports MIPI CSI-2 and parallel (ITU-R BT.656) 31 clock-names: 33 - const: cis_extclk 35 clock-frequency: 39 standby-gpios: [all …]
|
/linux-6.12.1/arch/arm/boot/dts/aspeed/ |
D | aspeed-bmc-ufispace-ncplite.dts | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 /dts-v1/; 5 #include "aspeed-g6.dtsi" 6 #include <dt-bindings/i2c/i2c.h> 7 #include <dt-bindings/gpio/aspeed-gpio.h> 11 compatible = "ufispace,ncplite-bmc", "aspeed,ast2600"; 18 stdout-path = &uart5; 27 iio-hwmon { 28 compatible = "iio-hwmon"; 29 io-channels = <&adc0 0>, <&adc0 1>, <&adc0 2>, <&adc0 3>, [all …]
|