of: property: Add device link support for pinctrl-0 through pinctrl-8
authorSaravana Kannan <saravanak@google.com>
Fri, 24 Jul 2020 23:44:15 +0000 (16:44 -0700)
committerRob Herring <robh@kernel.org>
Mon, 27 Jul 2020 21:07:31 +0000 (15:07 -0600)
commitfb820b494acb70e3a20e50935118239c7e5c94dd
treec1062c0b30b6a2f57c149e66d1a62554a7b250ab
parent53e6a671f70abc2c30fa94ae33c0f1c2fe24985e
of: property: Add device link support for pinctrl-0 through pinctrl-8

Add support for pinctrl-0 through pinctrl-8 explicitly instead of trying
to add support for pinctrl-%d properties.

Of all the pinctrl-* properties in dts files (20322), only 47% (9531)
are pinctrl-%d properties. Of all the pinctrl-%d properties, 99.5%
(9486) are made up of pinctrl-[0-2]. 'pinctrl-8' is the current maximum
found in dts files.

Trying to parse all pinctrl-* properties and checking for pinctrl-%d is
unnecessarily complicated. So, just add support for pinctrl-[0-8] for
now. In the unlikely event we ever exceed pinctrl-8, we can come back
and improve this.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20200724234415.1651639-2-saravanak@google.com
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/property.c