Skip to contentSkip to conversation

pinctrl: sunxi: H3 requires irq_read_needs_mux

PATCH In review Krzysztof Adamski 3 participants 5 messages Feb 3, 2016 – Feb 11, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 pinctrl: sunxi: H3 requires irq_read_needs_mux

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.

---

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(+)
drivers/pinctrl/sunxi/pinctrl-sun8i-h3.c +1 -0
index 77d4cf0..11760bb 100644
@@ -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)
Signature · 1 line
2.4.2
#1 lore raw
Quoted 6 lines · Krzysztof Adamski

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.

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

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

Yours,
Linus Walleij

#2 lore raw
Quoted 10 lines · Linus Walleij
Quoted 6 lines · Krzysztof Adamski

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.

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

Acked-by
#3 lore raw
In reply to Linus Walleij
Quoted 10 lines · Linus Walleij
Quoted 6 lines · Krzysztof Adamski

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.

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

Maxime already acked v1.

Quoted 1 line

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

#4 lore raw
Quoted 12 lines · Chen-Yu Tsai
Quoted 10 lines · Linus Walleij
Quoted 6 lines · Krzysztof Adamski

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.

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

Quoted 8 lines

Maxime already acked v1.

Quoted 1 line

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