Re: [PATCH] ARM: dts: stm32: omit unused pinctrl groups from dtb files

From: Sascha Hauer
Date: Wed Sep 20 2023 - 08:29:26 EST


On Wed, Sep 20, 2023 at 02:15:24PM +0200, Ahmad Fatoum wrote:
> Hello Sascha,
>
> On 20.09.23 14:11, Sascha Hauer wrote:
> > stm32mp15-pinctrl.dtsi contains nearly all pinctrl groups collected from
> > all boards. Most of them end up unused by a board and only waste binary
> > space. Add /omit-if-no-ref/ to the groups to scrub the unused groups
> > from the dtbs.
> >
> > Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
> > ---
> > arch/arm/boot/dts/st/stm32mp15-pinctrl.dtsi | 228 ++++++++++++++++++++
> > 1 file changed, 228 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/st/stm32mp15-pinctrl.dtsi b/arch/arm/boot/dts/st/stm32mp15-pinctrl.dtsi
> > index e1df345801dc2..778a83471df4c 100644
> > --- a/arch/arm/boot/dts/st/stm32mp15-pinctrl.dtsi
> > +++ b/arch/arm/boot/dts/st/stm32mp15-pinctrl.dtsi
> > @@ -7,6 +7,7 @@
> >
> > &pinctrl {
> > adc1_ain_pins_a: adc1-ain-0 {
> > + /omit-if-no-ref/
>
> I think the correct place is above the node name that would be referenced,
> i.e. before adc1_ain_pins_a: adc1-ain-0 here.

Argh! You are right. I'll send a v2 once my fingers are no longer
bleeding.

Sascha


--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |