| /kernel/linux/linux-4.19/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 void mctrl_gpio_set(struct mctrl_gpios *gpios, unsigned int mctrl) in mctrl_gpio_set() argument 44 int value_array[UART_GPIO_MAX]; in mctrl_gpio_set() 45 unsigned int count = 0; in mctrl_gpio_set() 47 if (gpios == NULL) in mctrl_gpio_set() 51 if (gpios->gpio[i] && mctrl_gpios_desc[i].dir_out) { in mctrl_gpio_set() 52 desc_array[count] = gpios->gpio[i]; 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 …]
|
| /kernel/linux/linux-5.10/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() 45 void mctrl_gpio_set(struct mctrl_gpios *gpios, unsigned int mctrl) in mctrl_gpio_set() argument 50 unsigned int count = 0; in mctrl_gpio_set() 52 if (gpios == NULL) in mctrl_gpio_set() 56 if (gpios->gpio[i] && mctrl_gpio_flags_is_dir_out(i)) { in mctrl_gpio_set() 57 desc_array[count] = gpios->gpio[i]; 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 …]
|
| /kernel/linux/linux-5.10/sound/soc/ |
| D | soc-jack.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // soc-jack.c -- ALSA SoC jack handling 21 int count; 23 struct snd_soc_jack_gpio *gpios; member 27 * snd_soc_jack_report - Report the current status for a jack 40 void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) in snd_soc_jack_report() 44 unsigned int sync = 0; in snd_soc_jack_report() 45 int enable; in snd_soc_jack_report() 51 dapm = &jack->card->dapm; in snd_soc_jack_report() 53 mutex_lock(&jack->mutex); in snd_soc_jack_report() [all …]
|
| /kernel/linux/linux-4.19/sound/soc/ |
| D | soc-jack.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // soc-jack.c -- ALSA SoC jack handling 21 int count; 23 struct snd_soc_jack_gpio *gpios; member 27 * snd_soc_component_set_jack - configure component jack. 34 int snd_soc_component_set_jack(struct snd_soc_component *component, in snd_soc_component_set_jack() 37 if (component->driver->set_jack) in snd_soc_component_set_jack() 38 return component->driver->set_jack(component, jack, data); in snd_soc_component_set_jack() 40 return -ENOTSUPP; in snd_soc_component_set_jack() 45 * snd_soc_card_jack_new - Create a new jack [all …]
|
| /kernel/linux/linux-5.10/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 …]
|
| /kernel/linux/linux-4.19/drivers/net/phy/ |
| D | mdio-mux-gpio.c | 14 #include <linux/mdio-mux.h> 21 struct gpio_descs *gpios; member 23 int values[]; 26 static int mdio_mux_gpio_switch_fn(int current_child, int desired_child, in mdio_mux_gpio_switch_fn() 30 unsigned int n; in mdio_mux_gpio_switch_fn() 35 for (n = 0; n < s->gpios->ndescs; n++) in mdio_mux_gpio_switch_fn() 36 s->values[n] = (desired_child >> n) & 1; in mdio_mux_gpio_switch_fn() 38 gpiod_set_array_value_cansleep(s->gpios->ndescs, s->gpios->desc, in mdio_mux_gpio_switch_fn() 39 s->values); in mdio_mux_gpio_switch_fn() 44 static int mdio_mux_gpio_probe(struct platform_device *pdev) in mdio_mux_gpio_probe() [all …]
|
| /kernel/linux/linux-4.19/drivers/watchdog/ |
| D | mena21_wdt.c | 1 // SPDX-License-Identifier: GPL-2.0+ 34 unsigned 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 |= gpio_get_value(drv->gpios[GPIO_WD_RST0]) ? (1 << 0) : 0; in a21_wdt_get_bootstatus() 47 reset |= gpio_get_value(drv->gpios[GPIO_WD_RST1]) ? (1 << 1) : 0; in a21_wdt_get_bootstatus() 48 reset |= gpio_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 gpio_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 …]
|
| /kernel/linux/linux-5.10/sound/soc/codecs/ |
| D | wm1250-ev1.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Driver for the 1250-EV1 audio I/O module 15 #include <sound/soc-dapm.h> 16 #include <sound/wm1250-ev1.h> 27 struct gpio gpios[WM1250_EV1_NUM_GPIOS]; member 30 static int wm1250_ev1_set_bias_level(struct snd_soc_component *component, in wm1250_ev1_set_bias_level() 33 struct wm1250_priv *wm1250 = dev_get_drvdata(component->dev); in wm1250_ev1_set_bias_level() 34 int ena; in wm1250_ev1_set_bias_level() 37 ena = wm1250->gpios[WM1250_EV1_GPIO_CLK_ENA].gpio; in wm1250_ev1_set_bias_level() 39 ena = -1; in wm1250_ev1_set_bias_level() [all …]
|
| /kernel/linux/linux-4.19/sound/soc/codecs/ |
| D | wm1250-ev1.c | 2 * Driver for the 1250-EV1 audio I/O module 20 #include <sound/soc-dapm.h> 21 #include <sound/wm1250-ev1.h> 32 struct gpio gpios[WM1250_EV1_NUM_GPIOS]; member 35 static int wm1250_ev1_set_bias_level(struct snd_soc_component *component, in wm1250_ev1_set_bias_level() 38 struct wm1250_priv *wm1250 = dev_get_drvdata(component->dev); in wm1250_ev1_set_bias_level() 39 int ena; in wm1250_ev1_set_bias_level() 42 ena = wm1250->gpios[WM1250_EV1_GPIO_CLK_ENA].gpio; in wm1250_ev1_set_bias_level() 44 ena = -1; in wm1250_ev1_set_bias_level() 68 SND_SOC_DAPM_ADC("ADC", "wm1250-ev1 Capture", SND_SOC_NOPM, 0, 0), [all …]
|
| /kernel/linux/linux-4.19/drivers/i2c/muxes/ |
| D | i2c-mux-gpio.c | 12 #include <linux/i2c-mux.h> 13 #include <linux/platform_data/i2c-mux-gpio.h> 24 struct gpio_desc **gpios; member 25 int *values; 30 int i; in i2c_mux_gpio_set() 32 for (i = 0; i < mux->data.n_gpios; i++) in i2c_mux_gpio_set() 33 mux->values[i] = (val >> i) & 1; in i2c_mux_gpio_set() 35 gpiod_set_array_value_cansleep(mux->data.n_gpios, in i2c_mux_gpio_set() 36 mux->gpios, mux->values); in i2c_mux_gpio_set() 39 static int i2c_mux_gpio_select(struct i2c_mux_core *muxc, u32 chan) in i2c_mux_gpio_select() [all …]
|
| /kernel/linux/linux-4.19/Documentation/driver-api/gpio/ |
| D | consumer.rst | 6 it describes the new descriptor-based interface. For a description of the 7 deprecated integer-based GPIO interface please refer to gpio-legacy.txt. 10 Guidelines for GPIOs consumers 15 obtain and use GPIOs are available by including the following file: 23 - Simple compile coverage with e.g. COMPILE_TEST - it does not matter that 27 - Truly optional GPIOLIB support - where the driver does not really make use 28 of the GPIOs on certain compile-time configurations for certain systems, but 29 will use it under other compile-time configurations. In this case the 33 All the functions that work with the descriptor-based GPIO interface are 40 Obtaining and Disposing GPIOs [all …]
|
| D | legacy.rst | 13 A "General Purpose Input/Output" (GPIO) is a flexible software-controlled 18 which GPIOs. Drivers can be written generically, so that board setup code 21 System-on-Chip (SOC) processors heavily rely on GPIOs. In some cases, every 22 non-dedicated pin can be configured as a GPIO; and most chips have at least 24 provide GPIOs; multifunction chips like power managers, and audio codecs 27 Most PC southbridges have a few dozen GPIO-capable pins (with only the BIOS 30 The exact capabilities of GPIOs vary between systems. Common options: 32 - Output values are writable (high=1, low=0). Some chips also have 34 value might be driven ... supporting "wire-OR" and similar schemes 37 - Input values are likewise readable (1, 0). Some chips support readback [all …]
|
| /kernel/linux/linux-4.19/include/linux/ |
| D | of_gpio.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 5 * Copyright (c) 2007-2008 MontaVista Software, Inc. 22 * This is Linux-specific flags. By default controllers' and Linux' mapping 24 * Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended. 49 extern int of_get_named_gpio_flags(struct device_node *np, 50 const char *list_name, int index, enum of_gpio_flags *flags); 52 extern int of_mm_gpiochip_add_data(struct device_node *np, 55 static inline int of_mm_gpiochip_add(struct device_node *np, in of_mm_gpiochip_add() 62 extern int of_gpio_simple_xlate(struct gpio_chip *gc, 69 static inline int of_get_named_gpio_flags(struct device_node *np, in of_get_named_gpio_flags() [all …]
|
| /kernel/linux/linux-4.19/drivers/regulator/ |
| D | gpio-regulator.c | 2 * gpio-regulator.c 13 * Roger Quadros <ext-roger.quadros@nokia.com> 21 * non-controllable regulators, as well as for allowing testing on 32 #include <linux/regulator/gpio-regulator.h> 42 struct gpio *gpios; member 43 int nr_gpios; 46 int nr_states; 48 int state; 51 static int gpio_regulator_get_value(struct regulator_dev *dev) in gpio_regulator_get_value() 54 int ptr; in gpio_regulator_get_value() [all …]
|
| /kernel/linux/linux-5.10/include/linux/ |
| D | of_gpio.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 5 * Copyright (c) 2007-2008 MontaVista Software, Inc. 21 * This is Linux-specific flags. By default controllers' and Linux' mapping 23 * Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended. 52 extern int of_get_named_gpio_flags(struct device_node *np, 53 const char *list_name, int index, enum of_gpio_flags *flags); 55 extern int of_mm_gpiochip_add_data(struct device_node *np, 58 static inline int of_mm_gpiochip_add(struct device_node *np, in of_mm_gpiochip_add() 70 static inline int of_get_named_gpio_flags(struct device_node *np, in of_get_named_gpio_flags() 71 const char *list_name, int index, enum of_gpio_flags *flags) in of_get_named_gpio_flags() [all …]
|
| /kernel/linux/linux-5.10/Documentation/driver-api/gpio/ |
| D | consumer.rst | 6 it describes the new descriptor-based interface. For a description of the 7 deprecated integer-based GPIO interface please refer to gpio-legacy.txt. 10 Guidelines for GPIOs consumers 15 obtain and use GPIOs are available by including the following file: 23 - Simple compile coverage with e.g. COMPILE_TEST - it does not matter that 27 - Truly optional GPIOLIB support - where the driver does not really make use 28 of the GPIOs on certain compile-time configurations for certain systems, but 29 will use it under other compile-time configurations. In this case the 33 All the functions that work with the descriptor-based GPIO interface are 40 Obtaining and Disposing GPIOs [all …]
|
| D | legacy.rst | 13 A "General Purpose Input/Output" (GPIO) is a flexible software-controlled 18 which GPIOs. Drivers can be written generically, so that board setup code 21 System-on-Chip (SOC) processors heavily rely on GPIOs. In some cases, every 22 non-dedicated pin can be configured as a GPIO; and most chips have at least 24 provide GPIOs; multifunction chips like power managers, and audio codecs 27 Most PC southbridges have a few dozen GPIO-capable pins (with only the BIOS 30 The exact capabilities of GPIOs vary between systems. Common options: 32 - Output values are writable (high=1, low=0). Some chips also have 34 value might be driven ... supporting "wire-OR" and similar schemes 37 - Input values are likewise readable (1, 0). Some chips support readback [all …]
|
| /kernel/linux/linux-5.10/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 …]
|
| /kernel/linux/linux-4.19/drivers/pinctrl/qcom/ |
| D | pinctrl-qdf2xxx.c | 14 * device. The driver which controls this device is pinctrl-msm.c. Each 16 * with pinctrl-msm.c. This means that all TLMM drivers are pin control 19 * This pin control driver is intended to be used only an ACPI-enabled 22 * a GPIO-only driver. The alternative is to duplicate the GPIO code of 23 * pinctrl-msm.c into another driver. 31 #include "pinctrl-msm.h" 39 static int qdf2xxx_pinctrl_probe(struct platform_device *pdev) in qdf2xxx_pinctrl_probe() 45 unsigned int i; in qdf2xxx_pinctrl_probe() 47 unsigned int avail_gpios; /* The number of GPIOs we support */ in qdf2xxx_pinctrl_probe() 48 u8 gpios[MAX_GPIOS]; /* An array of supported GPIOs */ in qdf2xxx_pinctrl_probe() local [all …]
|
| /kernel/linux/linux-5.10/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 16 #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 …]
|
| /kernel/linux/linux-5.10/drivers/net/mdio/ |
| D | mdio-mux-gpio.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #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 …]
|
| /kernel/linux/linux-4.19/Documentation/devicetree/bindings/sound/ |
| D | nvidia,tegra-audio-wm8903.txt | 4 - compatible : "nvidia,tegra-audio-wm8903" 5 - clocks : Must contain an entry for each entry in clock-names. 6 See ../clocks/clock-bindings.txt for details. 7 - clock-names : Must include the following entries: 8 - pll_a 9 - pll_a_out0 10 - mclk (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) 11 - nvidia,model : The user-visible name of this sound complex. 12 - nvidia,audio-routing : A list of the connections between audio components. 19 * Int Spk [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/sound/ |
| D | nvidia,tegra-audio-wm8903.txt | 4 - compatible : "nvidia,tegra-audio-wm8903" 5 - clocks : Must contain an entry for each entry in clock-names. 6 See ../clocks/clock-bindings.txt for details. 7 - clock-names : Must include the following entries: 8 - pll_a 9 - pll_a_out0 10 - mclk (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk) 11 - nvidia,model : The user-visible name of this sound complex. 12 - nvidia,audio-routing : A list of the connections between audio components. 19 * Int Spk [all …]
|