Searched refs:gpios (Results 1 - 25 of 74) sorted by relevance

123

/linux-master/drivers/tty/serial/
H A Dserial_mctrl_gpio.h38 void mctrl_gpio_set(struct mctrl_gpios *gpios, unsigned int mctrl);
44 unsigned int mctrl_gpio_get(struct mctrl_gpios *gpios, unsigned int *mctrl);
51 mctrl_gpio_get_outputs(struct mctrl_gpios *gpios, unsigned int *mctrl);
56 struct gpio_desc *mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios,
82 void mctrl_gpio_free(struct device *dev, struct mctrl_gpios *gpios);
87 void mctrl_gpio_enable_ms(struct mctrl_gpios *gpios);
92 void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios);
97 void mctrl_gpio_enable_irq_wake(struct mctrl_gpios *gpios);
102 void mctrl_gpio_disable_irq_wake(struct mctrl_gpios *gpios);
107 void mctrl_gpio_set(struct mctrl_gpios *gpios, unsigne argument
112 mctrl_gpio_get(struct mctrl_gpios *gpios, unsigned int *mctrl) argument
118 mctrl_gpio_get_outputs(struct mctrl_gpios *gpios, unsigned int *mctrl) argument
124 mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios, enum mctrl_gpio_idx gidx) argument
143 mctrl_gpio_free(struct device *dev, struct mctrl_gpios *gpios) argument
147 mctrl_gpio_enable_ms(struct mctrl_gpios *gpios) argument
151 mctrl_gpio_disable_ms(struct mctrl_gpios *gpios) argument
155 mctrl_gpio_enable_irq_wake(struct mctrl_gpios *gpios) argument
159 mctrl_gpio_disable_irq_wake(struct mctrl_gpios *gpios) argument
[all...]
H A Dserial_mctrl_gpio.c46 * 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) argument
59 if (gpios == NULL)
63 if (gpios->gpio[i] && mctrl_gpio_flags_is_dir_out(i)) {
64 desc_array[count] = gpios->gpio[i];
75 * @gpios: gpios t
79 mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios, enum mctrl_gpio_idx gidx) argument
97 mctrl_gpio_get(struct mctrl_gpios *gpios, unsigned int *mctrl) argument
118 mctrl_gpio_get_outputs(struct mctrl_gpios *gpios, unsigned int *mctrl) argument
140 struct mctrl_gpios *gpios; local
179 struct mctrl_gpios *gpios = context; local
226 struct mctrl_gpios *gpios; local
278 mctrl_gpio_free(struct device *dev, struct mctrl_gpios *gpios) argument
300 mctrl_gpio_enable_ms(struct mctrl_gpios *gpios) argument
329 mctrl_gpio_disable_ms(struct mctrl_gpios *gpios) argument
350 mctrl_gpio_enable_irq_wake(struct mctrl_gpios *gpios) argument
369 mctrl_gpio_disable_irq_wake(struct mctrl_gpios *gpios) argument
[all...]
/linux-master/sound/soc/
H A Dsoc-jack.c207 struct snd_soc_jack_gpio *gpios; member in struct:jack_gpio_tbl
280 struct snd_soc_jack_gpio *gpios)
285 gpiod_unexport(gpios[i].desc);
286 unregister_pm_notifier(&gpios[i].pm_notifier);
287 free_irq(gpiod_to_irq(gpios[i].desc), &gpios[i]); local
288 cancel_delayed_work_sync(&gpios[i].work);
289 gpiod_put(gpios[i].desc);
290 gpios[i].jack = NULL;
298 jack_free_gpios(tbl->jack, tbl->count, tbl->gpios);
279 jack_free_gpios(struct snd_soc_jack *jack, int count, struct snd_soc_jack_gpio *gpios) argument
311 snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, struct snd_soc_jack_gpio *gpios) argument
425 snd_soc_jack_add_gpiods(struct device *gpiod_dev, struct snd_soc_jack *jack, int count, struct snd_soc_jack_gpio *gpios) argument
447 snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count, struct snd_soc_jack_gpio *gpios) argument
[all...]
/linux-master/drivers/net/mdio/
H A Dmdio-mux-gpio.c18 struct gpio_descs *gpios; member in struct:mdio_mux_gpio_state
33 gpiod_set_array_value_cansleep(s->gpios->ndescs, s->gpios->desc,
34 s->gpios->info, values);
42 struct gpio_descs *gpios; local
45 gpios = devm_gpiod_get_array(&pdev->dev, NULL, GPIOD_OUT_LOW);
46 if (IS_ERR(gpios))
47 return PTR_ERR(gpios);
53 s->gpios = gpios;
[all...]
/linux-master/include/sound/
H A Dsoc-jack.h105 struct snd_soc_jack_gpio *gpios);
108 int count, struct snd_soc_jack_gpio *gpios);
110 struct snd_soc_jack_gpio *gpios);
113 struct snd_soc_jack_gpio *gpios)
121 struct snd_soc_jack_gpio *gpios)
127 struct snd_soc_jack_gpio *gpios)
112 snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, struct snd_soc_jack_gpio *gpios) argument
118 snd_soc_jack_add_gpiods(struct device *gpiod_dev, struct snd_soc_jack *jack, int count, struct snd_soc_jack_gpio *gpios) argument
126 snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count, struct snd_soc_jack_gpio *gpios) argument
/linux-master/drivers/platform/x86/siemens/
H A Dsimatic-ipc-batt.c39 struct gpio_desc *gpios[3]; member in struct:simatic_ipc_batt
47 if (priv.gpios[2]) {
48 gpiod_set_value(priv.gpios[2], 1);
52 if (gpiod_get_value_cansleep(priv.gpios[0]))
54 else if (gpiod_get_value_cansleep(priv.gpios[1]))
57 if (priv.gpios[2])
58 gpiod_set_value(priv.gpios[2], 0);
181 priv.gpios[0] = devm_gpiod_get_index(dev, "CMOSBattery empty", 0, GPIOD_IN);
182 if (IS_ERR(priv.gpios[0])) {
183 err = PTR_ERR(priv.gpios[
[all...]
/linux-master/drivers/staging/olpc_dcon/
H A Dolpc_dcon_xo_1.c37 static struct gpio_desc *gpios[5]; variable in typeref:struct:gpio_desc
46 gpios[i] = devm_gpiod_get(&dcon->client->dev, pin[i].name,
48 if (IS_ERR(gpios[i])) {
49 ret = PTR_ERR(gpios[i]);
75 gpiod_direction_input(gpios[OLPC_DCON_STAT0]);
76 gpiod_direction_input(gpios[OLPC_DCON_STAT1]);
77 gpiod_direction_input(gpios[OLPC_DCON_IRQ]);
78 gpiod_direction_input(gpios[OLPC_DCON_BLANK]);
79 gpiod_direction_output(gpios[OLPC_DCON_LOAD],
182 gpiod_set_value(gpios[OLPC_DCON_LOA
[all...]
H A Dolpc_dcon_xo_1_5.c68 static struct gpio_desc *gpios[3]; variable in typeref:struct:gpio_desc
99 gpios[i] = devm_gpiod_get(&dcon->client->dev, pin[i].name,
101 if (IS_ERR(gpios[i])) {
102 ret = PTR_ERR(gpios[i]);
182 gpiod_set_value(gpios[OLPC_DCON_LOAD], val);
191 *status = gpiod_get_value(gpios[OLPC_DCON_STAT0]);
192 *status |= gpiod_get_value(gpios[OLPC_DCON_STAT1]) << 1;
/linux-master/drivers/mux/
H A Dgpio.c20 struct gpio_descs *gpios; member in struct:mux_gpio
31 gpiod_set_array_value_cansleep(mux_gpio->gpios->ndescs,
32 mux_gpio->gpios->desc,
33 mux_gpio->gpios->info, values);
68 mux_gpio->gpios = devm_gpiod_get_array(dev, "mux", GPIOD_OUT_LOW);
69 if (IS_ERR(mux_gpio->gpios))
70 return dev_err_probe(dev, PTR_ERR(mux_gpio->gpios),
71 "failed to get gpios\n");
72 WARN_ON(pins != mux_gpio->gpios->ndescs);
/linux-master/drivers/watchdog/
H A Dmena21_wdt.c34 struct gpio_desc *gpios[NUM_GPIOS]; member in struct:a21_wdt_drv
46 reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST0]) ? (1 << 0) : 0;
47 reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST1]) ? (1 << 1) : 0;
48 reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST2]) ? (1 << 2) : 0;
57 gpiod_set_value(drv->gpios[GPIO_WD_ENAB], 1);
66 gpiod_set_value(drv->gpios[GPIO_WD_ENAB], 0);
75 gpiod_set_value(drv->gpios[GPIO_WD_TRIG], 0);
77 gpiod_set_value(drv->gpios[GPIO_WD_TRIG], 1);
99 gpiod_set_value(drv->gpios[GPIO_WD_FAST], 1);
101 gpiod_set_value(drv->gpios[GPIO_WD_FAS
[all...]
/linux-master/drivers/gpu/drm/panel/
H A Dpanel-ronbo-rb070d30.c37 } gpios; member in struct:rb070d30_panel
57 gpiod_set_value(ctx->gpios.power, 1);
59 gpiod_set_value(ctx->gpios.reset, 1);
68 gpiod_set_value(ctx->gpios.reset, 0);
69 gpiod_set_value(ctx->gpios.power, 0);
160 ctx->gpios.reset = devm_gpiod_get(&dsi->dev, "reset", GPIOD_OUT_LOW);
161 if (IS_ERR(ctx->gpios.reset)) {
163 return PTR_ERR(ctx->gpios.reset);
166 ctx->gpios.power = devm_gpiod_get(&dsi->dev, "power", GPIOD_OUT_LOW);
167 if (IS_ERR(ctx->gpios
[all...]
/linux-master/include/linux/regulator/
H A Dgpio-regulator.h29 * @gpios: bitfield of gpio target-states for the value
35 * from the gpios-array defined in gpio_regulator_config below.
39 int gpios; member in struct:gpio_regulator_state
/linux-master/drivers/hsi/clients/
H A Dnokia-modem.c32 struct nokia_modem_gpio *gpios; member in struct:nokia_modem_device
66 sysfs_remove_link(&dev->kobj, modem->gpios[i].name);
67 gpiod_unexport(modem->gpios[i].gpio);
79 dev_err(dev, "missing gpios: %d\n", gpio_count);
86 dev_err(dev, "number of gpios does not equal number of gpio names\n");
90 modem->gpios = devm_kcalloc(dev, gpio_count, sizeof(*modem->gpios),
92 if (!modem->gpios)
98 modem->gpios[i].gpio = devm_gpiod_get_index(dev, NULL, i,
100 if (IS_ERR(modem->gpios[
[all...]
/linux-master/drivers/input/misc/
H A Drotary_encoder.c46 struct gpio_descs *gpios; member in struct:rotary_encoder
61 for (i = 0; i < encoder->gpios->ndescs; ++i) {
62 int val = gpiod_get_value_cansleep(encoder->gpios->desc[i]);
238 encoder->gpios = devm_gpiod_get_array(dev, NULL, GPIOD_IN);
239 if (IS_ERR(encoder->gpios))
240 return dev_err_probe(dev, PTR_ERR(encoder->gpios), "unable to get gpios\n");
241 if (encoder->gpios->ndescs < 2) {
242 dev_err(dev, "not enough gpios found\n");
261 switch (steps_per_period >> (encoder->gpios
[all...]
H A Dgpio_decoder.c26 struct gpio_descs *gpios = decoder->input_gpios; local
30 for (i = 0; i < gpios->ndescs; i++) {
31 val = gpiod_get_value_cansleep(gpios->desc[i]);
35 desc_to_gpio(gpios->desc[i]), val);
76 dev_err(dev, "unable to acquire input gpios\n");
81 dev_err(dev, "not enough gpios found\n");
/linux-master/drivers/hwmon/
H A Dgpio-fan.c37 struct gpio_desc **gpios; member in struct:gpio_fan_data
109 gpiod_set_value_cansleep(fan_data->gpios[i],
121 value = gpiod_get_value_cansleep(fan_data->gpios[i]);
306 if (index > 0 && !data->gpios)
337 struct gpio_desc **gpios = fan_data->gpios; local
347 err = gpiod_direction_output(gpios[i],
348 gpiod_get_value_cansleep(gpios[i]));
414 struct gpio_desc **gpios; local
433 gpios
[all...]
H A Dltc4245.c66 int gpios[3]; member in struct:ltc4245_data
85 data->gpios[0] = data->vregs[LTC4245_GPIOADC - 0x10];
94 for (i = 0; i < ARRAY_SIZE(data->gpios); i++)
95 data->gpios[i] = -EAGAIN;
110 data->gpios[gpio_curr] = data->vregs[LTC4245_GPIOADC - 0x10];
113 gpio_next = (gpio_curr + 1) % ARRAY_SIZE(data->gpios);
295 int regval = data->gpios[channel - 8];
437 if (of_property_read_bool(np, "ltc4245,use-extra-gpios"))
/linux-master/drivers/gpio/
H A Dgpio-adp5520.c93 int ret, i, gpios; local
112 for (gpios = 0, i = 0; i < ADP5520_MAXGPIOS; i++)
114 dev->lut[gpios++] = 1 << i;
116 if (gpios < 1)
127 gc->ngpio = gpios;
H A Dgpiolib-of.c50 * Number of gpios defined in property,
51 * -EINVAL for an incorrectly formed gpios property, or
52 * -ENOENT for a missing gpios property
55 * gpios = <0
76 * established "cs-gpios" for chip selects but instead rely on
77 * "gpios" for the chip select lines. If we detect this, we redirect
78 * the counting of "cs-gpios" to count "gpios" transparent to the
92 return of_gpio_named_count(np, "gpios");
187 } gpios[] local
228 } gpios[] = { local
483 } gpios[] = { local
[all...]
H A Dgpio-winbond.c132 unsigned long gpios; member in struct:winbond_gpio_params
357 for_each_set_bit(i, &params.gpios, BITS_PER_LONG) {
575 for_each_set_bit(i, &params.gpios, BITS_PER_LONG)
577 __clear_bit(i, &params.gpios);
579 if (!params.gpios) {
580 pr_err("please use 'gpios' module parameter to select some active GPIO ports to enable\n");
617 gpios_rem = params.gpios & ~GENMASK(ARRAY_SIZE(winbond_gpio_infos) - 1,
622 params.gpios &= ~gpios_rem;
667 * Add 8 gpios for every GPIO port that was enabled in gpios
[all...]
/linux-master/arch/arm/mach-pxa/
H A Dam300epd.c94 static int gpios[] = { PWR_GPIO_PIN, CFG_GPIO_PIN, RDY_GPIO_PIN, DC_GPIO_PIN, variable
113 for (i = 0; i < ARRAY_SIZE(gpios); i++) {
114 err = gpio_request(gpios[i], gpio_names[i]);
163 i = ARRAY_SIZE(gpios);
166 gpio_free(gpios[i]);
182 for (i = 0; i < ARRAY_SIZE(gpios); i++)
183 gpio_free(gpios[i]);
H A Dam200epd.c101 static int gpios[] = { LED_GPIO_PIN , STDBY_GPIO_PIN , RST_GPIO_PIN, variable
110 for (i = 0; i < ARRAY_SIZE(gpios); i++) {
111 err = gpio_request(gpios[i], gpio_names[i]);
132 gpio_free(gpios[i]);
143 for (i = 0; i < ARRAY_SIZE(gpios); i++)
144 gpio_free(gpios[i]);
/linux-master/drivers/iio/amplifiers/
H A Dhmc425a.c63 struct gpio_descs *gpios; member in struct:hmc425a_state
164 gpiod_set_array_value_cansleep(st->gpios->ndescs, st->gpios->desc,
371 st->gpios = devm_gpiod_get_array(&pdev->dev, "ctrl", GPIOD_OUT_LOW);
372 if (IS_ERR(st->gpios))
373 return dev_err_probe(&pdev->dev, PTR_ERR(st->gpios),
374 "failed to get gpios\n");
376 if (st->gpios->ndescs != st->chip_info->num_gpios) {
/linux-master/drivers/i2c/muxes/
H A Di2c-mux-gpio.c22 struct gpio_desc **gpios; member in struct:gpiomux
31 gpiod_set_array_value_cansleep(mux->ngpios, mux->gpios, NULL, values);
146 dev_err(&pdev->dev, "no valid gpios provided\n");
156 array_size(ngpios, sizeof(*mux->gpios)), 0,
162 mux->gpios = muxc->priv;
194 mux->gpios[i] = gpiod;
/linux-master/drivers/bus/
H A Dts-nbus.c40 * request all gpios required by the bus.
80 * the data gpios are used for reading and writing values, their directions
124 * read a byte value from the data gpios.
129 struct gpio_descs *gpios = ts_nbus->data; local
134 ret = gpiod_get_value_cansleep(gpios->desc[i]);
145 * set the data gpios accordingly to the byte value.
149 struct gpio_descs *gpios = ts_nbus->data; local
154 gpiod_set_array_value_cansleep(8, gpios->desc, gpios->info, values);
159 * send the data in the data gpios an
[all...]

Completed in 256 milliseconds

123