From: Lee Jones <lee.jones@linaro.org>
To: patrice.chotard@st.com
Cc: gnurou@gmail.com, amelie.delaunay@st.com, vireshk@kernel.org,
linus.walleij@linaro.org, linux-gpio@vger.kernel.org,
thierry.reding@gmail.com, kernel@pengutronix.de,
dinguyen@opensource.altera.com, shawnguo@kernel.org,
shiraz.linux.kernel@gmail.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RESEND v2 04/10] gpio: stmpe: write int status register only when needed
Date: Wed, 10 Aug 2016 09:29:22 +0100 [thread overview]
Message-ID: <20160810082922.GJ1581@dell> (raw)
In-Reply-To: <1470814755-19447-5-git-send-email-patrice.chotard@st.com>
On Wed, 10 Aug 2016, patrice.chotard@st.com wrote:
> From: Patrice Chotard <patrice.chotard@st.com>
>
> On STMPE801/1801 datasheets, it's mentionned writing
> in interrupt status register has no effect, bits are
> cleared when reading.
>
> Signed-off-by: Amelie DELAUNAY <amelie.delaunay@st.com>
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/gpio/gpio-stmpe.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
Applied, thanks.
> diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c
> index bfc918c..2789bdc 100644
> --- a/drivers/gpio/gpio-stmpe.c
> +++ b/drivers/gpio/gpio-stmpe.c
> @@ -355,12 +355,16 @@ static irqreturn_t stmpe_gpio_irq(int irq, void *dev)
> stat &= ~(1 << bit);
> }
>
> - stmpe_reg_write(stmpe, statmsbreg + i, status[i]);
> -
> - /* Edge detect register is not present on 801 and 1801 */
> - if (stmpe->partnum != STMPE801 || stmpe->partnum != STMPE1801)
> + /*
> + * interrupt status register write has no effect on
> + * 801 and 1801, bits are cleared when read.
> + * 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]
> + i, status[i]);
> + }
> }
>
> return IRQ_HANDLED;
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2016-08-10 8:29 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-10 7:39 [RESEND v2 00/10] STMPE fixes/rework and add STMPE1600 support patrice.chotard
2016-08-10 7:39 ` [RESEND v2 01/10] mfd: stmpe: Add STMPE_IDX_SYS_CTRL/2 enum patrice.chotard
2016-08-10 8:28 ` Lee Jones
2016-08-10 7:39 ` [RESEND v2 02/10] mfd: stmpe: Add reset support for all STMPE variant patrice.chotard
2016-08-10 8:28 ` Lee Jones
2016-08-10 7:39 ` [RESEND v2 03/10] gpio: stmpe: fix edge and rising/falling edge detection patrice.chotard
2016-08-10 8:29 ` Lee Jones
2016-08-10 7:39 ` [RESEND v2 04/10] gpio: stmpe: write int status register only when needed patrice.chotard
2016-08-10 8:29 ` Lee Jones [this message]
2016-08-10 7:39 ` [RESEND v2 05/10] mfd: stmpe: use generic bit mask name patrice.chotard
2016-08-10 8:29 ` Lee Jones
2016-08-10 7:39 ` [RESEND v2 06/10] mfd: stmpe: rework registers access patrice.chotard
2016-08-10 8:29 ` Lee Jones
2016-08-10 7:39 ` [RESEND v2 07/10] gpio: " patrice.chotard
2016-08-10 8:29 ` Lee Jones
2016-08-10 7:39 ` [RESEND v2 08/10] Documentation: dt: add stmpe1600 compatible string to stmpe mfd patrice.chotard
2016-08-10 8:30 ` Lee Jones
2016-08-10 7:39 ` [RESEND v2 09/10] mfd: Add STMPE1600 support patrice.chotard
2016-08-10 8:30 ` Lee Jones
2016-08-10 7:39 ` [RESEND v2 10/10] gpio: stmpe: " patrice.chotard
2016-08-10 8:30 ` Lee Jones
2016-08-10 8:42 ` [GIT PULL] Immutable branch between MFD and GPIO due for v4.9 Lee Jones
2016-08-11 12:07 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160810082922.GJ1581@dell \
--to=lee.jones@linaro.org \
--cc=amelie.delaunay@st.com \
--cc=dinguyen@opensource.altera.com \
--cc=gnurou@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=patrice.chotard@st.com \
--cc=shawnguo@kernel.org \
--cc=shiraz.linux.kernel@gmail.com \
--cc=thierry.reding@gmail.com \
--cc=vireshk@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).