2 * regmap based irq_chip
4 * Copyright 2011 Wolfson Microelectronics plc
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #include <linux/device.h>
14 #include <linux/export.h>
15 #include <linux/interrupt.h>
16 #include <linux/irq.h>
17 #include <linux/irqdomain.h>
18 #include <linux/pm_runtime.h>
19 #include <linux/regmap.h>
20 #include <linux/slab.h>
24 struct regmap_irq_chip_data
{
26 struct irq_chip irq_chip
;
29 const struct regmap_irq_chip
*chip
;
32 struct irq_domain
*domain
;
38 unsigned int *status_buf
;
39 unsigned int *mask_buf
;
40 unsigned int *mask_buf_def
;
41 unsigned int *wake_buf
;
42 unsigned int *type_buf
;
43 unsigned int *type_buf_def
;
45 unsigned int irq_reg_stride
;
46 unsigned int type_reg_stride
;
50 struct regmap_irq
*irq_to_regmap_irq(struct regmap_irq_chip_data
*data
,
53 return &data
->chip
->irqs
[irq
];
56 static void regmap_irq_lock(struct irq_data
*data
)
58 struct regmap_irq_chip_data
*d
= irq_data_get_irq_chip_data(data
);
63 static int regmap_irq_update_bits(struct regmap_irq_chip_data
*d
,
64 unsigned int reg
, unsigned int mask
,
67 if (d
->chip
->mask_writeonly
)
68 return regmap_write_bits(d
->map
, reg
, mask
, val
);
70 return regmap_update_bits(d
->map
, reg
, mask
, val
);
73 static void regmap_irq_sync_unlock(struct irq_data
*data
)
75 struct regmap_irq_chip_data
*d
= irq_data_get_irq_chip_data(data
);
76 struct regmap
*map
= d
->map
;
81 if (d
->chip
->runtime_pm
) {
82 ret
= pm_runtime_get_sync(map
->dev
);
84 dev_err(map
->dev
, "IRQ sync failed to resume: %d\n",
89 * If there's been a change in the mask write it back to the
90 * hardware. We rely on the use of the regmap core cache to
91 * suppress pointless writes.
93 for (i
= 0; i
< d
->chip
->num_regs
; i
++) {
94 reg
= d
->chip
->mask_base
+
95 (i
* map
->reg_stride
* d
->irq_reg_stride
);
96 if (d
->chip
->mask_invert
) {
97 ret
= regmap_irq_update_bits(d
, reg
,
98 d
->mask_buf_def
[i
], ~d
->mask_buf
[i
]);
99 } else if (d
->chip
->unmask_base
) {
100 /* set mask with mask_base register */
101 ret
= regmap_irq_update_bits(d
, reg
,
102 d
->mask_buf_def
[i
], ~d
->mask_buf
[i
]);
105 "Failed to sync unmasks in %x\n",
107 unmask_offset
= d
->chip
->unmask_base
-
109 /* clear mask with unmask_base register */
110 ret
= regmap_irq_update_bits(d
,
115 ret
= regmap_irq_update_bits(d
, reg
,
116 d
->mask_buf_def
[i
], d
->mask_buf
[i
]);
119 dev_err(d
->map
->dev
, "Failed to sync masks in %x\n",
122 reg
= d
->chip
->wake_base
+
123 (i
* map
->reg_stride
* d
->irq_reg_stride
);
125 if (d
->chip
->wake_invert
)
126 ret
= regmap_irq_update_bits(d
, reg
,
130 ret
= regmap_irq_update_bits(d
, reg
,
135 "Failed to sync wakes in %x: %d\n",
139 if (!d
->chip
->init_ack_masked
)
142 * Ack all the masked interrupts unconditionally,
143 * OR if there is masked interrupt which hasn't been Acked,
144 * it'll be ignored in irq handler, then may introduce irq storm
146 if (d
->mask_buf
[i
] && (d
->chip
->ack_base
|| d
->chip
->use_ack
)) {
147 reg
= d
->chip
->ack_base
+
148 (i
* map
->reg_stride
* d
->irq_reg_stride
);
149 /* some chips ack by write 0 */
150 if (d
->chip
->ack_invert
)
151 ret
= regmap_write(map
, reg
, ~d
->mask_buf
[i
]);
153 ret
= regmap_write(map
, reg
, d
->mask_buf
[i
]);
155 dev_err(d
->map
->dev
, "Failed to ack 0x%x: %d\n",
160 for (i
= 0; i
< d
->chip
->num_type_reg
; i
++) {
161 if (!d
->type_buf_def
[i
])
163 reg
= d
->chip
->type_base
+
164 (i
* map
->reg_stride
* d
->type_reg_stride
);
165 if (d
->chip
->type_invert
)
166 ret
= regmap_irq_update_bits(d
, reg
,
167 d
->type_buf_def
[i
], ~d
->type_buf
[i
]);
169 ret
= regmap_irq_update_bits(d
, reg
,
170 d
->type_buf_def
[i
], d
->type_buf
[i
]);
172 dev_err(d
->map
->dev
, "Failed to sync type in %x\n",
176 if (d
->chip
->runtime_pm
)
177 pm_runtime_put(map
->dev
);
179 /* If we've changed our wakeup count propagate it to the parent */
180 if (d
->wake_count
< 0)
181 for (i
= d
->wake_count
; i
< 0; i
++)
182 irq_set_irq_wake(d
->irq
, 0);
183 else if (d
->wake_count
> 0)
184 for (i
= 0; i
< d
->wake_count
; i
++)
185 irq_set_irq_wake(d
->irq
, 1);
189 mutex_unlock(&d
->lock
);
192 static void regmap_irq_enable(struct irq_data
*data
)
194 struct regmap_irq_chip_data
*d
= irq_data_get_irq_chip_data(data
);
195 struct regmap
*map
= d
->map
;
196 const struct regmap_irq
*irq_data
= irq_to_regmap_irq(d
, data
->hwirq
);
198 d
->mask_buf
[irq_data
->reg_offset
/ map
->reg_stride
] &= ~irq_data
->mask
;
201 static void regmap_irq_disable(struct irq_data
*data
)
203 struct regmap_irq_chip_data
*d
= irq_data_get_irq_chip_data(data
);
204 struct regmap
*map
= d
->map
;
205 const struct regmap_irq
*irq_data
= irq_to_regmap_irq(d
, data
->hwirq
);
207 d
->mask_buf
[irq_data
->reg_offset
/ map
->reg_stride
] |= irq_data
->mask
;
210 static int regmap_irq_set_type(struct irq_data
*data
, unsigned int type
)
212 struct regmap_irq_chip_data
*d
= irq_data_get_irq_chip_data(data
);
213 struct regmap
*map
= d
->map
;
214 const struct regmap_irq
*irq_data
= irq_to_regmap_irq(d
, data
->hwirq
);
215 int reg
= irq_data
->type_reg_offset
/ map
->reg_stride
;
217 if (!(irq_data
->type_rising_mask
| irq_data
->type_falling_mask
))
220 d
->type_buf
[reg
] &= ~(irq_data
->type_falling_mask
|
221 irq_data
->type_rising_mask
);
223 case IRQ_TYPE_EDGE_FALLING
:
224 d
->type_buf
[reg
] |= irq_data
->type_falling_mask
;
227 case IRQ_TYPE_EDGE_RISING
:
228 d
->type_buf
[reg
] |= irq_data
->type_rising_mask
;
231 case IRQ_TYPE_EDGE_BOTH
:
232 d
->type_buf
[reg
] |= (irq_data
->type_falling_mask
|
233 irq_data
->type_rising_mask
);
242 static int regmap_irq_set_wake(struct irq_data
*data
, unsigned int on
)
244 struct regmap_irq_chip_data
*d
= irq_data_get_irq_chip_data(data
);
245 struct regmap
*map
= d
->map
;
246 const struct regmap_irq
*irq_data
= irq_to_regmap_irq(d
, data
->hwirq
);
250 d
->wake_buf
[irq_data
->reg_offset
/ map
->reg_stride
]
255 d
->wake_buf
[irq_data
->reg_offset
/ map
->reg_stride
]
263 static const struct irq_chip regmap_irq_chip
= {
264 .irq_bus_lock
= regmap_irq_lock
,
265 .irq_bus_sync_unlock
= regmap_irq_sync_unlock
,
266 .irq_disable
= regmap_irq_disable
,
267 .irq_enable
= regmap_irq_enable
,
268 .irq_set_type
= regmap_irq_set_type
,
269 .irq_set_wake
= regmap_irq_set_wake
,
272 static irqreturn_t
regmap_irq_thread(int irq
, void *d
)
274 struct regmap_irq_chip_data
*data
= d
;
275 const struct regmap_irq_chip
*chip
= data
->chip
;
276 struct regmap
*map
= data
->map
;
278 bool handled
= false;
281 if (chip
->handle_pre_irq
)
282 chip
->handle_pre_irq(chip
->irq_drv_data
);
284 if (chip
->runtime_pm
) {
285 ret
= pm_runtime_get_sync(map
->dev
);
287 dev_err(map
->dev
, "IRQ thread failed to resume: %d\n",
289 pm_runtime_put(map
->dev
);
295 * Read in the statuses, using a single bulk read if possible
296 * in order to reduce the I/O overheads.
298 if (!map
->use_single_read
&& map
->reg_stride
== 1 &&
299 data
->irq_reg_stride
== 1) {
300 u8
*buf8
= data
->status_reg_buf
;
301 u16
*buf16
= data
->status_reg_buf
;
302 u32
*buf32
= data
->status_reg_buf
;
304 BUG_ON(!data
->status_reg_buf
);
306 ret
= regmap_bulk_read(map
, chip
->status_base
,
307 data
->status_reg_buf
,
310 dev_err(map
->dev
, "Failed to read IRQ status: %d\n",
315 for (i
= 0; i
< data
->chip
->num_regs
; i
++) {
316 switch (map
->format
.val_bytes
) {
318 data
->status_buf
[i
] = buf8
[i
];
321 data
->status_buf
[i
] = buf16
[i
];
324 data
->status_buf
[i
] = buf32
[i
];
333 for (i
= 0; i
< data
->chip
->num_regs
; i
++) {
334 ret
= regmap_read(map
, chip
->status_base
+
336 * data
->irq_reg_stride
),
337 &data
->status_buf
[i
]);
341 "Failed to read IRQ status: %d\n",
343 if (chip
->runtime_pm
)
344 pm_runtime_put(map
->dev
);
351 * Ignore masked IRQs and ack if we need to; we ack early so
352 * there is no race between handling and acknowleding the
353 * interrupt. We assume that typically few of the interrupts
354 * will fire simultaneously so don't worry about overhead from
355 * doing a write per register.
357 for (i
= 0; i
< data
->chip
->num_regs
; i
++) {
358 data
->status_buf
[i
] &= ~data
->mask_buf
[i
];
360 if (data
->status_buf
[i
] && (chip
->ack_base
|| chip
->use_ack
)) {
361 reg
= chip
->ack_base
+
362 (i
* map
->reg_stride
* data
->irq_reg_stride
);
363 ret
= regmap_write(map
, reg
, data
->status_buf
[i
]);
365 dev_err(map
->dev
, "Failed to ack 0x%x: %d\n",
370 for (i
= 0; i
< chip
->num_irqs
; i
++) {
371 if (data
->status_buf
[chip
->irqs
[i
].reg_offset
/
372 map
->reg_stride
] & chip
->irqs
[i
].mask
) {
373 handle_nested_irq(irq_find_mapping(data
->domain
, i
));
378 if (chip
->runtime_pm
)
379 pm_runtime_put(map
->dev
);
382 if (chip
->handle_post_irq
)
383 chip
->handle_post_irq(chip
->irq_drv_data
);
391 static int regmap_irq_map(struct irq_domain
*h
, unsigned int virq
,
394 struct regmap_irq_chip_data
*data
= h
->host_data
;
396 irq_set_chip_data(virq
, data
);
397 irq_set_chip(virq
, &data
->irq_chip
);
398 irq_set_nested_thread(virq
, 1);
399 irq_set_parent(virq
, data
->irq
);
400 irq_set_noprobe(virq
);
405 static const struct irq_domain_ops regmap_domain_ops
= {
406 .map
= regmap_irq_map
,
407 .xlate
= irq_domain_xlate_onetwocell
,
411 * regmap_add_irq_chip() - Use standard regmap IRQ controller handling
413 * @map: The regmap for the device.
414 * @irq: The IRQ the device uses to signal interrupts.
415 * @irq_flags: The IRQF_ flags to use for the primary interrupt.
416 * @irq_base: Allocate at specific IRQ number if irq_base > 0.
417 * @chip: Configuration for the interrupt controller.
418 * @data: Runtime data structure for the controller, allocated on success.
420 * Returns 0 on success or an errno on failure.
422 * In order for this to be efficient the chip really should use a
423 * register cache. The chip driver is responsible for restoring the
424 * register values used by the IRQ controller over suspend and resume.
426 int regmap_add_irq_chip(struct regmap
*map
, int irq
, int irq_flags
,
427 int irq_base
, const struct regmap_irq_chip
*chip
,
428 struct regmap_irq_chip_data
**data
)
430 struct regmap_irq_chip_data
*d
;
436 if (chip
->num_regs
<= 0)
439 for (i
= 0; i
< chip
->num_irqs
; i
++) {
440 if (chip
->irqs
[i
].reg_offset
% map
->reg_stride
)
442 if (chip
->irqs
[i
].reg_offset
/ map
->reg_stride
>=
448 irq_base
= irq_alloc_descs(irq_base
, 0, chip
->num_irqs
, 0);
450 dev_warn(map
->dev
, "Failed to allocate IRQs: %d\n",
456 d
= kzalloc(sizeof(*d
), GFP_KERNEL
);
460 d
->status_buf
= kcalloc(chip
->num_regs
, sizeof(unsigned int),
465 d
->mask_buf
= kcalloc(chip
->num_regs
, sizeof(unsigned int),
470 d
->mask_buf_def
= kcalloc(chip
->num_regs
, sizeof(unsigned int),
472 if (!d
->mask_buf_def
)
475 if (chip
->wake_base
) {
476 d
->wake_buf
= kcalloc(chip
->num_regs
, sizeof(unsigned int),
482 if (chip
->num_type_reg
) {
483 d
->type_buf_def
= kcalloc(chip
->num_type_reg
,
484 sizeof(unsigned int), GFP_KERNEL
);
485 if (!d
->type_buf_def
)
488 d
->type_buf
= kcalloc(chip
->num_type_reg
, sizeof(unsigned int),
494 d
->irq_chip
= regmap_irq_chip
;
495 d
->irq_chip
.name
= chip
->name
;
499 d
->irq_base
= irq_base
;
501 if (chip
->irq_reg_stride
)
502 d
->irq_reg_stride
= chip
->irq_reg_stride
;
504 d
->irq_reg_stride
= 1;
506 if (chip
->type_reg_stride
)
507 d
->type_reg_stride
= chip
->type_reg_stride
;
509 d
->type_reg_stride
= 1;
511 if (!map
->use_single_read
&& map
->reg_stride
== 1 &&
512 d
->irq_reg_stride
== 1) {
513 d
->status_reg_buf
= kmalloc_array(chip
->num_regs
,
514 map
->format
.val_bytes
,
516 if (!d
->status_reg_buf
)
520 mutex_init(&d
->lock
);
522 for (i
= 0; i
< chip
->num_irqs
; i
++)
523 d
->mask_buf_def
[chip
->irqs
[i
].reg_offset
/ map
->reg_stride
]
524 |= chip
->irqs
[i
].mask
;
526 /* Mask all the interrupts by default */
527 for (i
= 0; i
< chip
->num_regs
; i
++) {
528 d
->mask_buf
[i
] = d
->mask_buf_def
[i
];
529 reg
= chip
->mask_base
+
530 (i
* map
->reg_stride
* d
->irq_reg_stride
);
531 if (chip
->mask_invert
)
532 ret
= regmap_irq_update_bits(d
, reg
,
533 d
->mask_buf
[i
], ~d
->mask_buf
[i
]);
534 else if (d
->chip
->unmask_base
) {
535 unmask_offset
= d
->chip
->unmask_base
-
537 ret
= regmap_irq_update_bits(d
,
542 ret
= regmap_irq_update_bits(d
, reg
,
543 d
->mask_buf
[i
], d
->mask_buf
[i
]);
545 dev_err(map
->dev
, "Failed to set masks in 0x%x: %d\n",
550 if (!chip
->init_ack_masked
)
553 /* Ack masked but set interrupts */
554 reg
= chip
->status_base
+
555 (i
* map
->reg_stride
* d
->irq_reg_stride
);
556 ret
= regmap_read(map
, reg
, &d
->status_buf
[i
]);
558 dev_err(map
->dev
, "Failed to read IRQ status: %d\n",
563 if (d
->status_buf
[i
] && (chip
->ack_base
|| chip
->use_ack
)) {
564 reg
= chip
->ack_base
+
565 (i
* map
->reg_stride
* d
->irq_reg_stride
);
566 if (chip
->ack_invert
)
567 ret
= regmap_write(map
, reg
,
568 ~(d
->status_buf
[i
] & d
->mask_buf
[i
]));
570 ret
= regmap_write(map
, reg
,
571 d
->status_buf
[i
] & d
->mask_buf
[i
]);
573 dev_err(map
->dev
, "Failed to ack 0x%x: %d\n",
580 /* Wake is disabled by default */
582 for (i
= 0; i
< chip
->num_regs
; i
++) {
583 d
->wake_buf
[i
] = d
->mask_buf_def
[i
];
584 reg
= chip
->wake_base
+
585 (i
* map
->reg_stride
* d
->irq_reg_stride
);
587 if (chip
->wake_invert
)
588 ret
= regmap_irq_update_bits(d
, reg
,
592 ret
= regmap_irq_update_bits(d
, reg
,
596 dev_err(map
->dev
, "Failed to set masks in 0x%x: %d\n",
603 if (chip
->num_type_reg
) {
604 for (i
= 0; i
< chip
->num_irqs
; i
++) {
605 reg
= chip
->irqs
[i
].type_reg_offset
/ map
->reg_stride
;
606 d
->type_buf_def
[reg
] |= chip
->irqs
[i
].type_rising_mask
|
607 chip
->irqs
[i
].type_falling_mask
;
609 for (i
= 0; i
< chip
->num_type_reg
; ++i
) {
610 if (!d
->type_buf_def
[i
])
613 reg
= chip
->type_base
+
614 (i
* map
->reg_stride
* d
->type_reg_stride
);
615 if (chip
->type_invert
)
616 ret
= regmap_irq_update_bits(d
, reg
,
617 d
->type_buf_def
[i
], 0xFF);
619 ret
= regmap_irq_update_bits(d
, reg
,
620 d
->type_buf_def
[i
], 0x0);
623 "Failed to set type in 0x%x: %x\n",
631 d
->domain
= irq_domain_add_legacy(map
->dev
->of_node
,
632 chip
->num_irqs
, irq_base
, 0,
633 ®map_domain_ops
, d
);
635 d
->domain
= irq_domain_add_linear(map
->dev
->of_node
,
637 ®map_domain_ops
, d
);
639 dev_err(map
->dev
, "Failed to create IRQ domain\n");
644 ret
= request_threaded_irq(irq
, NULL
, regmap_irq_thread
,
645 irq_flags
| IRQF_ONESHOT
,
648 dev_err(map
->dev
, "Failed to request IRQ %d for %s: %d\n",
649 irq
, chip
->name
, ret
);
658 /* Should really dispose of the domain but... */
661 kfree(d
->type_buf_def
);
663 kfree(d
->mask_buf_def
);
665 kfree(d
->status_buf
);
666 kfree(d
->status_reg_buf
);
670 EXPORT_SYMBOL_GPL(regmap_add_irq_chip
);
673 * regmap_del_irq_chip() - Stop interrupt handling for a regmap IRQ chip
675 * @irq: Primary IRQ for the device
676 * @d: ®map_irq_chip_data allocated by regmap_add_irq_chip()
678 * This function also disposes of all mapped IRQs on the chip.
680 void regmap_del_irq_chip(int irq
, struct regmap_irq_chip_data
*d
)
690 /* Dispose all virtual irq from irq domain before removing it */
691 for (hwirq
= 0; hwirq
< d
->chip
->num_irqs
; hwirq
++) {
692 /* Ignore hwirq if holes in the IRQ list */
693 if (!d
->chip
->irqs
[hwirq
].mask
)
697 * Find the virtual irq of hwirq on chip and if it is
698 * there then dispose it
700 virq
= irq_find_mapping(d
->domain
, hwirq
);
702 irq_dispose_mapping(virq
);
705 irq_domain_remove(d
->domain
);
707 kfree(d
->type_buf_def
);
709 kfree(d
->mask_buf_def
);
711 kfree(d
->status_reg_buf
);
712 kfree(d
->status_buf
);
715 EXPORT_SYMBOL_GPL(regmap_del_irq_chip
);
717 static void devm_regmap_irq_chip_release(struct device
*dev
, void *res
)
719 struct regmap_irq_chip_data
*d
= *(struct regmap_irq_chip_data
**)res
;
721 regmap_del_irq_chip(d
->irq
, d
);
724 static int devm_regmap_irq_chip_match(struct device
*dev
, void *res
, void *data
)
727 struct regmap_irq_chip_data
**r
= res
;
737 * devm_regmap_add_irq_chip() - Resource manager regmap_add_irq_chip()
739 * @dev: The device pointer on which irq_chip belongs to.
740 * @map: The regmap for the device.
741 * @irq: The IRQ the device uses to signal interrupts
742 * @irq_flags: The IRQF_ flags to use for the primary interrupt.
743 * @irq_base: Allocate at specific IRQ number if irq_base > 0.
744 * @chip: Configuration for the interrupt controller.
745 * @data: Runtime data structure for the controller, allocated on success
747 * Returns 0 on success or an errno on failure.
749 * The ®map_irq_chip_data will be automatically released when the device is
752 int devm_regmap_add_irq_chip(struct device
*dev
, struct regmap
*map
, int irq
,
753 int irq_flags
, int irq_base
,
754 const struct regmap_irq_chip
*chip
,
755 struct regmap_irq_chip_data
**data
)
757 struct regmap_irq_chip_data
**ptr
, *d
;
760 ptr
= devres_alloc(devm_regmap_irq_chip_release
, sizeof(*ptr
),
765 ret
= regmap_add_irq_chip(map
, irq
, irq_flags
, irq_base
,
773 devres_add(dev
, ptr
);
777 EXPORT_SYMBOL_GPL(devm_regmap_add_irq_chip
);
780 * devm_regmap_del_irq_chip() - Resource managed regmap_del_irq_chip()
782 * @dev: Device for which which resource was allocated.
783 * @irq: Primary IRQ for the device.
784 * @data: ®map_irq_chip_data allocated by regmap_add_irq_chip().
786 * A resource managed version of regmap_del_irq_chip().
788 void devm_regmap_del_irq_chip(struct device
*dev
, int irq
,
789 struct regmap_irq_chip_data
*data
)
793 WARN_ON(irq
!= data
->irq
);
794 rc
= devres_release(dev
, devm_regmap_irq_chip_release
,
795 devm_regmap_irq_chip_match
, data
);
800 EXPORT_SYMBOL_GPL(devm_regmap_del_irq_chip
);
803 * regmap_irq_chip_get_base() - Retrieve interrupt base for a regmap IRQ chip
805 * @data: regmap irq controller to operate on.
807 * Useful for drivers to request their own IRQs.
809 int regmap_irq_chip_get_base(struct regmap_irq_chip_data
*data
)
811 WARN_ON(!data
->irq_base
);
812 return data
->irq_base
;
814 EXPORT_SYMBOL_GPL(regmap_irq_chip_get_base
);
817 * regmap_irq_get_virq() - Map an interrupt on a chip to a virtual IRQ
819 * @data: regmap irq controller to operate on.
820 * @irq: index of the interrupt requested in the chip IRQs.
822 * Useful for drivers to request their own IRQs.
824 int regmap_irq_get_virq(struct regmap_irq_chip_data
*data
, int irq
)
826 /* Handle holes in the IRQ list */
827 if (!data
->chip
->irqs
[irq
].mask
)
830 return irq_create_mapping(data
->domain
, irq
);
832 EXPORT_SYMBOL_GPL(regmap_irq_get_virq
);
835 * regmap_irq_get_domain() - Retrieve the irq_domain for the chip
837 * @data: regmap_irq controller to operate on.
839 * Useful for drivers to request their own IRQs and for integration
840 * with subsystems. For ease of integration NULL is accepted as a
841 * domain, allowing devices to just call this even if no domain is
844 struct irq_domain
*regmap_irq_get_domain(struct regmap_irq_chip_data
*data
)
851 EXPORT_SYMBOL_GPL(regmap_irq_get_domain
);