lkml.org 
[lkml]   [2021]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH v3 3/3] regmap-irq: Modify type_buf handling for IRQ_TYPE_LEVEL_*
Date
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
\
 
 \ /
  Last update: 2021-03-11 01:41    [W:1.922 / U:1.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site