/* Linux-compatible syscon-to-regmap The syscon node can be bound to another driver, but still works as a syscon provider.  */
struct regmap* syscon_node_to_regmap(ofnode node)
/* Linux-compatible syscon-to-regmap The syscon node can be bound to another driver, but still works as a syscon provider.  */
struct regmap* syscon_node_to_regmap(ofnode node)
{
	struct udevice *dev;
	struct regmap *r;
	if (uclass_get_device_by_ofnode(UCLASS_SYSCON, node, &dev))
		if (syscon_probe_by_ofnode(node, &dev))
			return ERR_PTR(-ENODEV);
	r = syscon_get_regmap(dev);
	if (!r) {
		dev_dbg(dev, "unable to find regmap\n");
		return ERR_PTR(-ENODEV);
	}
	return r;
}