linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] pinctrl: sunxi: H3 requires irq_read_needs_mux
@ 2016-02-03  7:57 Krzysztof Adamski
  2016-02-05 13:39 ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Adamski @ 2016-02-03  7:57 UTC (permalink / raw)
  Cc: Linus Walleij, Maxime Ripard, Chen-Yu Tsai, Hans de Goede,
	Lee Jones, Rob Herring, Jens Kuske, Fabian Frederick,
	Vishnu Patekar, linux-gpio, linux-arm-kernel, linux-kernel,
	linux-sunxi

It seems that on H3, just like on A10, when GPIOs are configured as
external interrupt data registers does not contain their value.  When
value is read, GPIO function must be temporary switched to input for
reads.

Signed-off-by: Krzysztof Adamski <k@japko.eu>
---

Changes compared to v1:
- None, but the patch was sent with wrong "From:", if you want to apply 
  it, please apply this one. Sorry for confusion.


 drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c b/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
index 77d4cf0..11760bb 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c
@@ -492,6 +492,7 @@ static const struct sunxi_pinctrl_desc sun8i_h3_pinctrl_data = {
 	.pins = sun8i_h3_pins,
 	.npins = ARRAY_SIZE(sun8i_h3_pins),
 	.irq_banks = 2,
+	.irq_read_needs_mux = true
 };
 
 static int sun8i_h3_pinctrl_probe(struct platform_device *pdev)
-- 
2.4.2

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

* Re: [PATCH v2] pinctrl: sunxi: H3 requires irq_read_needs_mux
  2016-02-03  7:57 [PATCH v2] pinctrl: sunxi: H3 requires irq_read_needs_mux Krzysztof Adamski
@ 2016-02-05 13:39 ` Linus Walleij
  2016-02-05 13:43   ` Krzysztof Adamski
  2016-02-05 13:51   ` Chen-Yu Tsai
  0 siblings, 2 replies; 5+ messages in thread
From: Linus Walleij @ 2016-02-05 13:39 UTC (permalink / raw)
  To: Krzysztof Adamski, Maxime Ripard
  Cc: Chen-Yu Tsai, Hans de Goede, Lee Jones, Rob Herring, Jens Kuske,
	Fabian Frederick, Vishnu Patekar, linux-gpio, linux-arm-kernel,
	linux-kernel, linux-sunxi

On Wed, Feb 3, 2016 at 8:57 AM, Krzysztof Adamski <k@japko.eu> wrote:

> It seems that on H3, just like on A10, when GPIOs are configured as
> external interrupt data registers does not contain their value.  When
> value is read, GPIO function must be temporary switched to input for
> reads.
>
> Signed-off-by: Krzysztof Adamski <k@japko.eu>

1. Waiting for Maxime's ACK on this patch.

2. Is this a regression that need to go in to fixes?

Yours,
Linus Walleij

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

* Re: [PATCH v2] pinctrl: sunxi: H3 requires irq_read_needs_mux
  2016-02-05 13:39 ` Linus Walleij
@ 2016-02-05 13:43   ` Krzysztof Adamski
  2016-02-05 13:51   ` Chen-Yu Tsai
  1 sibling, 0 replies; 5+ messages in thread
From: Krzysztof Adamski @ 2016-02-05 13:43 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Maxime Ripard, Chen-Yu Tsai, Hans de Goede, Lee Jones,
	Rob Herring, Jens Kuske, Fabian Frederick, Vishnu Patekar,
	linux-gpio, linux-arm-kernel, linux-kernel, linux-sunxi

On Fri, Feb 05, 2016 at 02:39:23PM +0100, Linus Walleij wrote:
>On Wed, Feb 3, 2016 at 8:57 AM, Krzysztof Adamski <k@japko.eu> wrote:
>
>> It seems that on H3, just like on A10, when GPIOs are configured as
>> external interrupt data registers does not contain their value.  When
>> value is read, GPIO function must be temporary switched to input for
>> reads.
>>
>> Signed-off-by: Krzysztof Adamski <k@japko.eu>
>
>2. Is this a regression that need to go in to fixes?

