mux: mmio: use reg property when parent device is not a syscon
authorAndrew Davis <afd@ti.com>
Thu, 4 Jan 2024 15:45:52 +0000 (09:45 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Jan 2024 16:01:14 +0000 (17:01 +0100)
commit2765149273f4b52beb07256c3e4686c065a5f8a8
treeaad2e6f7d09e051b862ff99afd34c3f709998b6a
parentb1b9f7a494400c0c39f8cd83de3aaa6111c55087
mux: mmio: use reg property when parent device is not a syscon

The DT binding for the reg-mux compatible states it can be used when the
"parent device of mux controller is not syscon device". It also allows
for a reg property. When the reg property is provided, use that to
identify the address space for this mux. If not provided fallback to
using the parent device as a regmap provider.

While here use dev_err_probe() in the error path to prevent printing
a message on probe defer which now can happen in extra ways.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
Acked-by: Peter Rosin <peda@axentia.se>
Link: https://lore.kernel.org/r/20240104154552.17852-1-afd@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mux/mmio.c