sprd_eic 131 drivers/gpio/gpio-eic-sprd.c static inline void __iomem *sprd_eic_offset_base(struct sprd_eic *sprd_eic, sprd_eic 137 drivers/gpio/gpio-eic-sprd.c return sprd_eic->base[bank]; sprd_eic 143 drivers/gpio/gpio-eic-sprd.c struct sprd_eic *sprd_eic = gpiochip_get_data(chip); sprd_eic 145 drivers/gpio/gpio-eic-sprd.c sprd_eic_offset_base(sprd_eic, offset / SPRD_EIC_PER_BANK_NR); sprd_eic 149 drivers/gpio/gpio-eic-sprd.c spin_lock_irqsave(&sprd_eic->lock, flags); sprd_eic 158 drivers/gpio/gpio-eic-sprd.c spin_unlock_irqrestore(&sprd_eic->lock, flags); sprd_eic 163 drivers/gpio/gpio-eic-sprd.c struct sprd_eic *sprd_eic = gpiochip_get_data(chip); sprd_eic 165 drivers/gpio/gpio-eic-sprd.c sprd_eic_offset_base(sprd_eic, offset / SPRD_EIC_PER_BANK_NR); sprd_eic 183 drivers/gpio/gpio-eic-sprd.c struct sprd_eic *sprd_eic = gpiochip_get_data(chip); sprd_eic 185 drivers/gpio/gpio-eic-sprd.c switch (sprd_eic->type) { sprd_eic 211 drivers/gpio/gpio-eic-sprd.c struct sprd_eic *sprd_eic = gpiochip_get_data(chip); sprd_eic 213 drivers/gpio/gpio-eic-sprd.c sprd_eic_offset_base(sprd_eic, offset / SPRD_EIC_PER_BANK_NR); sprd_eic 238 drivers/gpio/gpio-eic-sprd.c struct sprd_eic *sprd_eic = gpiochip_get_data(chip); sprd_eic 241 drivers/gpio/gpio-eic-sprd.c switch (sprd_eic->type) { sprd_eic 263 drivers/gpio/gpio-eic-sprd.c struct sprd_eic *sprd_eic = gpiochip_get_data(chip); sprd_eic 266 drivers/gpio/gpio-eic-sprd.c switch (sprd_eic->type) { sprd_eic 288 drivers/gpio/gpio-eic-sprd.c struct sprd_eic *sprd_eic = gpiochip_get_data(chip); sprd_eic 291 drivers/gpio/gpio-eic-sprd.c switch (sprd_eic->type) { sprd_eic 312 drivers/gpio/gpio-eic-sprd.c struct sprd_eic *sprd_eic = gpiochip_get_data(chip); sprd_eic 316 drivers/gpio/gpio-eic-sprd.c switch (sprd_eic->type) { sprd_eic 448 drivers/gpio/gpio-eic-sprd.c struct sprd_eic *sprd_eic = gpiochip_get_data(chip); sprd_eic 457 drivers/gpio/gpio-eic-sprd.c if ((sprd_eic->type != SPRD_EIC_DEBOUNCE && sprd_eic 458 drivers/gpio/gpio-eic-sprd.c sprd_eic->type != SPRD_EIC_LATCH) || sprd_eic 466 drivers/gpio/gpio-eic-sprd.c switch (sprd_eic->type) { sprd_eic 503 drivers/gpio/gpio-eic-sprd.c struct sprd_eic *sprd_eic = gpiochip_get_data(chip); sprd_eic 507 drivers/gpio/gpio-eic-sprd.c void __iomem *base = sprd_eic_offset_base(sprd_eic, bank); sprd_eic 510 drivers/gpio/gpio-eic-sprd.c switch (sprd_eic->type) { sprd_eic 571 drivers/gpio/gpio-eic-sprd.c struct sprd_eic *sprd_eic; sprd_eic 580 drivers/gpio/gpio-eic-sprd.c sprd_eic = devm_kzalloc(&pdev->dev, sizeof(*sprd_eic), GFP_KERNEL); sprd_eic 581 drivers/gpio/gpio-eic-sprd.c if (!sprd_eic) sprd_eic 584 drivers/gpio/gpio-eic-sprd.c spin_lock_init(&sprd_eic->lock); sprd_eic 585 drivers/gpio/gpio-eic-sprd.c sprd_eic->type = pdata->type; sprd_eic 587 drivers/gpio/gpio-eic-sprd.c sprd_eic->irq = platform_get_irq(pdev, 0); sprd_eic 588 drivers/gpio/gpio-eic-sprd.c if (sprd_eic->irq < 0) sprd_eic 589 drivers/gpio/gpio-eic-sprd.c return sprd_eic->irq; sprd_eic 598 drivers/gpio/gpio-eic-sprd.c sprd_eic->base[i] = devm_platform_ioremap_resource(pdev, i); sprd_eic 599 drivers/gpio/gpio-eic-sprd.c if (IS_ERR(sprd_eic->base[i])) sprd_eic 603 drivers/gpio/gpio-eic-sprd.c sprd_eic->chip.label = sprd_eic_label_name[sprd_eic->type]; sprd_eic 604 drivers/gpio/gpio-eic-sprd.c sprd_eic->chip.ngpio = pdata->num_eics; sprd_eic 605 drivers/gpio/gpio-eic-sprd.c sprd_eic->chip.base = -1; sprd_eic 606 drivers/gpio/gpio-eic-sprd.c sprd_eic->chip.parent = &pdev->dev; sprd_eic 607 drivers/gpio/gpio-eic-sprd.c sprd_eic->chip.of_node = pdev->dev.of_node; sprd_eic 608 drivers/gpio/gpio-eic-sprd.c sprd_eic->chip.direction_input = sprd_eic_direction_input; sprd_eic 609 drivers/gpio/gpio-eic-sprd.c switch (sprd_eic->type) { sprd_eic 611 drivers/gpio/gpio-eic-sprd.c sprd_eic->chip.request = sprd_eic_request; sprd_eic 612 drivers/gpio/gpio-eic-sprd.c sprd_eic->chip.free = sprd_eic_free; sprd_eic 613 drivers/gpio/gpio-eic-sprd.c sprd_eic->chip.set_config = sprd_eic_set_config; sprd_eic 614 drivers/gpio/gpio-eic-sprd.c sprd_eic->chip.set = sprd_eic_set; sprd_eic 619 drivers/gpio/gpio-eic-sprd.c sprd_eic->chip.get = sprd_eic_get; sprd_eic 627 drivers/gpio/gpio-eic-sprd.c sprd_eic->intc.name = dev_name(&pdev->dev); sprd_eic 628 drivers/gpio/gpio-eic-sprd.c sprd_eic->intc.irq_ack = sprd_eic_irq_ack; sprd_eic 629 drivers/gpio/gpio-eic-sprd.c sprd_eic->intc.irq_mask = sprd_eic_irq_mask; sprd_eic 630 drivers/gpio/gpio-eic-sprd.c sprd_eic->intc.irq_unmask = sprd_eic_irq_unmask; sprd_eic 631 drivers/gpio/gpio-eic-sprd.c sprd_eic->intc.irq_set_type = sprd_eic_irq_set_type; sprd_eic 632 drivers/gpio/gpio-eic-sprd.c sprd_eic->intc.flags = IRQCHIP_SKIP_SET_WAKE; sprd_eic 634 drivers/gpio/gpio-eic-sprd.c irq = &sprd_eic->chip.irq; sprd_eic 635 drivers/gpio/gpio-eic-sprd.c irq->chip = &sprd_eic->intc; sprd_eic 639 drivers/gpio/gpio-eic-sprd.c irq->parent_handler_data = sprd_eic; sprd_eic 641 drivers/gpio/gpio-eic-sprd.c irq->parents = &sprd_eic->irq; sprd_eic 643 drivers/gpio/gpio-eic-sprd.c ret = devm_gpiochip_add_data(&pdev->dev, &sprd_eic->chip, sprd_eic); sprd_eic 649 drivers/gpio/gpio-eic-sprd.c platform_set_drvdata(pdev, sprd_eic);