Not sure what you mean by that. H3 support was added recently without 
this flag so it never worked properly on this SoC.  With this patch it 
does. So it's just a normal bug fix, not a regression.

Best regards,
Krzysztof Adamski

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

* Re: [PATCH v2] pinctrl: sunxi: H3 requires irq_read_needs_mux
  2016-02-05 13:39 ` Linus Walleij
  2016-02-05 13:43   ` Krzysztof Adamski
@ 2016-02-05 13:51   ` Chen-Yu Tsai
  2016-02-11 13:28     ` Linus Walleij
  1 sibling, 1 reply; 5+ messages in thread
From: Chen-Yu Tsai @ 2016-02-05 13:51 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Krzysztof Adamski, Maxime Ripard, Chen-Yu Tsai, Hans de Goede,
	Lee Jones, Rob Herring, Jens Kuske, Fabian Frederick,
	Vishnu Patekar, linux-gpio, linux-arm-kernel, linux-kernel,
	linux-sunxi

On Fri, Feb 5, 2016 at 9:39 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Wed, Feb 3, 2016 at 8:57 AM, Krzysztof Adamski <k@japko.eu> wrote:
>
>> It seems that on H3, just like on A10, when GPIOs are configured as
>> external interrupt data registers does not contain their value.  When
>> value is read, GPIO function must be temporary switched to input for
>> reads.
>>
>> Signed-off-by: Krzysztof Adamski <k@japko.eu>
>
> 1. Waiting for Maxime's ACK on this patch.

Maxime already acked v1.

Acked-by: Chen-Yu Tsai <wens@csie.org>

> 2. Is this a regression that need to go in to fixes?

This driver was introduced in 4.5-rc1. It'd be nice if this fix could make
it in 4.5. :)


Thanks
ChenYu

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

* Re: [PATCH v2] pinctrl: sunxi: H3 requires irq_read_needs_mux
  2016-02-05 13:51   ` Chen-Yu Tsai
@ 2016-02-11 13:28     ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2016-02-11 13:28 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Krzysztof Adamski, Maxime Ripard, Hans de Goede, Lee Jones,
	Rob Herring, Jens Kuske, Fabian Frederick, Vishnu Patekar,
	linux-gpio, linux-arm-kernel, linux-kernel, linux-sunxi

On Fri, Feb 5, 2016 at 2:51 PM, Chen-Yu Tsai <wens@csie.org> wrote:
> On Fri, Feb 5, 2016 at 9:39 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
>> On Wed, Feb 3, 2016 at 8:57 AM, Krzysztof Adamski <k@japko.eu> wrote:
>>
>>> It seems that on H3, just like on A10, when GPIOs are configured as
>>> external interrupt data registers does not contain their value.  When
>>> value is read, GPIO function must be temporary switched to input for
>>> reads.
>>>
>>> Signed-off-by: Krzysztof Adamski <k@japko.eu>
>>
>> 1. Waiting for Maxime's ACK on this patch.
>
> Maxime already acked v1.
>
> Acked-by: Chen-Yu Tsai <wens@csie.org>
>
>> 2. Is this a regression that need to go in to fixes?
>
> This driver was introduced in 4.5-rc1. It'd be nice if this fix could make
> it in 4.5. :)

OK ooops merged the v1 version, undoing and merging this version
instead.

Yours,
Linus Walleij

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

end of thread, other threads:[~2016-02-11 13:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03  7:57 [PATCH v2] pinctrl: sunxi: H3 requires irq_read_needs_mux Krzysztof Adamski
2016-02-05 13:39 ` Linus Walleij
2016-02-05 13:43   ` Krzysztof Adamski
2016-02-05 13:51   ` Chen-Yu Tsai
2016-02-11 13:28     ` Linus Walleij

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).