Lines Matching refs:chip_data
283 struct stm32_exti_chip_data *chip_data = gc->private; in stm32_exti_pending() local
284 const struct stm32_exti_bank *stm32_bank = chip_data->reg_bank; in stm32_exti_pending()
345 struct stm32_exti_chip_data *chip_data = gc->private; in stm32_irq_set_type() local
346 const struct stm32_exti_bank *stm32_bank = chip_data->reg_bank; in stm32_irq_set_type()
347 struct hwspinlock *hwlock = chip_data->host_data->hwlock; in stm32_irq_set_type()
380 static void stm32_chip_suspend(struct stm32_exti_chip_data *chip_data, in stm32_chip_suspend() argument
383 const struct stm32_exti_bank *stm32_bank = chip_data->reg_bank; in stm32_chip_suspend()
384 void __iomem *base = chip_data->host_data->base; in stm32_chip_suspend()
387 chip_data->rtsr_cache = readl_relaxed(base + stm32_bank->rtsr_ofst); in stm32_chip_suspend()
388 chip_data->ftsr_cache = readl_relaxed(base + stm32_bank->ftsr_ofst); in stm32_chip_suspend()
393 static void stm32_chip_resume(struct stm32_exti_chip_data *chip_data, in stm32_chip_resume() argument
396 const struct stm32_exti_bank *stm32_bank = chip_data->reg_bank; in stm32_chip_resume()
397 void __iomem *base = chip_data->host_data->base; in stm32_chip_resume()
400 writel_relaxed(chip_data->rtsr_cache, base + stm32_bank->rtsr_ofst); in stm32_chip_resume()
401 writel_relaxed(chip_data->ftsr_cache, base + stm32_bank->ftsr_ofst); in stm32_chip_resume()
408 struct stm32_exti_chip_data *chip_data = gc->private; in stm32_irq_suspend() local
411 stm32_chip_suspend(chip_data, gc->wake_active); in stm32_irq_suspend()
417 struct stm32_exti_chip_data *chip_data = gc->private; in stm32_irq_resume() local
420 stm32_chip_resume(chip_data, gc->mask_cache); in stm32_irq_resume()
454 struct stm32_exti_chip_data *chip_data = gc->private; in stm32_irq_ack() local
455 const struct stm32_exti_bank *stm32_bank = chip_data->reg_bank; in stm32_irq_ack()
469 struct stm32_exti_chip_data *chip_data = irq_data_get_irq_chip_data(d); in stm32_exti_write_bit() local
470 void __iomem *base = chip_data->host_data->base; in stm32_exti_write_bit()
478 struct stm32_exti_chip_data *chip_data = irq_data_get_irq_chip_data(d); in stm32_exti_set_bit() local
479 void __iomem *base = chip_data->host_data->base; in stm32_exti_set_bit()
491 struct stm32_exti_chip_data *chip_data = irq_data_get_irq_chip_data(d); in stm32_exti_clr_bit() local
492 void __iomem *base = chip_data->host_data->base; in stm32_exti_clr_bit()
504 struct stm32_exti_chip_data *chip_data = irq_data_get_irq_chip_data(d); in stm32_exti_h_eoi() local
505 const struct stm32_exti_bank *stm32_bank = chip_data->reg_bank; in stm32_exti_h_eoi()
507 raw_spin_lock(&chip_data->rlock); in stm32_exti_h_eoi()
513 raw_spin_unlock(&chip_data->rlock); in stm32_exti_h_eoi()
521 struct stm32_exti_chip_data *chip_data = irq_data_get_irq_chip_data(d); in stm32_exti_h_mask() local
522 const struct stm32_exti_bank *stm32_bank = chip_data->reg_bank; in stm32_exti_h_mask()
524 raw_spin_lock(&chip_data->rlock); in stm32_exti_h_mask()
525 chip_data->mask_cache = stm32_exti_clr_bit(d, stm32_bank->imr_ofst); in stm32_exti_h_mask()
526 raw_spin_unlock(&chip_data->rlock); in stm32_exti_h_mask()
534 struct stm32_exti_chip_data *chip_data = irq_data_get_irq_chip_data(d); in stm32_exti_h_unmask() local
535 const struct stm32_exti_bank *stm32_bank = chip_data->reg_bank; in stm32_exti_h_unmask()
537 raw_spin_lock(&chip_data->rlock); in stm32_exti_h_unmask()
538 chip_data->mask_cache = stm32_exti_set_bit(d, stm32_bank->imr_ofst); in stm32_exti_h_unmask()
539 raw_spin_unlock(&chip_data->rlock); in stm32_exti_h_unmask()
547 struct stm32_exti_chip_data *chip_data = irq_data_get_irq_chip_data(d); in stm32_exti_h_set_type() local
548 const struct stm32_exti_bank *stm32_bank = chip_data->reg_bank; in stm32_exti_h_set_type()
549 struct hwspinlock *hwlock = chip_data->host_data->hwlock; in stm32_exti_h_set_type()
550 void __iomem *base = chip_data->host_data->base; in stm32_exti_h_set_type()
554 raw_spin_lock(&chip_data->rlock); in stm32_exti_h_set_type()
578 raw_spin_unlock(&chip_data->rlock); in stm32_exti_h_set_type()
585 struct stm32_exti_chip_data *chip_data = irq_data_get_irq_chip_data(d); in stm32_exti_h_set_wake() local
588 raw_spin_lock(&chip_data->rlock); in stm32_exti_h_set_wake()
591 chip_data->wake_active |= mask; in stm32_exti_h_set_wake()
593 chip_data->wake_active &= ~mask; in stm32_exti_h_set_wake()
595 raw_spin_unlock(&chip_data->rlock); in stm32_exti_h_set_wake()
611 struct stm32_exti_chip_data *chip_data; in stm32_exti_h_suspend() local
615 chip_data = &stm32_host_data->chips_data[i]; in stm32_exti_h_suspend()
616 raw_spin_lock(&chip_data->rlock); in stm32_exti_h_suspend()
617 stm32_chip_suspend(chip_data, chip_data->wake_active); in stm32_exti_h_suspend()
618 raw_spin_unlock(&chip_data->rlock); in stm32_exti_h_suspend()
626 struct stm32_exti_chip_data *chip_data; in stm32_exti_h_resume() local
630 chip_data = &stm32_host_data->chips_data[i]; in stm32_exti_h_resume()
631 raw_spin_lock(&chip_data->rlock); in stm32_exti_h_resume()
632 stm32_chip_resume(chip_data, chip_data->mask_cache); in stm32_exti_h_resume()
633 raw_spin_unlock(&chip_data->rlock); in stm32_exti_h_resume()
657 struct stm32_exti_chip_data *chip_data = irq_data_get_irq_chip_data(d); in stm32_exti_h_retrigger() local
658 const struct stm32_exti_bank *stm32_bank = chip_data->reg_bank; in stm32_exti_h_retrigger()
659 void __iomem *base = chip_data->host_data->base; in stm32_exti_h_retrigger()
697 struct stm32_exti_chip_data *chip_data; in stm32_exti_h_domain_alloc() local
711 chip_data = &host_data->chips_data[bank]; in stm32_exti_h_domain_alloc()
713 event_trg = readl_relaxed(host_data->base + chip_data->reg_bank->trg_ofst); in stm32_exti_h_domain_alloc()
717 irq_domain_set_hwirq_and_chip(dm, virq, hwirq, chip, chip_data); in stm32_exti_h_domain_alloc()
777 struct stm32_exti_chip_data *chip_data; in stm32_exti_chip_init() local
781 chip_data = &h_data->chips_data[bank_idx]; in stm32_exti_chip_init()
782 chip_data->host_data = h_data; in stm32_exti_chip_init()
783 chip_data->reg_bank = stm32_bank; in stm32_exti_chip_init()
785 raw_spin_lock_init(&chip_data->rlock); in stm32_exti_chip_init()
797 return chip_data; in stm32_exti_chip_init()
832 struct stm32_exti_chip_data *chip_data; in stm32_exti_init() local
835 chip_data = stm32_exti_chip_init(host_data, i, node); in stm32_exti_init()
851 gc->private = (void *)chip_data; in stm32_exti_init()