From: <patrice.chotard@st.com> To: lee.jones@linaro.org, linus.walleij@linaro.org, linux-gpio@vger.kernel.org Cc: gnurou@gmail.com, amelie.delaunay@st.com, vireshk@kernel.org, Patrice Chotard <patrice.chotard@st.com>, 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: [RESEND v2 05/10] mfd: stmpe: use generic bit mask name Date: Wed, 10 Aug 2016 09:39:10 +0200 [thread overview] Message-ID: <1470814755-19447-6-git-send-email-patrice.chotard@st.com> (raw) In-Reply-To: <1470814755-19447-1-git-send-email-patrice.chotard@st.com> From: Patrice Chotard <patrice.chotard@st.com> In order to prepare the ground to STMPE1600, as STMPE1600's SYS_CTRL register has the same layout as STMPE801 variant, unify STMPExxx_REG_SYS_CTRL_RESET/INT_EN/INT_HI bit masks to more generic STMPE_SYS_CTRL_RESET/INT_EN/INT_HI Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Lee Jones <lee.jones@linaro.org> --- drivers/mfd/stmpe.c | 4 ++-- drivers/mfd/stmpe.h | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c index af682d0..2556463 100644 --- a/drivers/mfd/stmpe.c +++ b/drivers/mfd/stmpe.c @@ -1089,7 +1089,7 @@ static int stmpe_chip_init(struct stmpe *stmpe) if (stmpe->irq >= 0) { if (id == STMPE801_ID) - icr = STMPE801_REG_SYS_CTRL_INT_EN; + icr = STMPE_SYS_CTRL_INT_EN; else icr = STMPE_ICR_LSB_GIM; @@ -1103,7 +1103,7 @@ static int stmpe_chip_init(struct stmpe *stmpe) if (irq_trigger == IRQF_TRIGGER_RISING || irq_trigger == IRQF_TRIGGER_HIGH) { if (id == STMPE801_ID) - icr |= STMPE801_REG_SYS_CTRL_INT_HI; + icr |= STMPE_SYS_CTRL_INT_HI; else icr |= STMPE_ICR_LSB_HIGH; } diff --git a/drivers/mfd/stmpe.h b/drivers/mfd/stmpe.h index 4ae343d..4ba1123 100644 --- a/drivers/mfd/stmpe.h +++ b/drivers/mfd/stmpe.h @@ -105,6 +105,8 @@ int stmpe_remove(struct stmpe *stmpe); #define STMPE_ICR_LSB_GIM (1 << 0) #define STMPE_SYS_CTRL_RESET (1 << 7) +#define STMPE_SYS_CTRL_INT_EN (1 << 2) +#define STMPE_SYS_CTRL_INT_HI (1 << 0) /* * STMPE801 @@ -121,10 +123,6 @@ int stmpe_remove(struct stmpe *stmpe); #define STMPE801_REG_GPIO_SET_PIN 0x11 #define STMPE801_REG_GPIO_DIR 0x12 -#define STMPE801_REG_SYS_CTRL_RESET (1 << 7) -#define STMPE801_REG_SYS_CTRL_INT_EN (1 << 2) -#define STMPE801_REG_SYS_CTRL_INT_HI (1 << 0) - /* * STMPE811 */ -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: patrice.chotard@st.com (patrice.chotard at st.com) To: linux-arm-kernel@lists.infradead.org Subject: [RESEND v2 05/10] mfd: stmpe: use generic bit mask name Date: Wed, 10 Aug 2016 09:39:10 +0200 [thread overview] Message-ID: <1470814755-19447-6-git-send-email-patrice.chotard@st.com> (raw) In-Reply-To: <1470814755-19447-1-git-send-email-patrice.chotard@st.com> From: Patrice Chotard <patrice.chotard@st.com> In order to prepare the ground to STMPE1600, as STMPE1600's SYS_CTRL register has the same layout as STMPE801 variant, unify STMPExxx_REG_SYS_CTRL_RESET/INT_EN/INT_HI bit masks to more generic STMPE_SYS_CTRL_RESET/INT_EN/INT_HI Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Lee Jones <lee.jones@linaro.org> --- drivers/mfd/stmpe.c | 4 ++-- drivers/mfd/stmpe.h | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c index af682d0..2556463 100644 --- a/drivers/mfd/stmpe.c +++ b/drivers/mfd/stmpe.c @@ -1089,7 +1089,7 @@ static int stmpe_chip_init(struct stmpe *stmpe) if (stmpe->irq >= 0) { if (id == STMPE801_ID) - icr = STMPE801_REG_SYS_CTRL_INT_EN; + icr = STMPE_SYS_CTRL_INT_EN; else icr = STMPE_ICR_LSB_GIM; @@ -1103,7 +1103,7 @@ static int stmpe_chip_init(struct stmpe *stmpe) if (irq_trigger == IRQF_TRIGGER_RISING || irq_trigger == IRQF_TRIGGER_HIGH) { if (id == STMPE801_ID) - icr |= STMPE801_REG_SYS_CTRL_INT_HI; + icr |= STMPE_SYS_CTRL_INT_HI; else icr |= STMPE_ICR_LSB_HIGH; } diff --git a/drivers/mfd/stmpe.h b/drivers/mfd/stmpe.h index 4ae343d..4ba1123 100644 --- a/drivers/mfd/stmpe.h +++ b/drivers/mfd/stmpe.h @@ -105,6 +105,8 @@ int stmpe_remove(struct stmpe *stmpe); #define STMPE_ICR_LSB_GIM (1 << 0) #define STMPE_SYS_CTRL_RESET (1 << 7) +#define STMPE_SYS_CTRL_INT_EN (1 << 2) +#define STMPE_SYS_CTRL_INT_HI (1 << 0) /* * STMPE801 @@ -121,10 +123,6 @@ int stmpe_remove(struct stmpe *stmpe); #define STMPE801_REG_GPIO_SET_PIN 0x11 #define STMPE801_REG_GPIO_DIR 0x12 -#define STMPE801_REG_SYS_CTRL_RESET (1 << 7) -#define STMPE801_REG_SYS_CTRL_INT_EN (1 << 2) -#define STMPE801_REG_SYS_CTRL_INT_HI (1 << 0) - /* * STMPE811 */ -- 1.9.1
next prev parent reply other threads:[~2016-08-10 7:39 UTC|newest] Thread overview: 46+ 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 ` patrice.chotard at st.com 2016-08-10 7:39 ` [RESEND v2 01/10] mfd: stmpe: Add STMPE_IDX_SYS_CTRL/2 enum patrice.chotard 2016-08-10 7:39 ` patrice.chotard at st.com 2016-08-10 8:28 ` Lee Jones 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 7:39 ` patrice.chotard at st.com 2016-08-10 8:28 ` Lee Jones 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 7:39 ` patrice.chotard at st.com 2016-08-10 8:29 ` Lee Jones 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 7:39 ` patrice.chotard at st.com 2016-08-10 8:29 ` Lee Jones 2016-08-10 8:29 ` Lee Jones 2016-08-10 7:39 ` patrice.chotard [this message] 2016-08-10 7:39 ` [RESEND v2 05/10] mfd: stmpe: use generic bit mask name patrice.chotard at st.com 2016-08-10 8:29 ` Lee Jones 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 7:39 ` patrice.chotard at st.com 2016-08-10 8:29 ` Lee Jones 2016-08-10 8:29 ` Lee Jones 2016-08-10 7:39 ` [RESEND v2 07/10] gpio: " patrice.chotard 2016-08-10 7:39 ` patrice.chotard at st.com 2016-08-10 8:29 ` Lee Jones 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 7:39 ` patrice.chotard at st.com 2016-08-10 8:30 ` Lee Jones 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 7:39 ` patrice.chotard at st.com 2016-08-10 8:30 ` Lee Jones 2016-08-10 8:30 ` Lee Jones 2016-08-10 7:39 ` [RESEND v2 10/10] gpio: stmpe: " patrice.chotard 2016-08-10 7:39 ` patrice.chotard at st.com 2016-08-10 8:30 ` Lee Jones 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-10 8:42 ` Lee Jones 2016-08-11 12:07 ` Linus Walleij 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=1470814755-19447-6-git-send-email-patrice.chotard@st.com \ --to=patrice.chotard@st.com \ --cc=amelie.delaunay@st.com \ --cc=dinguyen@opensource.altera.com \ --cc=gnurou@gmail.com \ --cc=kernel@pengutronix.de \ --cc=lee.jones@linaro.org \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-gpio@vger.kernel.org \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.