Home
last modified time | relevance | path

Searched refs:gpios (Results 1 – 25 of 40) sorted by relevance

12

/drivers/mmc/host/
Dof_mmc_spi.c42 int gpios[NUM_GPIOS]; member
57 bool value = gpio_get_value(oms->gpios[gpio_num]); in of_mmc_spi_read_gpio()
126 for (i = 0; i < ARRAY_SIZE(oms->gpios); i++) { in mmc_spi_get_pdata()
129 oms->gpios[i] = of_get_gpio_flags(np, i, &gpio_flags); in mmc_spi_get_pdata()
130 if (!gpio_is_valid(oms->gpios[i])) in mmc_spi_get_pdata()
133 ret = gpio_request(oms->gpios[i], dev_name(dev)); in mmc_spi_get_pdata()
135 oms->gpios[i] = -EINVAL; in mmc_spi_get_pdata()
143 if (gpio_is_valid(oms->gpios[CD_GPIO])) in mmc_spi_get_pdata()
145 if (gpio_is_valid(oms->gpios[WP_GPIO])) in mmc_spi_get_pdata()
174 for (i = 0; i < ARRAY_SIZE(oms->gpios); i++) { in mmc_spi_put_pdata()
[all …]
/drivers/regulator/
Dgpio-regulator.c42 struct gpio *gpios; member
57 if (data->states[ptr].gpios == data->state) in gpio_regulator_get_value()
74 target = data->states[ptr].gpios; in gpio_regulator_set_voltage()
85 gpio_set_value_cansleep(data->gpios[ptr].gpio, state); in gpio_regulator_set_voltage()
113 target = data->states[ptr].gpios; in gpio_regulator_set_current_limit()
122 gpio_set_value_cansleep(data->gpios[ptr].gpio, state); in gpio_regulator_set_current_limit()
168 config->gpios = devm_kzalloc(dev, in of_get_gpio_regulator_config()
171 if (!config->gpios) in of_get_gpio_regulator_config()
178 config->gpios[i].gpio = gpio; in of_get_gpio_regulator_config()
200 config->states[i].gpios = in of_get_gpio_regulator_config()
[all …]
/drivers/i2c/muxes/
Di2c-mux-gpio.c34 gpio_set_value(mux->gpio_base + mux->data.gpios[i], in i2c_mux_gpio_set()
69 unsigned *values, *gpios; in i2c_mux_gpio_probe_dt() local
113 gpios = devm_kzalloc(&pdev->dev, in i2c_mux_gpio_probe_dt()
114 sizeof(*mux->data.gpios) * mux->data.n_gpios, GFP_KERNEL); in i2c_mux_gpio_probe_dt()
115 if (!gpios) { in i2c_mux_gpio_probe_dt()
121 gpios[i] = of_get_named_gpio(np, "mux-gpios", i); in i2c_mux_gpio_probe_dt()
123 mux->data.gpios = gpios; in i2c_mux_gpio_probe_dt()
203 ret = gpio_request(gpio_base + mux->data.gpios[i], "i2c-mux-gpio"); in i2c_mux_gpio_probe()
206 mux->data.gpios[i]); in i2c_mux_gpio_probe()
210 ret = gpio_direction_output(gpio_base + mux->data.gpios[i], in i2c_mux_gpio_probe()
[all …]
/drivers/pcmcia/
Dpxa2xx_hx4700.c20 static struct gpio gpios[] = { variable
29 ret = gpio_request_array(gpios, ARRAY_SIZE(gpios)); in hx4700_pcmcia_hw_init()
53 gpio_free_array(gpios, ARRAY_SIZE(gpios)); in hx4700_pcmcia_hw_shutdown()
/drivers/iio/adc/
Dad7266.c38 struct gpio gpios[3]; member
129 gpio_set_value(st->gpios[i].gpio, (bool)(nr & BIT(i))); in ad7266_select_input()
430 for (i = 0; i < ARRAY_SIZE(st->gpios); ++i) { in ad7266_probe()
431 st->gpios[i].gpio = pdata->addr_gpios[i]; in ad7266_probe()
432 st->gpios[i].flags = GPIOF_OUT_INIT_LOW; in ad7266_probe()
433 st->gpios[i].label = ad7266_gpio_labels[i]; in ad7266_probe()
435 ret = gpio_request_array(st->gpios, in ad7266_probe()
436 ARRAY_SIZE(st->gpios)); in ad7266_probe()
488 gpio_free_array(st->gpios, ARRAY_SIZE(st->gpios)); in ad7266_probe()
509 gpio_free_array(st->gpios, ARRAY_SIZE(st->gpios)); in ad7266_remove()
/drivers/mtd/maps/
Dgpio-addr-flash.c196 struct resource *gpios; in gpio_flash_probe() local
201 gpios = platform_get_resource(pdev, IORESOURCE_IRQ, 0); in gpio_flash_probe()
203 if (!memory || !gpios || !gpios->end) in gpio_flash_probe()
206 arr_size = sizeof(int) * gpios->end; in gpio_flash_probe()
215 state->gpio_count = gpios->end; in gpio_flash_probe()
216 state->gpio_addrs = (void *)(unsigned long)gpios->start; in gpio_flash_probe()
/drivers/spi/
Dspi-ppc4xx.c132 int *gpios; member
288 if (!hw->master->num_chipselect || hw->gpios[cs] == -EEXIST) in spi_ppc4xx_chipsel()
295 gpio_set_value(hw->gpios[cs], cspol); in spi_ppc4xx_chipsel()
381 if (gpio_is_valid(hw->gpios[i])) in free_gpios()
382 gpio_free(hw->gpios[i]); in free_gpios()
384 kfree(hw->gpios); in free_gpios()
385 hw->gpios = NULL; in free_gpios()
425 hw->gpios = kzalloc(sizeof(int) * num_gpios, GFP_KERNEL); in spi_ppc4xx_of_probe()
426 if (!hw->gpios) { in spi_ppc4xx_of_probe()
436 hw->gpios[i] = gpio; in spi_ppc4xx_of_probe()
Dspi-fsl-spi.c705 int gpio = pinfo->gpios[cs]; in fsl_spi_cs_control()
730 pinfo->gpios = kmalloc(ngpios * sizeof(*pinfo->gpios), GFP_KERNEL); in of_fsl_spi_get_chipselects()
731 if (!pinfo->gpios) in of_fsl_spi_get_chipselects()
733 memset(pinfo->gpios, -1, ngpios * sizeof(*pinfo->gpios)); in of_fsl_spi_get_chipselects()
759 pinfo->gpios[i] = gpio; in of_fsl_spi_get_chipselects()
762 ret = gpio_direction_output(pinfo->gpios[i], in of_fsl_spi_get_chipselects()
778 if (gpio_is_valid(pinfo->gpios[i])) in of_fsl_spi_get_chipselects()
779 gpio_free(pinfo->gpios[i]); in of_fsl_spi_get_chipselects()
786 kfree(pinfo->gpios); in of_fsl_spi_get_chipselects()
787 pinfo->gpios = NULL; in of_fsl_spi_get_chipselects()
[all …]
/drivers/gpio/
Dgpio-adp5520.c95 int ret, i, gpios; in adp5520_gpio_probe() local
116 for (gpios = 0, i = 0; i < ADP5520_MAXGPIOS; i++) in adp5520_gpio_probe()
118 dev->lut[gpios++] = 1 << i; in adp5520_gpio_probe()
120 if (gpios < 1) { in adp5520_gpio_probe()
133 gc->ngpio = gpios; in adp5520_gpio_probe()
/drivers/input/misc/
Dgpio_tilt_polled.c54 state |= (!!gpio_get_value(pdata->gpios[i].gpio) << i); in gpio_tilt_polled_poll()
58 if (pdata->states[i].gpios == state) in gpio_tilt_polled_poll()
117 error = gpio_request_array(pdata->gpios, pdata->nr_gpios); in gpio_tilt_polled_probe()
175 gpio_free_array(pdata->gpios, pdata->nr_gpios); in gpio_tilt_polled_probe()
192 gpio_free_array(pdata->gpios, pdata->nr_gpios); in gpio_tilt_polled_remove()
/drivers/hwmon/
Dltc4245.c68 int gpios[3]; member
87 data->gpios[0] = data->vregs[LTC4245_GPIOADC - 0x10]; in ltc4245_update_gpios()
97 for (i = 0; i < ARRAY_SIZE(data->gpios); i++) in ltc4245_update_gpios()
98 data->gpios[i] = -EAGAIN; in ltc4245_update_gpios()
113 data->gpios[gpio_curr] = data->vregs[LTC4245_GPIOADC - 0x10]; in ltc4245_update_gpios()
116 gpio_next = (gpio_curr + 1) % ARRAY_SIZE(data->gpios); in ltc4245_update_gpios()
312 int val = data->gpios[attr->index]; in ltc4245_show_gpio()
/drivers/input/keyboard/
Dmatrix_keypad.c405 unsigned int *gpios; in matrix_keypad_parse_dt() local
437 gpios = devm_kzalloc(dev, in matrix_keypad_parse_dt()
441 if (!gpios) { in matrix_keypad_parse_dt()
447 gpios[i] = of_get_named_gpio(np, "row-gpios", i); in matrix_keypad_parse_dt()
450 gpios[pdata->num_row_gpios + i] = in matrix_keypad_parse_dt()
453 pdata->row_gpios = gpios; in matrix_keypad_parse_dt()
454 pdata->col_gpios = &gpios[pdata->num_row_gpios]; in matrix_keypad_parse_dt()
/drivers/tty/serial/cpm_uart/
Dcpm_uart_core.c105 if (pinfo->gpios[GPIO_RTS] >= 0) in cpm_uart_set_mctrl()
106 gpio_set_value(pinfo->gpios[GPIO_RTS], !(mctrl & TIOCM_RTS)); in cpm_uart_set_mctrl()
108 if (pinfo->gpios[GPIO_DTR] >= 0) in cpm_uart_set_mctrl()
109 gpio_set_value(pinfo->gpios[GPIO_DTR], !(mctrl & TIOCM_DTR)); in cpm_uart_set_mctrl()
117 if (pinfo->gpios[GPIO_CTS] >= 0) { in cpm_uart_get_mctrl()
118 if (gpio_get_value(pinfo->gpios[GPIO_CTS])) in cpm_uart_get_mctrl()
122 if (pinfo->gpios[GPIO_DSR] >= 0) { in cpm_uart_get_mctrl()
123 if (gpio_get_value(pinfo->gpios[GPIO_DSR])) in cpm_uart_get_mctrl()
127 if (pinfo->gpios[GPIO_DCD] >= 0) { in cpm_uart_get_mctrl()
128 if (gpio_get_value(pinfo->gpios[GPIO_DCD])) in cpm_uart_get_mctrl()
[all …]
/drivers/usb/host/
Dfhci-hcd.c155 if (!gpio_get_value(fhci->gpios[GPIO_USBOE])) in fhci_ioports_check_bus_state()
159 if (gpio_get_value(fhci->gpios[GPIO_USBRP])) in fhci_ioports_check_bus_state()
163 if (gpio_get_value(fhci->gpios[GPIO_USBRN])) in fhci_ioports_check_bus_state()
641 fhci->gpios[i] = gpio; in of_fhci_probe()
772 if (gpio_is_valid(fhci->gpios[i])) in of_fhci_probe()
773 gpio_free(fhci->gpios[i]); in of_fhci_probe()
795 if (!gpio_is_valid(fhci->gpios[i])) in fhci_remove()
797 gpio_free(fhci->gpios[i]); in fhci_remove()
Dfhci-hub.c45 int gpio = fhci->gpios[gpio_nr]; in fhci_gpio_set_value()
136 gpio_direction_output(fhci->gpios[GPIO_USBOE], 0); in fhci_io_port_generate_reset()
137 gpio_direction_output(fhci->gpios[GPIO_USBTP], 0); in fhci_io_port_generate_reset()
138 gpio_direction_output(fhci->gpios[GPIO_USBTN], 0); in fhci_io_port_generate_reset()
/drivers/video/omap2/displays/
Dpanel-lgphilips-lb035q02.c75 gpio_set_value_cansleep(panel_data->gpios[i], in lb035q02_panel_power_on()
94 gpio_set_value_cansleep(panel_data->gpios[i], in lb035q02_panel_power_off()
117 r = devm_gpio_request_one(&dssdev->dev, panel_data->gpios[i], in lb035q02_panel_probe()
Dpanel-generic-dpi.c557 gpio_set_value_cansleep(panel_data->gpios[i], in generic_dpi_panel_power_on()
578 gpio_set_value_cansleep(panel_data->gpios[i], in generic_dpi_panel_power_off()
612 r = devm_gpio_request_one(&dssdev->dev, panel_data->gpios[i], in generic_dpi_panel_probe()
/drivers/pinctrl/sh-pfc/
Dgpio.c210 unsigned short *gpios = pfc->info->gpio_irq[i].gpios; in gpio_pin_to_irq() local
212 for (k = 0; gpios[k]; k++) { in gpio_pin_to_irq()
213 if (gpios[k] == offset) in gpio_pin_to_irq()
Dsh_pfc.h117 unsigned short *gpios; member
121 { .irq = irq_nr, .gpios = (unsigned short []) { ids, 0 } } \
/drivers/leds/
Dleds-tca6507.c620 int gpios = 0; in tca6507_probe_gpios() local
625 tca->gpio_name[gpios] = pdata->leds.leds[i].name; in tca6507_probe_gpios()
626 tca->gpio_map[gpios] = i; in tca6507_probe_gpios()
627 gpios++; in tca6507_probe_gpios()
630 if (!gpios) in tca6507_probe_gpios()
635 tca->gpio.ngpio = gpios; in tca6507_probe_gpios()
Dleds-pca9532.c339 int gpios = 0; in pca9532_configure() local
361 gpios++; in pca9532_configure()
412 if (gpios) { in pca9532_configure()
/drivers/media/i2c/
Dov9650.c251 int gpios[NUM_GPIOS]; member
522 ov965x_gpio_set(ov965x->gpios[GPIO_PWDN], 0); in __ov965x_set_power()
523 ov965x_gpio_set(ov965x->gpios[GPIO_RST], 0); in __ov965x_set_power()
526 ov965x_gpio_set(ov965x->gpios[GPIO_RST], 1); in __ov965x_set_power()
527 ov965x_gpio_set(ov965x->gpios[GPIO_PWDN], 1); in __ov965x_set_power()
1409 ov965x->gpios[GPIO_PWDN] = pdata->gpio_pwdn; in ov965x_configure_gpios()
1410 ov965x->gpios[GPIO_RST] = pdata->gpio_reset; in ov965x_configure_gpios()
1412 for (i = 0; i < ARRAY_SIZE(ov965x->gpios); i++) { in ov965x_configure_gpios()
1413 int gpio = ov965x->gpios[i]; in ov965x_configure_gpios()
1425 ov965x->gpios[i] = gpio; in ov965x_configure_gpios()
/drivers/staging/android/
Dtimed_gpio.h30 struct timed_gpio *gpios; member
/drivers/i2c/busses/
Di2c-i801.c185 unsigned gpios[2]; /* Relative to gpio_chip->base */ member
952 .gpios = { 52, 53 },
961 .gpios = { 52, 53 },
1051 gpio_data.gpios = mux_config->gpios; in i801_add_mux()
Di2c-s3c2410.c124 int gpios[2]; member
919 i2c->gpios[idx] = gpio; in s3c24xx_i2c_parse_dt_gpio()
931 gpio_free(i2c->gpios[idx]); in s3c24xx_i2c_parse_dt_gpio()
943 gpio_free(i2c->gpios[idx]); in s3c24xx_i2c_dt_gpio_free()

12