diff options
| author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-11-20 14:24:03 +0100 |
|---|---|---|
| committer | Philipp Zabel <p.zabel@pengutronix.de> | 2025-11-20 16:51:48 +0100 |
| commit | 109ce747ac22d22a88e5ebd76d606d60a834646c (patch) | |
| tree | 554fa2538e004f70f7f74c0feede6d741953ea4f /drivers/reset/core.c | |
| parent | 46dae84a90f9845df661adb116560e33d47a82ee (diff) | |
reset: gpio: convert the driver to using the auxiliary bus
As the reset-gpio devices are purely virtual and never instantiated from
real firmware nodes, let's convert the driver to using the - more
fitting - auxiliary bus.
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/reset/core.c')
| -rw-r--r-- | drivers/reset/core.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/reset/core.c b/drivers/reset/core.c index 13236ab69f10..e129c4c803ea 100644 --- a/drivers/reset/core.c +++ b/drivers/reset/core.c @@ -7,6 +7,7 @@ #include <linux/acpi.h> #include <linux/atomic.h> +#include <linux/auxiliary_bus.h> #include <linux/cleanup.h> #include <linux/device.h> #include <linux/err.h> @@ -18,7 +19,6 @@ #include <linux/kref.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/platform_device.h> #include <linux/reset.h> #include <linux/reset-controller.h> #include <linux/slab.h> @@ -882,7 +882,7 @@ static int __reset_add_reset_gpio_lookup(struct gpio_device *gdev, int id, if (!lookup) return -ENOMEM; - lookup->dev_id = kasprintf(GFP_KERNEL, "reset-gpio.%d", id); + lookup->dev_id = kasprintf(GFP_KERNEL, "reset.gpio.%d", id); if (!lookup->dev_id) return -ENOMEM; @@ -903,7 +903,7 @@ static int __reset_add_reset_gpio_lookup(struct gpio_device *gdev, int id, static int __reset_add_reset_gpio_device(const struct of_phandle_args *args) { struct reset_gpio_lookup *rgpio_dev; - struct platform_device *pdev; + struct auxiliary_device *adev; int id, ret; /* @@ -959,11 +959,9 @@ static int __reset_add_reset_gpio_device(const struct of_phandle_args *args) * Hold reference as long as rgpio_dev memory is valid. */ of_node_get(rgpio_dev->of_args.np); - pdev = platform_device_register_data(gpio_device_to_device(gdev), - "reset-gpio", id, - &rgpio_dev->of_args, - sizeof(rgpio_dev->of_args)); - ret = PTR_ERR_OR_ZERO(pdev); + adev = auxiliary_device_create(gpio_device_to_device(gdev), "reset", + "gpio", &rgpio_dev->of_args, id); + ret = PTR_ERR_OR_ZERO(adev); if (ret) goto err_put; |