regmap: change regmap_init_mem() to take ofnode instead udevice
Currently, regmap_init_mem() takes a udevice. This requires the node
has already been associated with a device. It prevents syscon/regmap
from behaving like those in Linux.
Change the first argumenet to take a device node.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/phy/meson-gxl-usb3.c b/drivers/phy/meson-gxl-usb3.c
index 22824de..5cbbd4d 100644
--- a/drivers/phy/meson-gxl-usb3.c
+++ b/drivers/phy/meson-gxl-usb3.c
@@ -163,7 +163,7 @@
struct phy_meson_gxl_usb3_priv *priv = dev_get_priv(dev);
int ret;
- ret = regmap_init_mem(dev, &priv->regmap);
+ ret = regmap_init_mem(dev_ofnode(dev), &priv->regmap);
if (ret)
return ret;