author: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> 2021-04-05 15:25:40 -0700
committer: Rob Herring <robh@kernel.org> 2021-04-09 14:24:25 -0500
commit: d473d32c2fbac2d1d7082c61899cfebd34eb267a
parent: 21d6ff39e1692b1f8c0d17331b15f76b40a3c726
Commit Summary:
Diffstat:
1 file changed, 8 insertions, 1 deletion
diff --git a/drivers/of/property.c b/drivers/of/property.c
index 5f9eed79a8aa..6d8368bf88ca 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1260,7 +1260,16 @@ DEFINE_SIMPLE_PROP(pinctrl7, "pinctrl-7", NULL)
DEFINE_SIMPLE_PROP(pinctrl8, "pinctrl-8", NULL)
DEFINE_SUFFIX_PROP(regulators, "-supply", NULL)
DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells")
-DEFINE_SUFFIX_PROP(gpios, "-gpios", "#gpio-cells")
+
+static struct device_node *parse_gpios(struct device_node *np,
+ const char *prop_name, int index)
+{
+ if (!strcmp_suffix(prop_name, ",nr-gpios"))
+ return NULL;
+
+ return parse_suffix_prop_cells(np, prop_name, index, "-gpios",
+ "#gpio-cells");
+}
static struct device_node *parse_iommu_maps(struct device_node *np,
const char *prop_name, int index)