public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/6] pinctrl: mediatek: Fix gpio-ranges and include guard issues
@ 2026-03-12  4:15 Akari Tsuyukusa
  2026-03-12  4:15 ` [PATCH 1/6] arm64: dts: mediatek: mt6795: Fix gpio-ranges pin count Akari Tsuyukusa
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Akari Tsuyukusa @ 2026-03-12  4:15 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, matthias.bgg, angelogioacchino.delregno,
	sean.wang, linusw
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-gpio, hui.liu, nfraprado, linus.walleij, mars.cheng,
	andy.teng, hanks.chen, sam.shih, rafal, ben.ho, erin.lo,
	zhiyong.tao, Jason-ch.Chen, amergnat, seiya.wang, tinghan.shen,
	Akari Tsuyukusa

While looking at MediaTek's Pinctrl driver and device tree, I discovered
that on some SoCs, the gpio-ranges count was a little less than the pins
defined. This means that the last pin will no longer be available.

And fixing this issue, I also discovered that the #endif comment in the
include guard for some header files was different from the macro name at
the beginning. These issues do not affect the compiled kernel, but they
affect the readability and consistency of the code.

This series addresses the cases that can be confirmed correct without
requiring datasheet verification:

- mt6795 : gpio-ranges 196 -> 197
- mt7981b: gpio-ranges 56 -> 57
- mt7986a: gpio-ranges 100 -> 101
- mt6779 : include guard #endif comment fix
- mt8188 : include guard #endif comment fix (two files)

The following additional issues were identified during this investigation
but are not included in this series as they require further analysis
or datasheet confirmation:

MT6779: gpio-ranges = <&pio 0 0 210>;
    This matches the number of pins, but GPIO203 to 209 don't have
    GPIO function, and the driver also has no control over those pins.
    Probably needs to be fixed to "gpio-ranges = <&pio 0 0 203>;"

MT8183: gpio-ranges = <&pio 0 0 192>;
    This seems correct because it matches "pinctrl-mtk-mt8183.h".
    But, mode/dir/di/do are defined from pin 0 to 192.
    "pinctrl-mt8183.c" looks wrong.

MT8188: gpio-ranges = <&pio 0 0 176>;
    According to "pinctrl-mtk-mt8188.h", GPIO0 to 176 have GPIO function,
    and GPIO177 to 189 are EINT only pin, but mode/dir/di/do are defined
    from pin 0 to 177. "pinctrl-mt8188.c" is likely to be wrong.
    At least "176" is wrong, probably "gpio-ranges = <&pio 0 0 177>;"

MT8192: gpio-ranges = <&pio 0 0 220>;
    "pinctrl-mtk-mt8192.h" defines GPIO0 to 227 which have GPIO function,
    but mode/dir/di/do are defined from pin 0 to 228.
    "pinctrl-mt8192.c" looks wrong.
    Also, probably "gpio-ranges = <&pio 0 0 229>;"

MT8195: gpio-ranges = <&pio 0 0 144>;
    Like MT8188, GPIO144 to 164 don't have GPIO function,
    but mode/dir/di/do are defined from pin 0 to pin 144.
    "pinctrl-mt8195.c" is likely to be wrong.


Akari Tsuyukusa (6):
  arm64: dts: mediatek: mt6795: Fix gpio-ranges pin count
  arm64: dts: mediatek: mt7981b: Fix gpio-ranges pin count
  arm64: dts: mediatek: mt7986a: Fix gpio-ranges pin count
  pinctrl: mediatek: mt6779: Fix include guard comment in the header
  pinctrl: mediatek: mt8188: Fix include guard comment in the header
  dt-bindings: pinctrl: mediatek: mt8188: Fix include guard comment

 arch/arm64/boot/dts/mediatek/mt6795.dtsi              | 2 +-
 arch/arm64/boot/dts/mediatek/mt7981b.dtsi             | 2 +-
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi             | 2 +-
 drivers/pinctrl/mediatek/pinctrl-mtk-mt6779.h         | 2 +-
 drivers/pinctrl/mediatek/pinctrl-mtk-mt8188.h         | 2 +-
 include/dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.53.0



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

* [PATCH 1/6] arm64: dts: mediatek: mt6795: Fix gpio-ranges pin count
  2026-03-12  4:15 [PATCH 0/6] pinctrl: mediatek: Fix gpio-ranges and include guard issues Akari Tsuyukusa
@ 2026-03-12  4:15 ` Akari Tsuyukusa
  2026-03-12  4:15 ` [PATCH 2/6] arm64: dts: mediatek: mt7981b: " Akari Tsuyukusa
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Akari Tsuyukusa @ 2026-03-12  4:15 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, matthias.bgg, angelogioacchino.delregno,
	sean.wang, linusw
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-gpio, hui.liu, nfraprado, linus.walleij, mars.cheng,
	andy.teng, hanks.chen, sam.shih, rafal, ben.ho, erin.lo,
	zhiyong.tao, Jason-ch.Chen, amergnat, seiya.wang, tinghan.shen,
	Akari Tsuyukusa

The gpio-ranges in the MT6795 pinctrl node were incorrectly defined,
therefore, GPIO196 cannot be used.
Correct the range count to match the driver.

Fixes: b888886a4536 ("arm64: dts: mediatek: mt6795: Add pinctrl controller node")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
 arch/arm64/boot/dts/mediatek/mt6795.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index ae2aaa51c9ad..134cfa77e3b1 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -371,7 +371,7 @@ pio: pinctrl@10005000 {
 				     <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
 			gpio-controller;
 			#gpio-cells = <2>;
-			gpio-ranges = <&pio 0 0 196>;
+			gpio-ranges = <&pio 0 0 197>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
 		};
-- 
2.53.0



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

* [PATCH 2/6] arm64: dts: mediatek: mt7981b: Fix gpio-ranges pin count
  2026-03-12  4:15 [PATCH 0/6] pinctrl: mediatek: Fix gpio-ranges and include guard issues Akari Tsuyukusa
  2026-03-12  4:15 ` [PATCH 1/6] arm64: dts: mediatek: mt6795: Fix gpio-ranges pin count Akari Tsuyukusa
