diff options
author | Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com> | 2021-05-26 14:52:00 +0800 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2021-06-01 16:44:00 +0100 |
commit | d8570c182f56ca52c98734732fb9a331f7c23f9a (patch) | |
tree | 525e073b8e99787dec6bb7019a822543dfa3bd5f /include/linux | |
parent | 6efb943b8616ec53a5e444193dccf1af9ad627b5 (diff) |
mfd: mt6358: Refine interrupt code
This patch refines the interrupt related code to support new chips.
Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mfd/mt6358/core.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/include/linux/mfd/mt6358/core.h b/include/linux/mfd/mt6358/core.h index c5a11b7458d4..68578e2019b0 100644 --- a/include/linux/mfd/mt6358/core.h +++ b/include/linux/mfd/mt6358/core.h @@ -6,12 +6,9 @@ #ifndef __MFD_MT6358_CORE_H__ #define __MFD_MT6358_CORE_H__ -#define MT6358_REG_WIDTH 16 - struct irq_top_t { int hwirq_base; unsigned int num_int_regs; - unsigned int num_int_bits; unsigned int en_reg; unsigned int en_reg_shift; unsigned int sta_reg; @@ -25,6 +22,7 @@ struct pmic_irq_data { unsigned short top_int_status_reg; bool *enable_hwirq; bool *cache_hwirq; + const struct irq_top_t *pmic_ints; }; enum mt6358_irq_top_status_shift { @@ -146,8 +144,8 @@ enum mt6358_irq_numbers { { \ .hwirq_base = MT6358_IRQ_##sp##_BASE, \ .num_int_regs = \ - ((MT6358_IRQ_##sp##_BITS - 1) / MT6358_REG_WIDTH) + 1, \ - .num_int_bits = MT6358_IRQ_##sp##_BITS, \ + ((MT6358_IRQ_##sp##_BITS - 1) / \ + MTK_PMIC_REG_WIDTH) + 1, \ .en_reg = MT6358_##sp##_TOP_INT_CON0, \ .en_reg_shift = 0x6, \ .sta_reg = MT6358_##sp##_TOP_INT_STATUS0, \ |