The upstream binding for the rn5t618 does not describe a separate watchdog node. Switch to MFD device population to probe the watchdog without DT matching.
Signed-off-by: Lucas Stach <[email protected]> --- drivers/mfd/rn5t618.c | 8 +++++++- drivers/watchdog/rn5t618_wdt.c | 5 ----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/mfd/rn5t618.c b/drivers/mfd/rn5t618.c index d757802b5363..5fd9fe6e6ac2 100644 --- a/drivers/mfd/rn5t618.c +++ b/drivers/mfd/rn5t618.c @@ -13,11 +13,17 @@ #include <i2c/i2c.h> #include <init.h> #include <of.h> +#include <linux/mfd/core.h> #include <linux/regmap.h> #include <reset_source.h> #include <restart.h> #include <mfd/rn5t618.h> +static const struct mfd_cell rn5t618_cells[] = { + { .name = "rn5t618-regulator" }, + { .name = "rn5t618-wdt" }, +}; + struct rn5t618 { struct restart_handler restart; struct regmap *regmap; @@ -129,7 +135,7 @@ static int __init rn5t618_i2c_probe(struct device *dev) if (ret) dev_warn(dev, "Failed to query reset reason\n"); - return of_platform_populate(dev->of_node, NULL, dev); + return mfd_add_devices(dev, rn5t618_cells, ARRAY_SIZE(rn5t618_cells)); } static __maybe_unused const struct of_device_id rn5t618_of_match[] = { diff --git a/drivers/watchdog/rn5t618_wdt.c b/drivers/watchdog/rn5t618_wdt.c index 95089ac7c885..53da358d451e 100644 --- a/drivers/watchdog/rn5t618_wdt.c +++ b/drivers/watchdog/rn5t618_wdt.c @@ -126,15 +126,10 @@ static int rn5t618_wdt_probe(struct device *dev) return watchdog_register(wdd); } -static __maybe_unused const struct of_device_id rn5t618_wdt_of_match[] = { - { .compatible = "ricoh,rn5t568-wdt" }, - { /* sentinel */ } -}; MODULE_DEVICE_TABLE(of, rn5t618_wdt_of_match); static struct driver rn5t618_wdt_driver = { .name = "rn5t618-wdt", .probe = rn5t618_wdt_probe, - .of_compatible = DRV_OF_COMPAT(rn5t618_wdt_of_match), }; device_platform_driver(rn5t618_wdt_driver); -- 2.47.3
