/drivers/mmc/host/ |
D | of_mmc_spi.c | 42 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/ |
D | gpio-regulator.c | 45 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/ |
D | gpio-addr-flash.c | 193 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/ |
D | spi-ppc4xx.c | 133 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()
|
D | spi-fsl-spi.c | 939 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 …]
|
D | spi-fsl-lib.h | 100 int *gpios; member
|
/drivers/sh/ |
D | pfc.c | 237 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/ |
D | gpio-i2cmux.c | 31 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/ |
D | gpio-adp5520.c | 95 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()
|
D | gpio-pca953x.c | 284 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/ |
D | gpio_tilt_polled.c | 54 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/ |
D | ltc4245.c | 67 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/ |
D | cpm_uart_core.c | 105 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 …]
|
D | cpm_uart.h | 87 int gpios[NUM_GPIOS]; member
|
/drivers/usb/host/ |
D | fhci-hcd.c | 155 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()
|
D | fhci-hub.c | 45 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()
|
D | fhci.h | 267 int gpios[NUM_GPIOS]; member
|
/drivers/leds/ |
D | leds-tca6507.c | 619 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()
|
D | leds-pca9532.c | 340 int gpios = 0; in pca9532_configure() local 362 gpios++; in pca9532_configure() 414 if (gpios) { in pca9532_configure()
|
/drivers/staging/android/ |
D | timed_gpio.h | 30 struct timed_gpio *gpios; member
|
D | timed_gpio.c | 99 cur_gpio = &pdata->gpios[i]; in timed_gpio_probe()
|
/drivers/staging/bcm/ |
D | led_control.c | 16 BOOLEAN IsReqGpioIsLedInNVM(PMINI_ADAPTER Adapter, UINT gpios) in IsReqGpioIsLedInNVM() argument 19 Status = (Adapter->gpioBitMap & gpios) ^ gpios; in IsReqGpioIsLedInNVM()
|
D | Prototypes.h | 215 BOOLEAN IsReqGpioIsLedInNVM(PMINI_ADAPTER Adapter, UINT gpios);
|
/drivers/i2c/busses/ |
D | i2c-s3c2410.c | 85 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/ |
D | sh-sci.c | 1128 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()
|