All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: stmpe: Fix bit clearing on STMPE1600
@ 2017-03-31  8:12 Hugues Fruchet
  2017-03-31  9:19 ` Patrice CHOTARD
  2017-04-03 10:29 ` Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Hugues Fruchet @ 2017-03-31  8:12 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Benjamin Gaignard, Amelie DELAUNAY, Patrice Chotard

GPIO bits clearing on pins assigned to STMPE1600
had no effects due to missing "clear registers"
settings within stmpe1600_regs[].
STMPE1600 does not have dedicated "clear registers",
but single "set/clear registers", hence stmpe1600_regs[]
"clear registers" (STMPE_IDX_GPCR_XXX) must be set to
same value as "set registers" (STMPE_IDX_GPSR_XXX), ie
STMPE1600_REG_GPSR_XXX.

Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
---
 drivers/mfd/stmpe.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index b0c7bcd..566caca 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -568,6 +568,8 @@ static int stmpe811_get_altfunc(struct stmpe *stmpe, enum stmpe_block block)
 	[STMPE_IDX_GPMR_CSB]	= STMPE1600_REG_GPMR_MSB,
 	[STMPE_IDX_GPSR_LSB]	= STMPE1600_REG_GPSR_LSB,
 	[STMPE_IDX_GPSR_CSB]	= STMPE1600_REG_GPSR_MSB,
+	[STMPE_IDX_GPCR_LSB]	= STMPE1600_REG_GPSR_LSB,
+	[STMPE_IDX_GPCR_CSB]	= STMPE1600_REG_GPSR_MSB,
 	[STMPE_IDX_GPDR_LSB]	= STMPE1600_REG_GPDR_LSB,
 	[STMPE_IDX_GPDR_CSB]	= STMPE1600_REG_GPDR_MSB,
 	[STMPE_IDX_IEGPIOR_LSB]	= STMPE1600_REG_IEGPIOR_LSB,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: stmpe: Fix bit clearing on STMPE1600
  2017-03-31  8:12 [PATCH] mfd: stmpe: Fix bit clearing on STMPE1600 Hugues Fruchet
@ 2017-03-31  9:19 ` Patrice CHOTARD
  2017-04-03 10:29 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Patrice CHOTARD @ 2017-03-31  9:19 UTC (permalink / raw)
  To: Hugues FRUCHET, Lee Jones
  Cc: linux-kernel, Benjamin Gaignard, Amelie DELAUNAY

Hi Hugues

On 03/31/2017 10:12 AM, Hugues Fruchet wrote:
> GPIO bits clearing on pins assigned to STMPE1600
> had no effects due to missing "clear registers"
> settings within stmpe1600_regs[].
> STMPE1600 does not have dedicated "clear registers",
> but single "set/clear registers", hence stmpe1600_regs[]
> "clear registers" (STMPE_IDX_GPCR_XXX) must be set to
> same value as "set registers" (STMPE_IDX_GPSR_XXX), ie
> STMPE1600_REG_GPSR_XXX.
>
> Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
> ---
>  drivers/mfd/stmpe.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
> index b0c7bcd..566caca 100644
> --- a/drivers/mfd/stmpe.c
> +++ b/drivers/mfd/stmpe.c
> @@ -568,6 +568,8 @@ static int stmpe811_get_altfunc(struct stmpe *stmpe, enum stmpe_block block)
>  	[STMPE_IDX_GPMR_CSB]	= STMPE1600_REG_GPMR_MSB,
>  	[STMPE_IDX_GPSR_LSB]	= STMPE1600_REG_GPSR_LSB,
>  	[STMPE_IDX_GPSR_CSB]	= STMPE1600_REG_GPSR_MSB,
> +	[STMPE_IDX_GPCR_LSB]	= STMPE1600_REG_GPSR_LSB,
> +	[STMPE_IDX_GPCR_CSB]	= STMPE1600_REG_GPSR_MSB,
>  	[STMPE_IDX_GPDR_LSB]	= STMPE1600_REG_GPDR_LSB,
>  	[STMPE_IDX_GPDR_CSB]	= STMPE1600_REG_GPDR_MSB,
>  	[STMPE_IDX_IEGPIOR_LSB]	= STMPE1600_REG_IEGPIOR_LSB,
>

Reviewed-by: Patrice Chotard <patrice.chotard@st.com>

Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mfd: stmpe: Fix bit clearing on STMPE1600
  2017-03-31  8:12 [PATCH] mfd: stmpe: Fix bit clearing on STMPE1600 Hugues Fruchet
  2017-03-31  9:19 ` Patrice CHOTARD
@ 2017-04-03 10:29 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2017-04-03 10:29 UTC (permalink / raw)
  To: Hugues Fruchet
  Cc: linux-kernel, Benjamin Gaignard, Amelie DELAUNAY, Patrice Chotard

On Fri, 31 Mar 2017, Hugues Fruchet wrote:

> GPIO bits clearing on pins assigned to STMPE1600
> had no effects due to missing "clear registers"
> settings within stmpe1600_regs[].
> STMPE1600 does not have dedicated "clear registers",
> but single "set/clear registers", hence stmpe1600_regs[]
> "clear registers" (STMPE_IDX_GPCR_XXX) must be set to
> same value as "set registers" (STMPE_IDX_GPSR_XXX), ie
> STMPE1600_REG_GPSR_XXX.
> 
> Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
> ---
>  drivers/mfd/stmpe.c | 2 ++
>  1 file changed, 2 insertions(+)

Applied, thanks.

> diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
> index b0c7bcd..566caca 100644
> --- a/drivers/mfd/stmpe.c
> +++ b/drivers/mfd/stmpe.c
> @@ -568,6 +568,8 @@ static int stmpe811_get_altfunc(struct stmpe *stmpe, enum stmpe_block block)
>  	[STMPE_IDX_GPMR_CSB]	= STMPE1600_REG_GPMR_MSB,
>  	[STMPE_IDX_GPSR_LSB]	= STMPE1600_REG_GPSR_LSB,
>  	[STMPE_IDX_GPSR_CSB]	= STMPE1600_REG_GPSR_MSB,
> +	[STMPE_IDX_GPCR_LSB]	= STMPE1600_REG_GPSR_LSB,
> +	[STMPE_IDX_GPCR_CSB]	= STMPE1600_REG_GPSR_MSB,
>  	[STMPE_IDX_GPDR_LSB]	= STMPE1600_REG_GPDR_LSB,
>  	[STMPE_IDX_GPDR_CSB]	= STMPE1600_REG_GPDR_MSB,
>  	[STMPE_IDX_IEGPIOR_LSB]	= STMPE1600_REG_IEGPIOR_LSB,

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-03 10:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-31  8:12 [PATCH] mfd: stmpe: Fix bit clearing on STMPE1600 Hugues Fruchet
2017-03-31  9:19 ` Patrice CHOTARD
2017-04-03 10:29 ` Lee Jones

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.