Home
last modified time | relevance | path

Searched refs:gpios (Results 1 – 25 of 28) 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.c45 struct gpio *gpios; member
98 if (data->states[ptr].gpios == data->state) in gpio_regulator_get_value()
114 target = data->states[ptr].gpios; in gpio_regulator_set_value()
121 gpio_set_value(data->gpios[ptr].gpio, state); in gpio_regulator_set_value()
190 drvdata->gpios = kmemdup(config->gpios, in gpio_regulator_probe()
193 if (drvdata->gpios == NULL) { in gpio_regulator_probe()
271 ret = gpio_request_array(drvdata->gpios, drvdata->nr_gpios); in gpio_regulator_probe()
281 if (config->gpios[ptr].flags & GPIOF_OUT_INIT_HIGH) in gpio_regulator_probe()
299 gpio_free_array(drvdata->gpios, drvdata->nr_gpios); in gpio_regulator_probe()
306 kfree(drvdata->gpios); in gpio_regulator_probe()
[all …]
/drivers/mtd/maps/
Dgpio-addr-flash.c193 struct resource *gpios; in gpio_flash_probe() local
198 gpios = platform_get_resource(pdev, IORESOURCE_IRQ, 0); in gpio_flash_probe()
200 if (!memory || !gpios || !gpios->end) in gpio_flash_probe()
203 arr_size = sizeof(int) * gpios->end; in gpio_flash_probe()
212 state->gpio_count = gpios->end; in gpio_flash_probe()
213 state->gpio_addrs = (void *)(unsigned long)gpios->start; in gpio_flash_probe()
/drivers/spi/
Dspi-ppc4xx.c133 int *gpios; member
289 if (!hw->master->num_chipselect || hw->gpios[cs] == -EEXIST) in spi_ppc4xx_chipsel()
296 gpio_set_value(hw->gpios[cs], cspol); in spi_ppc4xx_chipsel()
382 if (gpio_is_valid(hw->gpios[i])) in free_gpios()
383 gpio_free(hw->gpios[i]); in free_gpios()
385 kfree(hw->gpios); in free_gpios()
386 hw->gpios = NULL; in free_gpios()
426 hw->gpios = kzalloc(sizeof(int) * num_gpios, GFP_KERNEL); in spi_ppc4xx_of_probe()
427 if (!hw->gpios) { in spi_ppc4xx_of_probe()
437 hw->gpios[i] = gpio; in spi_ppc4xx_of_probe()
Dspi-fsl-spi.c939 int gpio = pinfo->gpios[cs]; in fsl_spi_cs_control()
964 pinfo->gpios = kmalloc(ngpios * sizeof(*pinfo->gpios), GFP_KERNEL); in of_fsl_spi_get_chipselects()
965 if (!pinfo->gpios) in of_fsl_spi_get_chipselects()
967 memset(pinfo->gpios, -1, ngpios * sizeof(*pinfo->gpios)); in of_fsl_spi_get_chipselects()
993 pinfo->gpios[i] = gpio; in of_fsl_spi_get_chipselects()
996 ret = gpio_direction_output(pinfo->gpios[i], in of_fsl_spi_get_chipselects()
1012 if (gpio_is_valid(pinfo->gpios[i])) in of_fsl_spi_get_chipselects()
1013 gpio_free(pinfo->gpios[i]); in of_fsl_spi_get_chipselects()
1020 kfree(pinfo->gpios); in of_fsl_spi_get_chipselects()
1021 pinfo->gpios = NULL; in of_fsl_spi_get_chipselects()
[all …]
Dspi-fsl-lib.h100 int *gpios; member
/drivers/sh/
Dpfc.c237 struct pinmux_gpio *gpiop = &gpioc->gpios[gpio]; in setup_data_reg()
294 struct pinmux_gpio *gpiop = &gpioc->gpios[gpio]; in get_data_reg()
356 pinmux_enum_t enum_id = gpioc->gpios[gpio].enum_id; in get_gpio_enum_id()
518 if ((gpioc->gpios[offset].flags & PINMUX_FLAG_TYPE) != PINMUX_TYPE_NONE) in sh_gpio_request()
540 gpioc->gpios[offset].flags &= ~PINMUX_FLAG_TYPE; in sh_gpio_request()
541 gpioc->gpios[offset].flags |= pinmux_type; in sh_gpio_request()
561 pinmux_type = gpioc->gpios[offset].flags & PINMUX_FLAG_TYPE; in sh_gpio_free()
563 gpioc->gpios[offset].flags &= ~PINMUX_FLAG_TYPE; in sh_gpio_free()
564 gpioc->gpios[offset].flags |= PINMUX_TYPE_NONE; in sh_gpio_free()
578 pinmux_type = gpioc->gpios[gpio].flags & PINMUX_FLAG_TYPE; in pinmux_direction()
[all …]
/drivers/i2c/muxes/
Dgpio-i2cmux.c31 gpio_set_value(mux->data.gpios[i], val & (1 << i)); in gpiomux_set()
98 ret = gpio_request(pdata->gpios[i], "gpio-i2cmux"); in gpiomux_probe()
101 gpio_direction_output(pdata->gpios[i], in gpiomux_probe()
130 gpio_free(pdata->gpios[i - 1]); in gpiomux_probe()
149 gpio_free(mux->data.gpios[i]); in gpiomux_remove()
/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()
Dgpio-pca953x.c284 static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios) in pca953x_setup_gpio() argument
297 gc->ngpio = gpios; in pca953x_setup_gpio()
/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.c67 int gpios[3]; member
86 data->gpios[0] = data->vregs[LTC4245_GPIOADC - 0x10]; in ltc4245_update_gpios()
96 for (i = 0; i < ARRAY_SIZE(data->gpios); i++) in ltc4245_update_gpios()
97 data->gpios[i] = -EAGAIN; in ltc4245_update_gpios()
112 data->gpios[gpio_curr] = data->vregs[LTC4245_GPIOADC - 0x10]; in ltc4245_update_gpios()
115 gpio_next = (gpio_curr + 1) % ARRAY_SIZE(data->gpios); in ltc4245_update_gpios()
311 int val = data->gpios[attr->index]; in ltc4245_show_gpio()
/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 …]
Dcpm_uart.h87 int gpios[NUM_GPIOS]; member
/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()
Dfhci.h267 int gpios[NUM_GPIOS]; member
/drivers/leds/
Dleds-tca6507.c619 int gpios = 0; in tca6507_probe_gpios() local
624 tca->gpio_name[gpios] = pdata->leds.leds[i].name; in tca6507_probe_gpios()
625 tca->gpio_map[gpios] = i; in tca6507_probe_gpios()
626 gpios++; in tca6507_probe_gpios()
629 if (!gpios) in tca6507_probe_gpios()
634 tca->gpio.ngpio = gpios; in tca6507_probe_gpios()
Dleds-pca9532.c340 int gpios = 0; in pca9532_configure() local
362 gpios++; in pca9532_configure()
414 if (gpios) { in pca9532_configure()
/drivers/staging/android/
Dtimed_gpio.h30 struct timed_gpio *gpios; member
Dtimed_gpio.c99 cur_gpio = &pdata->gpios[i]; in timed_gpio_probe()
/drivers/staging/bcm/
Dled_control.c16 BOOLEAN IsReqGpioIsLedInNVM(PMINI_ADAPTER Adapter, UINT gpios) in IsReqGpioIsLedInNVM() argument
19 Status = (Adapter->gpioBitMap & gpios) ^ gpios; in IsReqGpioIsLedInNVM()
DPrototypes.h215 BOOLEAN IsReqGpioIsLedInNVM(PMINI_ADAPTER Adapter, UINT gpios);
/drivers/i2c/busses/
Di2c-s3c2410.c85 int gpios[2]; member
781 gpio_free(i2c->gpios[idx]); in s3c24xx_i2c_parse_dt_gpio()
789 gpio_free(i2c->gpios[idx]); in s3c24xx_i2c_dt_gpio_free()
/drivers/tty/serial/
Dsh-sci.c1128 if (!port->cfg->gpios[i]) in sci_init_gpios()
1144 ret = gpio_request(port->cfg->gpios[i], port->gpiostr[i]); in sci_init_gpios()
1162 if (port->cfg->gpios[i]) { in sci_free_gpios()
1163 gpio_free(port->cfg->gpios[i]); in sci_free_gpios()

12