| .. | .. |
|---|
| 28 | 28 | |
|---|
| 29 | 29 | static const struct of_device_id mux_mmio_dt_ids[] = { |
|---|
| 30 | 30 | { .compatible = "mmio-mux", }, |
|---|
| 31 | + { .compatible = "reg-mux", }, |
|---|
| 31 | 32 | { /* sentinel */ } |
|---|
| 32 | 33 | }; |
|---|
| 33 | 34 | MODULE_DEVICE_TABLE(of, mux_mmio_dt_ids); |
|---|
| .. | .. |
|---|
| 43 | 44 | int ret; |
|---|
| 44 | 45 | int i; |
|---|
| 45 | 46 | |
|---|
| 46 | | - regmap = syscon_node_to_regmap(np->parent); |
|---|
| 47 | + if (of_device_is_compatible(np, "mmio-mux")) |
|---|
| 48 | + regmap = syscon_node_to_regmap(np->parent); |
|---|
| 49 | + else |
|---|
| 50 | + regmap = dev_get_regmap(dev->parent, NULL) ?: ERR_PTR(-ENODEV); |
|---|
| 47 | 51 | if (IS_ERR(regmap)) { |
|---|
| 48 | 52 | ret = PTR_ERR(regmap); |
|---|
| 49 | 53 | dev_err(dev, "failed to get regmap: %d\n", ret); |
|---|