Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Bartosz Golaszewski and committed by
Philipp Zabel
faaad500 9035073d

+5 -5
+5 -5
drivers/reset/reset-gpio.c
··· 4 4 #include <linux/gpio/consumer.h> 5 5 #include <linux/mod_devicetable.h> 6 6 #include <linux/module.h> 7 - #include <linux/of.h> 7 + #include <linux/property.h> 8 8 #include <linux/reset-controller.h> 9 9 10 10 struct reset_gpio_priv { ··· 46 46 .status = reset_gpio_status, 47 47 }; 48 48 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) 51 51 { 52 52 return reset_spec->args[0]; 53 53 } ··· 72 72 priv->rc.dev = dev; 73 73 74 74 /* 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; 77 77 priv->rc.nr_resets = 1; 78 78 79 79 return devm_reset_controller_register(dev, &priv->rc);