Messages in this thread Patch in this message | | | From | Guru Das Srinagesh <> | Subject | [RFC PATCH v3 3/3] regmap-irq: Modify type_buf handling for IRQ_TYPE_LEVEL_* | Date | Wed, 10 Mar 2021 16:39:54 -0800 |
| |
In order to configure LEVEL_HIGH and LEVEL_LOW for QCOM's type registers, the bit corresponding to the interrupt must be cleared.
Therefore, in QCOM's case, the type_*_val are all to be configured as BIT() masks.
Quite clearly, this is a fundamental change, and am looking for feedback on whether and how this may be handled in a generic manner.
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org> --- drivers/base/regmap/regmap-irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index cb13855..c70ef90 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -327,11 +327,11 @@ static int regmap_irq_set_type(struct irq_data *data, unsigned int type) break; case IRQ_TYPE_LEVEL_HIGH: - d->type_buf[reg] |= t->type_level_high_val; + d->type_buf[reg] &= t->type_level_high_val; break; case IRQ_TYPE_LEVEL_LOW: - d->type_buf[reg] |= t->type_level_low_val; + d->type_buf[reg] &= t->type_level_low_val; break; default: return -EINVAL; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
| |