With "reg-mux" compatible the driver no longer expects the parent
device to be a syscon type. It uses it's own regmux.
Signed-off-by: Roger Quadros <rogerq@kernel.org>
static const struct udevice_id mmio_mux_of_match[] = {
{ .compatible = "mmio-mux" },
+ { .compatible = "reg-mux" },
{ /* sentinel */ },
};
int ret;
int i;
- regmap = syscon_node_to_regmap(dev_ofnode(dev->parent));
+ if (ofnode_device_is_compatible(dev_ofnode(dev), "mmio-mux"))
+ regmap = syscon_node_to_regmap(dev_ofnode(dev->parent));
+ else
+ regmap_init_mem(dev_ofnode(dev), ®map);
+
if (IS_ERR(regmap)) {
ret = PTR_ERR(regmap);
dev_err(dev, "failed to get regmap: %d\n", ret);