[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210115210159.3090203-1-saravanak@google.com>
Date: Fri, 15 Jan 2021 13:01:58 -0800
From: Saravana Kannan <saravanak@...gle.com>
To: Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
Saravana Kannan <saravanak@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-tegra <linux-tegra@...r.kernel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Jon Hunter <jonathanh@...dia.com>, kernel-team@...roid.com,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v1] of: property: Add fw_devlink support for "gpio" and
"gpios" binding
To provide backward compatibility for boards that use deprecated DT
bindings, we need to add fw_devlink support for "gpio" and "gpios".
Cc: linux-tegra <linux-tegra@...r.kernel.org>
Cc: Linus Walleij <linus.walleij@...aro.org>
Cc: Bartosz Golaszewski <bgolaszewski@...libre.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Fixes: e590474768f1 ("driver core: Set fw_devlink=on by default")
Tested-by: Jon Hunter <jonathanh@...dia.com>
Signed-off-by: Saravana Kannan <saravanak@...gle.com>
---
drivers/of/property.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/of/property.c b/drivers/of/property.c
index 5f9eed79a8aa..1c8c65c4a887 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1258,6 +1258,8 @@ DEFINE_SIMPLE_PROP(pinctrl5, "pinctrl-5", NULL)
DEFINE_SIMPLE_PROP(pinctrl6, "pinctrl-6", NULL)
DEFINE_SIMPLE_PROP(pinctrl7, "pinctrl-7", NULL)
DEFINE_SIMPLE_PROP(pinctrl8, "pinctrl-8", NULL)
+DEFINE_SIMPLE_PROP(gpio_compat, "gpio", "#gpio-cells")
+DEFINE_SIMPLE_PROP(gpios_compat, "gpios", "#gpio-cells")
DEFINE_SUFFIX_PROP(regulators, "-supply", NULL)
DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells")
DEFINE_SUFFIX_PROP(gpios, "-gpios", "#gpio-cells")
@@ -1296,6 +1298,8 @@ static const struct supplier_bindings of_supplier_bindings[] = {
{ .parse_prop = parse_pinctrl6, },
{ .parse_prop = parse_pinctrl7, },
{ .parse_prop = parse_pinctrl8, },
+ { .parse_prop = parse_gpio_compat, },
+ { .parse_prop = parse_gpios_compat, },
{ .parse_prop = parse_regulators, },
{ .parse_prop = parse_gpio, },
{ .parse_prop = parse_gpios, },
--
2.30.0.284.gd98b1dd5eaa7-goog
Powered by blists - more mailing lists