Lines Matching refs:irqd

60 	struct pmic_irq_data *irqd = chip->irq_data;  in pmic_irq_enable()  local
62 irqd->enable_hwirq[hwirq] = true; in pmic_irq_enable()
69 struct pmic_irq_data *irqd = chip->irq_data; in pmic_irq_disable() local
71 irqd->enable_hwirq[hwirq] = false; in pmic_irq_disable()
85 struct pmic_irq_data *irqd = chip->irq_data; in pmic_irq_sync_unlock() local
87 for (i = 0; i < irqd->num_pmic_irqs; i++) { in pmic_irq_sync_unlock()
88 if (irqd->enable_hwirq[i] == irqd->cache_hwirq[i]) in pmic_irq_sync_unlock()
93 while ((top_gp + 1) < irqd->num_top && in pmic_irq_sync_unlock()
94 i >= irqd->pmic_ints[top_gp + 1].hwirq_base) in pmic_irq_sync_unlock()
98 gp_offset = i - irqd->pmic_ints[top_gp].hwirq_base; in pmic_irq_sync_unlock()
101 en_reg = irqd->pmic_ints[top_gp].en_reg + in pmic_irq_sync_unlock()
102 (irqd->pmic_ints[top_gp].en_reg_shift * int_regs); in pmic_irq_sync_unlock()
105 irqd->enable_hwirq[i] << shift); in pmic_irq_sync_unlock()
107 irqd->cache_hwirq[i] = irqd->enable_hwirq[i]; in pmic_irq_sync_unlock()
127 struct pmic_irq_data *irqd = chip->irq_data; in mt6358_irq_sp_handler() local
129 for (i = 0; i < irqd->pmic_ints[top_gp].num_int_regs; i++) { in mt6358_irq_sp_handler()
130 sta_reg = irqd->pmic_ints[top_gp].sta_reg + in mt6358_irq_sp_handler()
131 irqd->pmic_ints[top_gp].sta_reg_shift * i; in mt6358_irq_sp_handler()
147 hwirq = irqd->pmic_ints[top_gp].hwirq_base + in mt6358_irq_sp_handler()
164 struct pmic_irq_data *irqd = chip->irq_data; in mt6358_irq_handler() local
169 irqd->top_int_status_reg, in mt6358_irq_handler()
177 for (i = 0; i < irqd->num_top; i++) { in mt6358_irq_handler()
178 bit = BIT(irqd->pmic_ints[i].top_offset); in mt6358_irq_handler()
211 struct pmic_irq_data *irqd; in mt6358_irq_init() local
228 irqd = chip->irq_data; in mt6358_irq_init()
229 irqd->enable_hwirq = devm_kcalloc(chip->dev, in mt6358_irq_init()
230 irqd->num_pmic_irqs, in mt6358_irq_init()
231 sizeof(*irqd->enable_hwirq), in mt6358_irq_init()
233 if (!irqd->enable_hwirq) in mt6358_irq_init()
236 irqd->cache_hwirq = devm_kcalloc(chip->dev, in mt6358_irq_init()
237 irqd->num_pmic_irqs, in mt6358_irq_init()
238 sizeof(*irqd->cache_hwirq), in mt6358_irq_init()
240 if (!irqd->cache_hwirq) in mt6358_irq_init()
244 for (i = 0; i < irqd->num_top; i++) { in mt6358_irq_init()
245 for (j = 0; j < irqd->pmic_ints[i].num_int_regs; j++) in mt6358_irq_init()
247 irqd->pmic_ints[i].en_reg + in mt6358_irq_init()
248 irqd->pmic_ints[i].en_reg_shift * j, 0); in mt6358_irq_init()
252 irqd->num_pmic_irqs, in mt6358_irq_init()