提交 6936e1f8 编写于 作者: P Patrice Chotard 提交者: Lee Jones

gpio: stmpe: Write int status register only when needed

On STMPE801/1801 datasheets, it's mentionned writing
in interrupt status register has no effect, bits are
cleared when reading.
Signed-off-by: NAmelie DELAUNAY <amelie.delaunay@st.com>
Signed-off-by: NPatrice Chotard <patrice.chotard@st.com>
Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
上级 287849cb
...@@ -371,12 +371,16 @@ static irqreturn_t stmpe_gpio_irq(int irq, void *dev) ...@@ -371,12 +371,16 @@ static irqreturn_t stmpe_gpio_irq(int irq, void *dev)
stat &= ~(1 << bit); stat &= ~(1 << bit);
} }
stmpe_reg_write(stmpe, statmsbreg + i, status[i]); /*
* interrupt status register write has no effect on
/* Edge detect register is not present on 801 and 1801 */ * 801 and 1801, bits are cleared when read.
if (stmpe->partnum != STMPE801 || stmpe->partnum != STMPE1801) * Edge detect register is not present on 801 and 1801
*/
if (stmpe->partnum != STMPE801 || stmpe->partnum != STMPE1801) {
stmpe_reg_write(stmpe, statmsbreg + i, status[i]);
stmpe_reg_write(stmpe, stmpe->regs[STMPE_IDX_GPEDR_MSB] stmpe_reg_write(stmpe, stmpe->regs[STMPE_IDX_GPEDR_MSB]
+ i, status[i]); + i, status[i]);
}
} }
return IRQ_HANDLED; return IRQ_HANDLED;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册