summaryrefslogtreecommitdiffstats
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorGuru Das Srinagesh <gurus@codeaurora.org>2021-03-24 12:28:53 -0700
committerMark Brown <broonie@kernel.org>2021-03-31 13:53:37 +0100
commit4c5014456305482412b35a081ca0fb4fefd69764 (patch)
treee5e596de5cdffb3061d93aa9ba8882b8be2a6219 /include/linux/regmap.h
parent1066cfbdfa3f5c401870fad577fe63d1171a5bcd (diff)
downloadlinux-4c5014456305482412b35a081ca0fb4fefd69764.tar.bz2
regmap-irq: Introduce virtual regs to handle more config regs
Add "virtual" registers support to handle any irq configuration registers in addition to the ones the framework currently supports (status, mask, unmask, wake, type and ack). These are non-standard registers that further configure irq type on some devices, so enable the framework to add a variable number of them. Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org> Link: https://lore.kernel.org/r/a1787067004b0e11cb960319082764397469215a.1616613838.git.gurus@codeaurora.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 18910bd809f7..97ec73383e47 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -1393,6 +1393,7 @@ struct regmap_irq_sub_irq_map {
* Using zero value is possible with @use_ack bit.
* @wake_base: Base address for wake enables. If zero unsupported.
* @type_base: Base address for irq type. If zero unsupported.
+ * @virt_reg_base: Base addresses for extra config regs.
* @irq_reg_stride: Stride to use for chips where registers are not contiguous.
* @init_ack_masked: Ack all masked interrupts once during initalization.
* @mask_invert: Inverted mask register: cleared bits are masked out.
@@ -1417,6 +1418,8 @@ struct regmap_irq_sub_irq_map {
* assigned based on the index in the array of the interrupt.
* @num_irqs: Number of descriptors.
* @num_type_reg: Number of type registers.
+ * @num_virt_regs: Number of non-standard irq configuration registers.
+ * If zero unsupported.
* @type_reg_stride: Stride to use for chips where type registers are not
* contiguous.
* @handle_pre_irq: Driver specific callback to handle interrupt from device
@@ -1444,6 +1447,7 @@ struct regmap_irq_chip {
unsigned int ack_base;
unsigned int wake_base;
unsigned int type_base;
+ unsigned int *virt_reg_base;
unsigned int irq_reg_stride;
bool mask_writeonly:1;
bool init_ack_masked:1;
@@ -1464,6 +1468,7 @@ struct regmap_irq_chip {
int num_irqs;
int num_type_reg;
+ int num_virt_regs;
unsigned int type_reg_stride;
int (*handle_pre_irq)(void *irq_drv_data);