Home
last modified time | relevance | path

Searched refs:ngpio (Results 1 – 25 of 266) sorted by relevance

1234567891011

/drivers/video/fbdev/via/
Dvia-gpio.c152 .ngpio = 0,
181 for (i = 0; i < viafb_gpio_config.gpio_chip.ngpio; i += 2) in viafb_gpio_resume()
199 for (i = 0; i < viafb_gpio_config.gpio_chip.ngpio; i++) in viafb_gpio_lookup()
213 int i, ngpio = 0, ret; in viafb_gpio_probe() local
227 viafb_gpio_config.active_gpios[ngpio] = gpio; in viafb_gpio_probe()
228 viafb_gpio_config.gpio_names[ngpio] = in viafb_gpio_probe()
230 ngpio++; in viafb_gpio_probe()
233 viafb_gpio_config.gpio_chip.ngpio = ngpio; in viafb_gpio_probe()
236 if (ngpio == 0) { in viafb_gpio_probe()
245 for (i = 0; i < ngpio; i += 2) in viafb_gpio_probe()
[all …]
/drivers/gpio/
Dgpio-grgpio.c106 if (offset >= gc->ngpio) in grgpio_to_irq()
197 int ngpio = priv->gc.ngpio; in grgpio_irq_handler() local
208 for (i = 0; i < ngpio; i++) { in grgpio_irq_handler()
287 int ngpio = priv->gc.ngpio; in grgpio_irq_unmap() local
297 for (i = 0; i < ngpio; i++) { in grgpio_irq_unmap()
369 gc->ngpio = GRGPIO_MAX_NGPIO; in grgpio_probe()
371 "No or invalid nbits property: assume %d\n", gc->ngpio); in grgpio_probe()
373 gc->ngpio = prop; in grgpio_probe()
382 if (size < gc->ngpio) { in grgpio_probe()
385 size, gc->ngpio); in grgpio_probe()
[all …]
Dgpio-creg-snps.c16 u8 ngpio; member
87 if (hcg->layout->ngpio < 1 || hcg->layout->ngpio > MAX_GPIO) in creg_gpio_validate()
90 if (ngpios < 1 || ngpios > hcg->layout->ngpio) { in creg_gpio_validate()
91 dev_err(dev, "ngpios must be in [1:%u]\n", hcg->layout->ngpio); in creg_gpio_validate()
95 for (i = 0; i < hcg->layout->ngpio; i++) { in creg_gpio_validate()
110 .ngpio = 10,
118 .ngpio = 1,
168 hcg->gc.ngpio = ngpios; in creg_gpio_probe()
Dgpio-mockup.c107 for_each_set_bit(bit, mask, gc->ngpio) { in gpio_mockup_get_multiple()
139 for_each_set_bit(bit, mask, gc->ngpio) in gpio_mockup_set_multiple()
358 for (i = 0; i < gc->ngpio; i++) { in gpio_mockup_debugfs_setup()
389 for (i = 0; i < gc->ngpio; i++) { in gpio_mockup_dispose_mappings()
403 u16 ngpio; in gpio_mockup_probe() local
411 rv = device_property_read_u16(dev, "nr-gpios", &ngpio); in gpio_mockup_probe()
427 gc->ngpio = ngpio; in gpio_mockup_probe()
442 chip->lines = devm_kcalloc(dev, gc->ngpio, in gpio_mockup_probe()
447 for (i = 0; i < gc->ngpio; i++) in gpio_mockup_probe()
451 gc->ngpio); in gpio_mockup_probe()
[all …]
Dgpio-xlp.c228 BUG_ON(gpio >= gc->ngpio); in xlp_gpio_dir_output()
238 BUG_ON(gpio >= gc->ngpio); in xlp_gpio_dir_input()
248 BUG_ON(gpio >= gc->ngpio); in xlp_gpio_get()
256 BUG_ON(gpio >= gc->ngpio); in xlp_gpio_set()
296 int ngpio; in xlp_gpio_probe() local
333 ngpio = 41; in xlp_gpio_probe()
344 ngpio = (soc_type == XLP_GPIO_VARIANT_XLP208) ? 42 : 57; in xlp_gpio_probe()
357 ngpio = 66; in xlp_gpio_probe()
359 ngpio = 67; in xlp_gpio_probe()
361 ngpio = 70; in xlp_gpio_probe()
[all …]
Dgpio-davinci.c175 pdata->ngpio = val; in davinci_gpio_get_pdata()
193 unsigned int ngpio, nbank, nirq; in davinci_gpio_probe() local
211 ngpio = pdata->ngpio; in davinci_gpio_probe()
212 if (ngpio == 0) { in davinci_gpio_probe()
217 if (WARN_ON(ARCH_NR_GPIOS < ngpio)) in davinci_gpio_probe()
218 ngpio = ARCH_NR_GPIOS; in davinci_gpio_probe()
228 nirq = DIV_ROUND_UP(ngpio, 16); in davinci_gpio_probe()
251 chips->chip.ngpio = ngpio; in davinci_gpio_probe()
263 nbank = DIV_ROUND_UP(ngpio, 32); in davinci_gpio_probe()
487 unsigned ngpio; in davinci_gpio_irq_setup() local
[all …]
Dgpio-ich.c59 uint ngpio; member
277 chip->ngpio = ichx_priv.desc->ngpio; in ichx_gpiolib_setup()
291 .ngpio = 50,
313 .ngpio = 50,
320 .ngpio = 50,
328 .ngpio = 61,
336 .ngpio = 61,
342 .ngpio = 72,
350 .ngpio = 76,
360 .ngpio = 60,
[all …]
Dgpio-virtio.c232 u32 gpio_names_size, u16 ngpio) in virtio_gpio_get_names() argument
256 names = devm_kcalloc(dev, ngpio, sizeof(*names), GFP_KERNEL); in virtio_gpio_get_names()
263 for (i = 0, str = gpio_names; i < ngpio; i++) { in virtio_gpio_get_names()
282 u16 ngpio; in virtio_gpio_probe() local
292 ngpio = le16_to_cpu(config.ngpio); in virtio_gpio_probe()
293 if (!ngpio) { in virtio_gpio_probe()
298 vgpio->lines = devm_kcalloc(dev, ngpio, sizeof(*vgpio->lines), GFP_KERNEL); in virtio_gpio_probe()
302 for (i = 0; i < ngpio; i++) { in virtio_gpio_probe()
317 vgpio->gc.ngpio = ngpio; in virtio_gpio_probe()
331 vgpio->gc.names = virtio_gpio_get_names(vgpio, gpio_names_size, ngpio); in virtio_gpio_probe()
Dgpio-tps65910.c81 int ngpio = min(chip_ngpio, TPS6591X_MAX_NUM_GPIO); in tps65910_parse_dt_for_gpio() local
87 "ti,en-gpio-sleep", prop_array, ngpio); in tps65910_parse_dt_for_gpio()
93 for (idx = 0; idx < ngpio; idx++) in tps65910_parse_dt_for_gpio()
126 tps65910_gpio->gpio_chip.ngpio = TPS65910_NUM_GPIO; in tps65910_gpio_probe()
129 tps65910_gpio->gpio_chip.ngpio = TPS65911_NUM_GPIO; in tps65910_gpio_probe()
150 tps65910_gpio->gpio_chip.ngpio); in tps65910_gpio_probe()
156 for (i = 0; i < tps65910_gpio->gpio_chip.ngpio; ++i) { in tps65910_gpio_probe()
Dgpio-pca953x.c169 #define NBANK(chip) DIV_ROUND_UP(chip->gpio_chip.ngpio, BANK_SZ)
218 return fls((chip->gpio_chip.ngpio - 1) / BANK_SZ); in pca953x_bank_shift()
524 bitmap_replace(bits, bits, reg_val, mask, gc->ngpio); in pca953x_gpio_get_multiple()
540 bitmap_replace(reg_val, reg_val, bits, mask, gc->ngpio); in pca953x_gpio_set_multiple()
619 gc->ngpio = gpios; in pca953x_setup_gpio()
678 bitmap_complement(irq_mask, chip->irq_mask, gc->ngpio); in pca953x_irq_bus_sync_unlock()
687 bitmap_or(irq_mask, chip->irq_trig_fall, chip->irq_trig_raise, gc->ngpio); in pca953x_irq_bus_sync_unlock()
688 bitmap_complement(reg_direction, reg_direction, gc->ngpio); in pca953x_irq_bus_sync_unlock()
689 bitmap_and(irq_mask, irq_mask, reg_direction, gc->ngpio); in pca953x_irq_bus_sync_unlock()
692 for_each_set_bit(level, irq_mask, gc->ngpio) in pca953x_irq_bus_sync_unlock()
[all …]
Dgpio-thunderx.c281 for (bank = 0; bank <= chip->ngpio / 64; bank++) { in thunderx_gpio_set_multiple()
433 int ngpio, i; in thunderx_gpio_probe() local
467 ngpio = 50; in thunderx_gpio_probe()
472 ngpio = c & GPIO_CONST_GPIOS_MASK; in thunderx_gpio_probe()
477 ngpio, sizeof(struct msix_entry), in thunderx_gpio_probe()
485 ngpio, in thunderx_gpio_probe()
493 for (i = 0; i < ngpio; i++) { in thunderx_gpio_probe()
515 err = pci_enable_msix_range(pdev, txgpio->msix_entries, ngpio, ngpio); in thunderx_gpio_probe()
525 chip->ngpio = ngpio; in thunderx_gpio_probe()
548 for (i = 0; i < ngpio; i++) { in thunderx_gpio_probe()
[all …]
Dgpiolib.c116 gdev->base + gdev->ngpio > gpio) { in gpio_to_desc()
146 if (hwnum >= gdev->ngpio) in gpiochip_get_desc()
183 static int gpiochip_find_base(int ngpio) in gpiochip_find_base() argument
186 int base = ARCH_NR_GPIOS - ngpio; in gpiochip_find_base()
190 if (gdev->base + gdev->ngpio <= base) in gpiochip_find_base()
193 base = gdev->base - ngpio; in gpiochip_find_base()
265 if (gdev->base + gdev->ngpio <= next->base) { in gpiodev_add_to_list()
272 if (prev->base + prev->ngpio <= gdev->base) { in gpiodev_add_to_list()
284 if (prev->base + prev->ngpio <= gdev->base in gpiodev_add_to_list()
285 && gdev->base + gdev->ngpio <= next->base) { in gpiodev_add_to_list()
[all …]
Dgpio-madera.c143 madera_gpio->gpio_chip.ngpio = CS47L15_NUM_GPIOS; in madera_gpio_probe()
146 madera_gpio->gpio_chip.ngpio = CS47L35_NUM_GPIOS; in madera_gpio_probe()
150 madera_gpio->gpio_chip.ngpio = CS47L85_NUM_GPIOS; in madera_gpio_probe()
154 madera_gpio->gpio_chip.ngpio = CS47L90_NUM_GPIOS; in madera_gpio_probe()
159 madera_gpio->gpio_chip.ngpio = CS47L92_NUM_GPIOS; in madera_gpio_probe()
190 0, 0, madera_gpio->gpio_chip.ngpio); in madera_gpio_probe()
Dgpio-tb10x.c114 u32 ngpio; in tb10x_gpio_probe() local
119 if (of_property_read_u32(np, "abilis,ngpio", &ngpio)) in tb10x_gpio_probe()
158 tb10x_gpio->gc.ngpio = ngpio; in tb10x_gpio_probe()
187 tb10x_gpio->gc.ngpio, in tb10x_gpio_probe()
194 tb10x_gpio->gc.ngpio, 1, tb10x_gpio->gc.label, in tb10x_gpio_probe()
224 BIT(tb10x_gpio->gc.ngpio) - 1, 0, 0); in tb10x_gpio_remove()
Dgpio-it87.c298 it87_gpio->chip.ngpio = 64; /* has 48, use 64 for convenient calc */ in it87_gpio_init()
306 it87_gpio->chip.ngpio = 64; in it87_gpio_init()
318 it87_gpio->chip.ngpio = 64; in it87_gpio_init()
325 it87_gpio->chip.ngpio = 16; in it87_gpio_init()
348 chip_type, chip_rev, it87_gpio->chip.ngpio, in it87_gpio_init()
365 labels = kcalloc(it87_gpio->chip.ngpio, sizeof("it87_gpXY"), in it87_gpio_init()
367 labels_table = kcalloc(it87_gpio->chip.ngpio, sizeof(const char *), in it87_gpio_init()
375 for (i = 0; i < it87_gpio->chip.ngpio; i++) { in it87_gpio_init()
Dgpio-pisosr.c105 bitmap_zero(bits, chip->ngpio); in pisosr_gpio_get_multiple()
106 for_each_set_clump8(offset, gpio_mask, mask, chip->ngpio) { in pisosr_gpio_get_multiple()
123 .ngpio = DEFAULT_NGPIO,
141 of_property_read_u16(dev->of_node, "ngpios", &gpio->chip.ngpio); in pisosr_gpio_probe()
145 gpio->buffer_size = DIV_ROUND_UP(gpio->chip.ngpio, 8); in pisosr_gpio_probe()
Dgpio-ts4900.c149 u32 ngpio; in ts4900_gpio_probe() local
152 if (of_property_read_u32(client->dev.of_node, "ngpios", &ngpio)) in ts4900_gpio_probe()
153 ngpio = DEFAULT_PIN_NUMBER; in ts4900_gpio_probe()
161 priv->gpio_chip.ngpio = ngpio; in ts4900_gpio_probe()
Dgpio-sifive.c66 if (offset < 0 || offset >= gc->ngpio) in sifive_gpio_irq_set_type()
182 int ret, ngpio, i; in sifive_gpio_probe() local
199 ngpio = of_irq_count(node); in sifive_gpio_probe()
200 if (ngpio > SIFIVE_GPIO_MAX) { in sifive_gpio_probe()
218 for (i = 0; i < ngpio; i++) { in sifive_gpio_probe()
245 chip->gc.ngpio = ngpio; in sifive_gpio_probe()
Dgpio-palmas.c24 int ngpio; member
130 .ngpio = 8,
134 .ngpio = 16,
165 palmas_gpio->gpio_chip.ngpio = dev_data->ngpio; in palmas_gpio_probe()
Dgpio-pcf857x.c185 for_each_set_bit(i, &change, gpio->chip.ngpio) in pcf857x_irq()
264 gpio->chip.ngpio = id->driver_data; in pcf857x_probe()
277 if (gpio->chip.ngpio == 8) { in pcf857x_probe()
295 } else if (gpio->chip.ngpio == 16) { in pcf857x_probe()
378 gpio->chip.base, gpio->chip.ngpio, in pcf857x_probe()
403 gpio->chip.base, gpio->chip.ngpio, in pcf857x_remove()
420 gpio->write(gpio->client, BIT(gpio->chip.ngpio) - 1); in pcf857x_shutdown()
Dgpio-twl6040.c86 twl6040gpo_chip.ngpio = 3; /* twl6040 have 3 GPO */ in gpo_twl6040_probe()
88 twl6040gpo_chip.ngpio = 1; /* twl6041 have 1 GPO */ in gpo_twl6040_probe()
98 twl6040gpo_chip.ngpio = 0; in gpo_twl6040_probe()
/drivers/pinctrl/
Dpinctrl-mcp23s08_spi.c21 unsigned ngpio; member
92 mcp->chip.ngpio = 8; in mcp23s08_spi_regmap_init()
106 mcp->chip.ngpio = 16; in mcp23s08_spi_regmap_init()
120 mcp->chip.ngpio = 16; in mcp23s08_spi_regmap_init()
151 unsigned int ngpio = 0; in mcp23s08_probe() local
204 ngpio += data->mcp[addr]->chip.ngpio; in mcp23s08_probe()
206 data->ngpio = ngpio; in mcp23s08_probe()
/drivers/ssb/
Ddriver_gpio.c134 for_each_set_bit(gpio, &irqs, bus->gpio.ngpio) in ssb_gpio_irq_chipco_handler()
150 bus->irq_domain = irq_domain_add_linear(NULL, chip->ngpio, in ssb_gpio_irq_chipco_domain_init()
156 for (gpio = 0; gpio < chip->ngpio; gpio++) { in ssb_gpio_irq_chipco_domain_init()
176 for (gpio = 0; gpio < chip->ngpio; gpio++) { in ssb_gpio_irq_chipco_domain_init()
197 for (gpio = 0; gpio < chip->ngpio; gpio++) { in ssb_gpio_irq_chipco_domain_exit()
231 chip->ngpio = 16; in ssb_gpio_chipco_init()
332 for_each_set_bit(gpio, &irqs, bus->gpio.ngpio) in ssb_gpio_irq_extif_handler()
348 bus->irq_domain = irq_domain_add_linear(NULL, chip->ngpio, in ssb_gpio_irq_extif_domain_init()
354 for (gpio = 0; gpio < chip->ngpio; gpio++) { in ssb_gpio_irq_extif_domain_init()
373 for (gpio = 0; gpio < chip->ngpio; gpio++) { in ssb_gpio_irq_extif_domain_init()
[all …]
/drivers/mfd/
Dvexpress-sysreg.c44 .ngpio = 8,
50 .ngpio = 2,
56 .ngpio = 1,
120 mmc_gpio_chip->ngpio = 2; in vexpress_sysreg_probe()
/drivers/pinctrl/spear/
Dpinctrl-plgpio.c164 if (offset >= chip->ngpio) in plgpio_get_value()
181 if (offset >= chip->ngpio) in plgpio_set_value()
204 if (offset >= chip->ngpio) in plgpio_request()
255 if (offset >= chip->ngpio) in plgpio_free()
326 if (offset >= plgpio->chip.ngpio) in plgpio_irq_set_type()
367 count = plgpio->chip.ngpio; in plgpio_irq_handler()
458 plgpio->chip.ngpio = val; in plgpio_probe_dt()
539 DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG), in plgpio_probe()
609 int i, reg_count = DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG); in plgpio_suspend()
648 int i, reg_count = DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG); in plgpio_resume()
[all …]

1234567891011