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

123

/linux-master/arch/arm/mach-pxa/
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]);
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]);
/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/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/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...]
/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 Dgpio-pca953x.c135 { "irq-gpios", &pca953x_irq_gpios, 1, ACPI_GPIO_QUIRK_ABSOLUTE_NUMBER },
147 ret = acpi_dev_gpio_irq_get_by(ACPI_COMPANION(dev), "irq-gpios", 0);
689 static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios) argument
704 gc->ngpio = gpios;
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...]
H A Dgpiolib-acpi.c584 const struct acpi_gpio_mapping *gpios)
586 if (adev && gpios) {
587 adev->driver_gpios = gpios;
607 const struct acpi_gpio_mapping *gpios)
612 ret = acpi_dev_add_driver_gpios(adev, gpios);
1247 u32 gpios[2]; local
1254 ret = fwnode_property_read_u32_array(fwnode, "gpios", gpios,
1255 ARRAY_SIZE(gpios));
1259 desc = gpiochip_get_desc(chip, gpios[
583 acpi_dev_add_driver_gpios(struct acpi_device *adev, const struct acpi_gpio_mapping *gpios) argument
606 devm_acpi_dev_add_driver_gpios(struct device *dev, const struct acpi_gpio_mapping *gpios) argument
[all...]
H A Dgpiolib-devres.c41 struct gpio_descs **this = res, **gpios = data; local
43 return *this == *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...]
/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/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/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/i2c/busses/
H A Di2c-i801.c267 unsigned gpios[2]; /* Relative to gpio_chip->base */ member in struct:i801_mux_config
1317 .gpios = { 52, 53 },
1326 .gpios = { 52, 53 },
1430 mux_config->gpios[i], "mux", 0);
H A Di2c-s3c2410.c117 struct gpio_desc *gpios[2]; member in struct:s3c24xx_i2c
911 i2c->gpios[i] = devm_gpiod_get_index(i2c->dev, NULL,
913 if (IS_ERR(i2c->gpios[i])) {
/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/iio/adc/
H A Dad7266.c37 struct gpio_desc *gpios[3]; member in struct:ad7266_state
118 gpiod_set_value(st->gpios[i], (bool)(nr & BIT(i)));
429 for (i = 0; i < ARRAY_SIZE(st->gpios); ++i) {
430 st->gpios[i] = devm_gpiod_get(&spi->dev,
433 if (IS_ERR(st->gpios[i])) {
434 ret = PTR_ERR(st->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/iio/resolver/
H A Dad2s1210.c177 struct gpio_descs *gpios = st->mode_gpios; local
180 if (!gpios)
185 return gpiod_set_array_value(gpios->ndescs, gpios->desc, gpios->info,
1448 "must specify either adi,fixed-mode or mode-gpios\n");
1452 "must specify only one of adi,fixed-mode or mode-gpios\n");
1456 "requires exactly 2 mode-gpios\n");
1459 * If resolution gpios are provided, they get set to the required
1472 "requires exactly 2 resolution-gpios\
[all...]
/linux-master/drivers/input/keyboard/
H A Dmatrix_keypad.c362 unsigned int *gpios; local
397 gpios = devm_kcalloc(dev,
401 if (!gpios) {
402 dev_err(dev, "could not allocate memory for gpios\n");
407 ret = of_get_named_gpio(np, "row-gpios", i);
410 gpios[i] = ret;
414 ret = of_get_named_gpio(np, "col-gpios", i);
417 gpios[nrow + i] = ret;
420 pdata->row_gpios = gpios;
421 pdata->col_gpios = &gpios[pdat
[all...]
/linux-master/drivers/input/misc/
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");
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...]

Completed in 405 milliseconds

123