regulator: fixed: Add support for parent-supply device tree binding

Add support to the fixed regulator driver for the optional
parent-supply device tree binding.  If this binding is specified
for a regulator device node, then the driver will register that
it has a parent supply named "parent".  This allows GPIO
controlled regulators to capture supply chain dependency
properly.

Change-Id: I29e34f8063f816bab5609454dcf6fbf57c52272d
Signed-off-by: David Collins <collinsd@codeaurora.org>
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 7e74eca..d0410a4 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -104,6 +104,9 @@
 	if (of_find_property(np, "enable-active-high", NULL))
 		config->enable_high = true;
 
+	if (of_find_property(np, "parent-supply", NULL))
+		init_data->supply_regulator = "parent";
+
 	return config;
 }