Skip to content

Commit faaad50

Browse files
Bartosz GolaszewskipH5
authored andcommitted
reset: gpio: make the driver fwnode-agnostic
With reset core now being able to work with firmware nodes, we can make reset-gpio node-agnostic and drop any OF dependencies. Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
1 parent 9035073 commit faaad50

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/reset/reset-gpio.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <linux/gpio/consumer.h>
55
#include <linux/mod_devicetable.h>
66
#include <linux/module.h>
7-
#include <linux/of.h>
7+
#include <linux/property.h>
88
#include <linux/reset-controller.h>
99

1010
struct reset_gpio_priv {
@@ -46,8 +46,8 @@ static const struct reset_control_ops reset_gpio_ops = {
4646
.status = reset_gpio_status,
4747
};
4848

49-
static int reset_gpio_of_xlate(struct reset_controller_dev *rcdev,
50-
const struct of_phandle_args *reset_spec)
49+
static int reset_gpio_fwnode_xlate(struct reset_controller_dev *rcdev,
50+
const struct fwnode_reference_args *reset_spec)
5151
{
5252
return reset_spec->args[0];
5353
}
@@ -72,8 +72,8 @@ static int reset_gpio_probe(struct auxiliary_device *adev,
7272
priv->rc.dev = dev;
7373

7474
/* Cells to match GPIO specifier, but it's not really used */
75-
priv->rc.of_reset_n_cells = 2;
76-
priv->rc.of_xlate = reset_gpio_of_xlate;
75+
priv->rc.fwnode_reset_n_cells = 2;
76+
priv->rc.fwnode_xlate = reset_gpio_fwnode_xlate;
7777
priv->rc.nr_resets = 1;
7878

7979
return devm_reset_controller_register(dev, &priv->rc);

0 commit comments

Comments
 (0)