18 #include <linux/module.h>
22 #include <linux/slab.h>
43 irq = arizona_map_irq(arizona, irq);
54 irq = arizona_map_irq(arizona, irq);
64 irq = arizona_map_irq(arizona, irq);
74 struct arizona *arizona =
data;
83 struct arizona *arizona =
data;
89 dev_err(arizona->
dev,
"Control interface error\n");
96 struct arizona *arizona =
data;
100 ret = pm_runtime_get_sync(arizona->
dev);
102 dev_err(arizona->
dev,
"Failed to resume device: %d\n", ret);
116 }
else if (ret != 0) {
117 dev_err(arizona->
dev,
"Failed to read main IRQ status: %d\n",
121 pm_runtime_mark_last_busy(arizona->
dev);
122 pm_runtime_put_autosuspend(arizona->
dev);
127 static void arizona_irq_enable(
struct irq_data *data)
131 static void arizona_irq_disable(
struct irq_data *data)
135 static struct irq_chip arizona_irq_chip = {
137 .irq_disable = arizona_irq_disable,
138 .irq_enable = arizona_irq_enable,
141 static int arizona_irq_map(
struct irq_domain *
h,
unsigned int virq,
148 irq_set_nested_thread(virq, 1);
155 irq_set_noprobe(virq);
162 .map = arizona_irq_map,
170 const struct regmap_irq_chip *aod, *irq;
171 bool ctrlif_error =
true;
173 switch (arizona->
type) {
174 #ifdef CONFIG_MFD_WM5102
179 switch (arizona->
rev) {
182 ctrlif_error =
false;
189 #ifdef CONFIG_MFD_WM5110
194 switch (arizona->
rev) {
197 ctrlif_error =
false;
205 BUG_ON(
"Unknown Arizona class device" ==
NULL);
209 if (arizona->
pdata.irq_active_high) {
213 dev_err(arizona->
dev,
"Couldn't set IRQ polarity: %d\n",
226 if (!arizona->
virq) {
236 dev_err(arizona->
dev,
"Failed to add AOD IRQs: %d\n", ret);
245 dev_err(arizona->
dev,
"Failed to add AOD IRQs: %d\n", ret);
252 "Boot done", arizona);
254 dev_err(arizona->
dev,
"Failed to request boot done %d: %d\n",
264 "Control interface error", arizona);
267 "Failed to request CTRLIF_ERR %d: %d\n",
274 flags,
"arizona", arizona);
277 dev_err(arizona->
dev,
"Failed to request IRQ %d: %d\n",