Home
last modified time | relevance | path

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

12345678910>>...33

/linux-5.10/drivers/tty/serial/
Dserial_mctrl_gpio.c1 // 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 …]
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.
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-5.10/sound/soc/
Dsoc-jack.c1 // 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 …]
/linux-5.10/drivers/watchdog/
Dmena21_wdt.c1 // 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-5.10/sound/soc/codecs/
Dwm1250-ev1.c1 // 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 …]
/linux-5.10/include/linux/
Dof_gpio.h1 /* 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 …]
/linux-5.10/Documentation/driver-api/gpio/
Dconsumer.rst6 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 …]
Dlegacy.rst13 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 …]
/linux-5.10/drivers/pinctrl/qcom/
Dpinctrl-qdf2xxx.c1 // 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-5.10/drivers/gpu/drm/panel/
Dpanel-ronbo-rb070d30.c1 // 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 …]
/linux-5.10/drivers/net/mdio/
Dmdio-mux-gpio.c1 // 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 …]
/linux-5.10/Documentation/devicetree/bindings/sound/
Dnvidia,tegra-audio-wm8903.txt4 - 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 …]
/linux-5.10/drivers/hwmon/
Dgpio-fan.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * gpio-fan.c - Hwmon driver for fans connected to GPIO lines.
25 int rpm;
26 int ctrl_val;
34 struct mutex lock; /* lock GPIOs operations. */
35 int num_gpios;
36 struct gpio_desc **gpios; member
37 int num_speed;
39 int speed_index;
41 int resume_speed;
[all …]
/linux-5.10/drivers/hsi/clients/
Dnokia-modem.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * nokia-modem.c
19 static unsigned int pm = 1;
20 module_param(pm, int, 0400);
31 int nokia_modem_rst_ind_irq;
33 struct nokia_modem_gpio *gpios; member
34 int gpio_amount;
46 dev_info(modem->device, "CMT rst line change detected\n"); in do_nokia_modem_rst_ind_tasklet()
48 if (modem->ssi_protocol) in do_nokia_modem_rst_ind_tasklet()
49 ssip_reset_event(modem->ssi_protocol); in do_nokia_modem_rst_ind_tasklet()
[all …]
/linux-5.10/drivers/input/misc/
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"
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 …]
Dgpio_decoder.c2 * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/
32 static int gpio_decoder_get_gpios_state(struct gpio_decoder *decoder) in gpio_decoder_get_gpios_state()
34 struct gpio_descs *gpios = decoder->input_gpios; in gpio_decoder_get_gpios_state() local
35 unsigned int ret = 0; in gpio_decoder_get_gpios_state()
36 int i, val; in gpio_decoder_get_gpios_state()
38 for (i = 0; i < gpios->ndescs; i++) { in gpio_decoder_get_gpios_state()
39 val = gpiod_get_value_cansleep(gpios->desc[i]); in gpio_decoder_get_gpios_state()
41 dev_err(decoder->dev, in gpio_decoder_get_gpios_state()
43 desc_to_gpio(gpios->desc[i]), val); in gpio_decoder_get_gpios_state()
57 int state; in gpio_decoder_poll_gpios()
[all …]
/linux-5.10/drivers/mux/
Dgpio.c1 // SPDX-License-Identifier: GPL-2.0
3 * GPIO-controlled multiplexer driver
19 struct gpio_descs *gpios; member
22 static int mux_gpio_set(struct mux_control *mux, int state) in mux_gpio_set()
24 struct mux_gpio *mux_gpio = mux_chip_priv(mux->chip); in mux_gpio_set()
29 gpiod_set_array_value_cansleep(mux_gpio->gpios->ndescs, in mux_gpio_set()
30 mux_gpio->gpios->desc, in mux_gpio_set()
31 mux_gpio->gpios->info, values); in mux_gpio_set()
41 { .compatible = "gpio-mux", },
46 static int mux_gpio_probe(struct platform_device *pdev) in mux_gpio_probe()
[all …]
/linux-5.10/drivers/bus/
Dts-nbus.c2 * NBUS driver for TS-4600 based boards
4 * Copyright (c) 2016 - Savoir-faire Linux
11 * This driver implements a GPIOs bit-banged bus, called the NBUS by Technologic
13 * TS-4600 SoM.
24 #include <linux/ts-nbus.h>
43 * request all gpios required by the bus.
45 static int ts_nbus_init_pdata(struct platform_device *pdev, struct ts_nbus in ts_nbus_init_pdata()
48 ts_nbus->data = devm_gpiod_get_array(&pdev->dev, "ts,data", in ts_nbus_init_pdata()
50 if (IS_ERR(ts_nbus->data)) { in ts_nbus_init_pdata()
51 dev_err(&pdev->dev, "failed to retrieve ts,data-gpio from dts\n"); in ts_nbus_init_pdata()
[all …]
/linux-5.10/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
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 …]
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
76 static int dcon_was_irq(void) in dcon_was_irq()
86 static int dcon_init_xo_1_5(struct dcon_priv *dcon) in dcon_init_xo_1_5()
88 unsigned int irq; in dcon_init_xo_1_5()
90 int i; in dcon_init_xo_1_5()
91 int ret; in dcon_init_xo_1_5()
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()
[all …]
/linux-5.10/drivers/iio/amplifiers/
Dhmc425a.c1 // SPDX-License-Identifier: GPL-2.0
29 unsigned int num_channels;
30 unsigned int num_gpios;
31 int gain_min;
32 int gain_max;
33 int default_gain;
40 struct gpio_descs *gpios; member
45 static int hmc425a_write(struct iio_dev *indio_dev, u32 value) in hmc425a_write()
52 gpiod_set_array_value_cansleep(st->gpios->ndescs, st->gpios->desc, in hmc425a_write()
57 static int hmc425a_read_raw(struct iio_dev *indio_dev, in hmc425a_read_raw()
[all …]
/linux-5.10/drivers/staging/iio/resolver/
Dad2s1210.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (c) 2010-2010 Analog Devices Inc.
78 static const struct ad2s1210_gpio gpios[] = { variable
86 static const unsigned int ad2s1210_resolution_value[] = { 10, 12, 14, 16 };
91 struct gpio_desc *gpios[5]; member
92 unsigned int fclkin;
93 unsigned int fexcit;
101 static const int ad2s1210_mode_vals[4][2] = {
110 gpiod_set_value(st->gpios[AD2S1210_A0], ad2s1210_mode_vals[mode][0]); in ad2s1210_set_mode()
111 gpiod_set_value(st->gpios[AD2S1210_A1], ad2s1210_mode_vals[mode][1]); in ad2s1210_set_mode()
[all …]
/linux-5.10/drivers/gpio/
Dgpiolib-legacy.c1 // SPDX-License-Identifier: GPL-2.0
16 * gpio_request_one - request a single GPIO with initial configuration
21 int gpio_request_one(unsigned gpio, unsigned long flags, const char *label) in gpio_request_one()
24 int err; in gpio_request_one()
28 /* Compatibility: assume unavailable "valid" GPIOs will appear later */ in gpio_request_one()
30 return -EPROBE_DEFER; in gpio_request_one()
37 set_bit(FLAG_OPEN_DRAIN, &desc->flags); in gpio_request_one()
40 set_bit(FLAG_OPEN_SOURCE, &desc->flags); in gpio_request_one()
43 set_bit(FLAG_ACTIVE_LOW, &desc->flags); in gpio_request_one()
68 int gpio_request(unsigned gpio, const char *label) in gpio_request()
[all …]
Dgpiolib-of.c1 // SPDX-License-Identifier: GPL-2.0+
5 * Copyright (c) 2007-2008 MontaVista Software, Inc.
24 #include "gpiolib-of.h"
27 * of_gpio_spi_cs_get_count() - special GPIO counting for SPI
33 * established "cs-gpios" for chip selects but instead rely on
34 * "gpios" for the chip select lines. If we detect this, we redirect
35 * the counting of "cs-gpios" to count "gpios" transparent to the
38 static int of_gpio_spi_cs_get_count(struct device *dev, const char *con_id) in of_gpio_spi_cs_get_count()
40 struct device_node *np = dev->of_node; in of_gpio_spi_cs_get_count()
48 !of_device_is_compatible(np, "ibm,ppc4xx-spi")) in of_gpio_spi_cs_get_count()
[all …]
/linux-5.10/drivers/regulator/
Drt4801-regulator.c1 // SPDX-License-Identifier: GPL-2.0+
20 #define N_VOLTAGES ((MAX_UV - MIN_UV) / STEP_UV + 1)
33 unsigned int enable_flag;
34 unsigned int volt_sel[DSV_OUT_MAX];
37 static int rt4801_set_voltage_sel(struct regulator_dev *rdev, unsigned int selector) in rt4801_set_voltage_sel()
40 int id = rdev_get_id(rdev), ret; in rt4801_set_voltage_sel()
42 if (priv->enable_flag & BIT(id)) { in rt4801_set_voltage_sel()
48 priv->volt_sel[id] = selector; in rt4801_set_voltage_sel()
52 static int rt4801_get_voltage_sel(struct regulator_dev *rdev) in rt4801_get_voltage_sel()
55 int id = rdev_get_id(rdev); in rt4801_get_voltage_sel()
[all …]

12345678910>>...33