@ 2026-03-12  4:15 ` Akari Tsuyukusa
  2026-03-12  4:15 ` [PATCH 3/6] arm64: dts: mediatek: mt7986a: " Akari Tsuyukusa
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Akari Tsuyukusa @ 2026-03-12  4:15 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, matthias.bgg, angelogioacchino.delregno,
	sean.wang, linusw
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-gpio, hui.liu, nfraprado, linus.walleij, mars.cheng,
	andy.teng, hanks.chen, sam.shih, rafal, ben.ho, erin.lo,
	zhiyong.tao, Jason-ch.Chen, amergnat, seiya.wang, tinghan.shen,
	Akari Tsuyukusa

The gpio-ranges in the MT7981B pinctrl node were incorrectly defined,
therefore, pin 56 cannot be used.
Correct the range count to match the driver.

Fixes: 62b24c7fdf0a ("arm64: dts: mediatek: mt7981: add pinctrl")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
 arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
index 4084f4dfa3e5..1bbe219380f9 100644
--- a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
@@ -332,7 +332,7 @@ pio: pinctrl@11d00000 {
 			interrupt-controller;
 			interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
 			interrupt-parent = <&gic>;
-			gpio-ranges = <&pio 0 0 56>;
+			gpio-ranges = <&pio 0 0 57>;
 			gpio-controller;
 			#gpio-cells = <2>;
 			#interrupt-cells = <2>;
-- 
2.53.0



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

* [PATCH 3/6] arm64: dts: mediatek: mt7986a: Fix gpio-ranges pin count
  2026-03-12  4:15 [PATCH 0/6] pinctrl: mediatek: Fix gpio-ranges and include guard issues Akari Tsuyukusa
  2026-03-12  4:15 ` [PATCH 1/6] arm64: dts: mediatek: mt6795: Fix gpio-ranges pin count Akari Tsuyukusa
  2026-03-12  4:15 ` [PATCH 2/6] arm64: dts: mediatek: mt7981b: " Akari Tsuyukusa
@ 2026-03-12  4:15 ` Akari Tsuyukusa
  2026-03-12  4:15 ` [PATCH 4/6] pinctrl: mediatek: mt6779: Fix include guard comment in the header Akari Tsuyukusa
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Akari Tsuyukusa @ 2026-03-12  4:15 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, matthias.bgg, angelogioacchino.delregno,
	sean.wang, linusw
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-gpio, hui.liu, nfraprado, linus.walleij, mars.cheng,
	andy.teng, hanks.chen, sam.shih, rafal, ben.ho, erin.lo,
	zhiyong.tao, Jason-ch.Chen, amergnat, seiya.wang, tinghan.shen,
	Akari Tsuyukusa

The gpio-ranges in the MT7986A pinctrl node were incorrectly defined,
therefore, pin 100 cannot be used.
Correct the range count to match the driver.

Fixes: c3a064a32ed9 ("arm64: dts: mediatek: add pinctrl support for mt7986a")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
index 9693f62fd013..9ebc196107e5 100644
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -187,7 +187,7 @@ pio: pinctrl@1001f000 {
 				    "iocfg_lb", "iocfg_tr", "iocfg_tl", "eint";
 			gpio-controller;
 			#gpio-cells = <2>;
-			gpio-ranges = <&pio 0 0 100>;
+			gpio-ranges = <&pio 0 0 101>;
 			interrupt-controller;
 			interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
 			interrupt-parent = <&gic>;
-- 
2.53.0



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

* [PATCH 4/6] pinctrl: mediatek: mt6779: Fix include guard comment in the header
  2026-03-12  4:15 [PATCH 0/6] pinctrl: mediatek: Fix gpio-ranges and include guard issues Akari Tsuyukusa
                   ` (2 preceding siblings ...)
  2026-03-12  4:15 ` [PATCH 3/6] arm64: dts: mediatek: mt7986a: " Akari Tsuyukusa
@ 2026-03-12  4:15 ` Akari Tsuyukusa
  2026-03-13 13:39   ` Krzysztof Kozlowski
  2026-03-12  4:15 ` [PATCH 5/6] pinctrl: mediatek: mt8188: " Akari Tsuyukusa
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 13+ messages in thread
From: Akari Tsuyukusa @ 2026-03-12  4:15 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, matthias.bgg, angelogioacchino.delregno,
	sean.wang, linusw
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-gpio, hui.liu, nfraprado, linus.walleij, mars.cheng,
	andy.teng, hanks.chen, sam.shih, rafal, ben.ho, erin.lo,
	zhiyong.tao, Jason-ch.Chen, amergnat, seiya.wang, tinghan.shen,
	Akari Tsuyukusa

Correct the mismatched macro name in the #endif comment.

Fixes: 920e469e15c8 ("pinctrl: mediatek: add pinctrl support for MT6779 SoC")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
 drivers/pinctrl/mediatek/pinctrl-mtk-mt6779.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-mt6779.h b/drivers/pinctrl/mediatek/pinctrl-mtk-mt6779.h
index 0a48d6686ebb..d9404c9f6479 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-mt6779.h
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-mt6779.h
@@ -2082,4 +2082,4 @@ static const struct mtk_pin_desc mtk_pins_mt6779[] = {
 	),
 };
 
-#endif /* __PINCTRL-MTK-MT6779_H */
+#endif /* __PINCTRL_MTK_MT6779_H */
-- 
2.53.0



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

* [PATCH 5/6] pinctrl: mediatek: mt8188: Fix include guard comment in the header
  2026-03-12  4:15 [PATCH 0/6] pinctrl: mediatek: Fix gpio-ranges and include guard issues Akari Tsuyukusa
                   ` (3 preceding siblings ...)
  2026-03-12  4:15 ` [PATCH 4/6] pinctrl: mediatek: mt6779: Fix include guard comment in the header Akari Tsuyukusa
@ 2026-03-12  4:15 ` Akari Tsuyukusa
  2026-03-13 13:40   ` Krzysztof Kozlowski
  2026-03-12  4:15 ` [PATCH 6/6] dt-bindings: pinctrl: mediatek: mt8188: Fix include guard comment Akari Tsuyukusa
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 13+ messages in thread
From: Akari Tsuyukusa @ 2026-03-12  4:15 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, matthias.bgg, angelogioacchino.delregno,
	sean.wang, linusw
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-gpio, hui.liu, nfraprado, linus.walleij, mars.cheng,
	andy.teng, hanks.chen, sam.shih, rafal, ben.ho, erin.lo,
	zhiyong.tao, Jason-ch.Chen, amergnat, seiya.wang, tinghan.shen,
	Akari Tsuyukusa

Correct the mismatched macro name in the #endif comment.

Fixes: 11b918d90aeb ("pinctrl: mediatek: add mt8188 driver")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
 drivers/pinctrl/mediatek/pinctrl-mtk-mt8188.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-mt8188.h b/drivers/pinctrl/mediatek/pinctrl-mtk-mt8188.h
index a487323748e2..a688e919b32c 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-mt8188.h
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-mt8188.h
@@ -2256,4 +2256,4 @@ static const struct mtk_pin_desc mtk_pins_mt8188[] = {
 	)
 };
 
-#endif /* __PINCTRL__MTK_MT8188_H */
+#endif /* __PINCTRL_MTK_MT8188_H */
-- 
2.53.0



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

* [PATCH 6/6] dt-bindings: pinctrl: mediatek: mt8188: Fix include guard comment
  2026-03-12  4:15 [PATCH 0/6] pinctrl: mediatek: Fix gpio-ranges and include guard issues Akari Tsuyukusa
                   ` (4 preceding siblings ...)
  2026-03-12  4:15 ` [PATCH 5/6] pinctrl: mediatek: mt8188: " Akari Tsuyukusa
@ 2026-03-12  4:15 ` Akari Tsuyukusa
  2026-03-13 13:39   ` Krzysztof Kozlowski
  2026-03-12 12:31 ` [PATCH 0/6] pinctrl: mediatek: Fix gpio-ranges and include guard issues AngeloGioacchino Del Regno
  2026-03-12 12:32 ` (subset) " AngeloGioacchino Del Regno
  7 siblings, 1 reply; 13+ messages in thread
From: Akari Tsuyukusa @ 2026-03-12  4:15 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, matthias.bgg, angelogioacchino.delregno,
	sean.wang, linusw
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-gpio, hui.liu, nfraprado, linus.walleij, mars.cheng,
	andy.teng, hanks.chen, sam.shih, rafal, ben.ho, erin.lo,
	zhiyong.tao, Jason-ch.Chen, amergnat, seiya.wang, tinghan.shen,
	Akari Tsuyukusa

Correct the mismatched macro name in the #endif comment.

Fixes: 9f1bdd7e8221 ("dt-bindings: pinctrl: mediatek: add support for mt8188")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
---
 include/dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h b/include/dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h
index 2688da2f621f..66a451953838 100644
--- a/include/dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h
+++ b/include/dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h
@@ -1277,4 +1277,4 @@
 #define PINMUX_GPIO176__FUNC_B_GPIO176 (MTK_PIN_NO(176) | 0)
 #define PINMUX_GPIO176__FUNC_B0_SPMI_M_SDA (MTK_PIN_NO(176) | 1)
 
-#endif /* __MEDIATEK_MT8188-PINFUNC_H */
+#endif /* __MEDIATEK_MT8188_PINFUNC_H */
-- 
2.53.0



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

* Re: [PATCH 0/6] pinctrl: mediatek: Fix gpio-ranges and include guard issues
  2026-03-12  4:15 [PATCH 0/6] pinctrl: mediatek: Fix gpio-ranges and include guard issues Akari Tsuyukusa
                   ` (5 preceding siblings ...)
  2026-03-12  4:15 ` [PATCH 6/6] dt-bindings: pinctrl: mediatek: mt8188: Fix include guard comment Akari Tsuyukusa
@ 2026-03-12 12:31 ` AngeloGioacchino Del Regno
  2026-03-12 12:32 ` (subset) " AngeloGioacchino Del Regno
  7 siblings, 0 replies; 13+ messages in thread
From: AngeloGioacchino Del Regno @ 2026-03-12 12:31 UTC (permalink / raw)
  To: Akari Tsuyukusa, robh, krzk+dt, conor+dt, matthias.bgg, sean.wang,
	linusw
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-gpio, hui.liu, nfraprado, linus.walleij, mars.cheng,
	andy.teng, hanks.chen, sam.shih, rafal, ben.ho, erin.lo,
	zhiyong.tao, Jason-ch.Chen, amergnat, seiya.wang, tinghan.shen

Il 12/03/26 05:15, Akari Tsuyukusa ha scritto:
> While looking at MediaTek's Pinctrl driver and device tree, I discovered
> that on some SoCs, the gpio-ranges count was a little less than the pins
> defined. This means that the last pin will no longer be available.
> 
> And fixing this issue, I also discovered that the #endif comment in the
> include guard for some header files was different from the macro name at
> the beginning. These issues do not affect the compiled kernel, but they
> affect the readability and consistency of the code.
> 
> This series addresses the cases that can be confirmed correct without
> requiring datasheet verification:
> 
> - mt6795 : gpio-ranges 196 -> 197
> - mt7981b: gpio-ranges 56 -> 57
> - mt7986a: gpio-ranges 100 -> 101
> - mt6779 : include guard #endif comment fix
> - mt8188 : include guard #endif comment fix (two files)
> 
> The following additional issues were identified during this investigation
> but are not included in this series as they require further analysis
> or datasheet confirmation:
> 
> MT6779: gpio-ranges = <&pio 0 0 210>;
>      This matches the number of pins, but GPIO203 to 209 don't have
>      GPIO function, and the driver also has no control over those pins.
>      Probably needs to be fixed to "gpio-ranges = <&pio 0 0 203>;"
> 
> MT8183: gpio-ranges = <&pio 0 0 192>;
>      This seems correct because it matches "pinctrl-mtk-mt8183.h".
>      But, mode/dir/di/do are defined from pin 0 to 192.
>      "pinctrl-mt8183.c" looks wrong.
> 
> MT8188: gpio-ranges = <&pio 0 0 176>;
>      According to "pinctrl-mtk-mt8188.h", GPIO0 to 176 have GPIO function,
>      and GPIO177 to 189 are EINT only pin, but mode/dir/di/do are defined
>      from pin 0 to 177. "pinctrl-mt8188.c" is likely to be wrong.
>      At least "176" is wrong, probably "gpio-ranges = <&pio 0 0 177>;"
> 
> MT8192: gpio-ranges = <&pio 0 0 220>;
>      "pinctrl-mtk-mt8192.h" defines GPIO0 to 227 which have GPIO function,
>      but mode/dir/di/do are defined from pin 0 to 228.
>      "pinctrl-mt8192.c" looks wrong.
>      Also, probably "gpio-ranges = <&pio 0 0 229>;"
> 
> MT8195: gpio-ranges = <&pio 0 0 144>;
>      Like MT8188, GPIO144 to 164 don't have GPIO function,
>      but mode/dir/di/do are defined from pin 0 to pin 144.
>      "pinctrl-mt8195.c" is likely to be wrong.
> 

The whole series is

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

> 
> Akari Tsuyukusa (6):
>    arm64: dts: mediatek: mt6795: Fix gpio-ranges pin count
>    arm64: dts: mediatek: mt7981b: Fix gpio-ranges pin count
>    arm64: dts: mediatek: mt7986a: Fix gpio-ranges pin count
>    pinctrl: mediatek: mt6779: Fix include guard comment in the header
>    pinctrl: mediatek: mt8188: Fix include guard comment in the header
>    dt-bindings: pinctrl: mediatek: mt8188: Fix include guard comment
> 
>   arch/arm64/boot/dts/mediatek/mt6795.dtsi              | 2 +-
>   arch/arm64/boot/dts/mediatek/mt7981b.dtsi             | 2 +-
>   arch/arm64/boot/dts/mediatek/mt7986a.dtsi             | 2 +-
>   drivers/pinctrl/mediatek/pinctrl-mtk-mt6779.h         | 2 +-
>   drivers/pinctrl/mediatek/pinctrl-mtk-mt8188.h         | 2 +-
>   include/dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h | 2 +-
>   6 files changed, 6 insertions(+), 6 deletions(-)
> 



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

* Re: (subset) [PATCH 0/6] pinctrl: mediatek: Fix gpio-ranges and include guard issues
  2026-03-12  4:15 [PATCH 0/6] pinctrl: mediatek: Fix gpio-ranges and include guard issues Akari Tsuyukusa
                   ` (6 preceding siblings ...)
  2026-03-12 12:31 ` [PATCH 0/6] pinctrl: mediatek: Fix gpio-ranges and include guard issues AngeloGioacchino Del Regno
@ 2026-03-12 12:32 ` AngeloGioacchino Del Regno
  7 siblings, 0 replies; 13+ messages in thread
From: AngeloGioacchino Del Regno @ 2026-03-12 12:32 UTC (permalink / raw)
  To: robh, krzk+dt, conor+dt, matthias.bgg, sean.wang, linusw,
	Akari Tsuyukusa
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-gpio, hui.liu, nfraprado, mars.cheng, andy.teng, hanks.chen,
	sam.shih, rafal, ben.ho, erin.lo, zhiyong.tao, Jason-ch.Chen,
	amergnat, seiya.wang, tinghan.shen, Linus Walleij

On Thu, 12 Mar 2026 13:15:27 +0900, Akari Tsuyukusa wrote:
> While looking at MediaTek's Pinctrl driver and device tree, I discovered
> that on some SoCs, the gpio-ranges count was a little less than the pins
> defined. This means that the last pin will no longer be available.
> 
> And fixing this issue, I also discovered that the #endif comment in the
> include guard for some header files was different from the macro name at
> the beginning. These issues do not affect the compiled kernel, but they
> affect the readability and consistency of the code.
> 
> [...]

Applied to v7.0-next/dts64, thanks!

[1/6] arm64: dts: mediatek: mt6795: Fix gpio-ranges pin count
      commit: c4c4823c8a5baa10b8100b01f49d7c3f4a871689
[2/6] arm64: dts: mediatek: mt7981b: Fix gpio-ranges pin count
      commit: b62a927f4a46a7f58d88ba3d5fb6e88e1a4b4603
[3/6] arm64: dts: mediatek: mt7986a: Fix gpio-ranges pin count
      commit: 820ed0c1a13c5fafb36232538d793f99a0986ef3

Cheers,
Angelo




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

* Re: [PATCH 6/6] dt-bindings: pinctrl: mediatek: mt8188: Fix include guard comment
  2026-03-12  4:15 ` [PATCH 6/6] dt-bindings: pinctrl: mediatek: mt8188: Fix include guard comment Akari Tsuyukusa
@ 2026-03-13 13:39   ` Krzysztof Kozlowski
  2026-03-14 15:21     ` Akari Tsuyukusa
  0 siblings, 1 reply; 13+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-13 13:39 UTC (permalink / raw)
  To: Akari Tsuyukusa
  Cc: robh, krzk+dt, conor+dt, matthias.bgg, angelogioacchino.delregno,
	sean.wang, linusw, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-gpio, hui.liu, nfraprado, linus.walleij,
	mars.cheng, andy.teng, hanks.chen, sam.shih, rafal, ben.ho,
	erin.lo, zhiyong.tao, Jason-ch.Chen, amergnat, seiya.wang,
	tinghan.shen

On Thu, Mar 12, 2026 at 01:15:33PM +0900, Akari Tsuyukusa wrote:
> Correct the mismatched macro name in the #endif comment.
> 
> Fixes: 9f1bdd7e8221 ("dt-bindings: pinctrl: mediatek: add support for mt8188")

No bug here, otherwise explain user-visible issues.

> Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
> ---
>  include/dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h b/include/dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h
> index 2688da2f621f..66a451953838 100644
> --- a/include/dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h
> +++ b/include/dt-bindings/pinctrl/mediatek,mt8188-pinfunc.h
> @@ -1277,4 +1277,4 @@
>  #define PINMUX_GPIO176__FUNC_B_GPIO176 (MTK_PIN_NO(176) | 0)
>  #define PINMUX_GPIO176__FUNC_B0_SPMI_M_SDA (MTK_PIN_NO(176) | 1)
>  
> -#endif /* __MEDIATEK_MT8188-PINFUNC_H */
> +#endif /* __MEDIATEK_MT8188_PINFUNC_H */

No, just a churn. This has no benefit, because it is obvious which if/endif
this corresponds to.

Best regards,
Krzysztof



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

* Re: [PATCH 4/6] pinctrl: mediatek: mt6779: Fix include guard comment in the header
  2026-03-12  4:15 ` [PATCH 4/6] pinctrl: mediatek: mt6779: Fix include guard comment in the header Akari Tsuyukusa
@ 2026-03-13 13:39   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-13 13:39 UTC (permalink / raw)
  To: Akari Tsuyukusa
  Cc: robh, krzk+dt, conor+dt, matthias.bgg, angelogioacchino.delregno,
	sean.wang, linusw, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-gpio, hui.liu, nfraprado, linus.walleij,
	mars.cheng, andy.teng, hanks.chen, sam.shih, rafal, ben.ho,
	erin.lo, zhiyong.tao, Jason-ch.Chen, amergnat, seiya.wang,
	tinghan.shen

On Thu, Mar 12, 2026 at 01:15:31PM +0900, Akari Tsuyukusa wrote:
> Correct the mismatched macro name in the #endif comment.
> 
> Fixes: 920e469e15c8 ("pinctrl: mediatek: add pinctrl support for MT6779 SoC")

Nothing to be fixed here.

> Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
> ---

Best regards,
Krzysztof



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

* Re: [PATCH 5/6] pinctrl: mediatek: mt8188: Fix include guard comment in the header
  2026-03-12  4:15 ` [PATCH 5/6] pinctrl: mediatek: mt8188: " Akari Tsuyukusa
@ 2026-03-13 13:40   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-13 13:40 UTC (permalink / raw)
  To: Akari Tsuyukusa
  Cc: robh, krzk+dt, conor+dt, matthias.bgg, angelogioacchino.delregno,
	sean.wang, linusw, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-gpio, hui.liu, nfraprado, linus.walleij,
	mars.cheng, andy.teng, hanks.chen, sam.shih, rafal, ben.ho,
	erin.lo, zhiyong.tao, Jason-ch.Chen, amergnat, seiya.wang,
	tinghan.shen

On Thu, Mar 12, 2026 at 01:15:32PM +0900, Akari Tsuyukusa wrote:
> Correct the mismatched macro name in the #endif comment.
> 
> Fixes: 11b918d90aeb ("pinctrl: mediatek: add mt8188 driver")
> Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
> ---
>  drivers/pinctrl/mediatek/pinctrl-mtk-mt8188.h | 2 +-

IMO, this change is just churn. Doing this one line per patch is way too
much. Do not send such oneliners for one subsystem as separate patches.


Best regards,
Krzysztof



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

* Re: [PATCH 6/6] dt-bindings: pinctrl: mediatek: mt8188: Fix include guard comment
  2026-03-13 13:39   ` Krzysztof Kozlowski
@ 2026-03-14 15:21     ` Akari Tsuyukusa
  0 siblings, 0 replies; 13+ messages in thread
From: Akari Tsuyukusa @ 2026-03-14 15:21 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: robh, krzk+dt, conor+dt, matthias.bgg, angelogioacchino.delregno,
	sean.wang, linusw, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-gpio, hui.liu, nfraprado, linus.walleij,
	mars.cheng, andy.teng, hanks.chen, sam.shih, rafal, ben.ho,
	erin.lo, zhiyong.tao, Jason-ch.Chen, amergnat, seiya.wang,
	tinghan.shen

On Fri, Mar 13, 2026 at 10:39 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> No bug here, otherwise explain user-visible issues.

Ok, I'll be careful in the future.

> No, just a churn. This has no benefit, because it is obvious which if/endif
> this corresponds to.

I understand your point.
Certainly these patches do not affect the compiled kernel.
However, I found that there are over 400 instances of mismatched include
guard comments across the kernel. While it doesn't cause bugs, I thought
this discrepancy should be addressed for consistency and readability.

Anyway, I withdraw patch 4, 5, 6.

Best regards,
Akari


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

end of thread, other threads:[~2026-03-14 15:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-12  4:15 [PATCH 0/6] pinctrl: mediatek: Fix gpio-ranges and include guard issues Akari Tsuyukusa
2026-03-12  4:15 ` [PATCH 1/6] arm64: dts: mediatek: mt6795: Fix gpio-ranges pin count Akari Tsuyukusa
2026-03-12  4:15 ` [PATCH 2/6] arm64: dts: mediatek: mt7981b: " Akari Tsuyukusa
2026-03-12  4:15 ` [PATCH 3/6] arm64: dts: mediatek: mt7986a: " Akari Tsuyukusa
2026-03-12  4:15 ` [PATCH 4/6] pinctrl: mediatek: mt6779: Fix include guard comment in the header Akari Tsuyukusa
2026-03-13 13:39   ` Krzysztof Kozlowski
2026-03-12  4:15 ` [PATCH 5/6] pinctrl: mediatek: mt8188: " Akari Tsuyukusa
2026-03-13 13:40   ` Krzysztof Kozlowski
2026-03-12  4:15 ` [PATCH 6/6] dt-bindings: pinctrl: mediatek: mt8188: Fix include guard comment Akari Tsuyukusa
2026-03-13 13:39   ` Krzysztof Kozlowski
2026-03-14 15:21     ` Akari Tsuyukusa
2026-03-12 12:31 ` [PATCH 0/6] pinctrl: mediatek: Fix gpio-ranges and include guard issues AngeloGioacchino Del Regno
2026-03-12 12:32 ` (subset) " AngeloGioacchino Del Regno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox