If this property is missing, the default assumed is Active low.
 - gpio-open-drain: GPIO is open drain type.
   If this property is missing then default assumption is false.
+-vin-supply: Input supply name.
 
 Any property defined as part of the core regulator
 binding, defined in regulator.txt, can also be used.
                enable-active-high;
                regulator-boot-on;
                gpio-open-drain;
+               vin-supply = <&parent_reg>;
        };
 
        if (of_find_property(np, "gpio-open-drain", NULL))
                config->gpio_is_open_drain = true;
 
+       if (of_find_property(np, "vin-supply", NULL))
+               config->input_supply = "vin";
+
        return config;
 }
 
 
        drvdata->desc.enable_time = config->startup_delay;
 
+       if (config->input_supply) {
+               drvdata->desc.supply_name = kstrdup(config->input_supply,
+                                                       GFP_KERNEL);
+               if (!drvdata->desc.supply_name) {
+                       dev_err(&pdev->dev,
+                               "Failed to allocate input supply\n");
+                       ret = -ENOMEM;
+                       goto err_name;
+               }
+       }
+
        if (config->microvolts)
                drvdata->desc.n_voltages = 1;
 
        if (IS_ERR(drvdata->dev)) {
                ret = PTR_ERR(drvdata->dev);
                dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret);
-               goto err_name;
+               goto err_input;
        }
 
        platform_set_drvdata(pdev, drvdata);
 
        return 0;
 
+err_input:
+       kfree(drvdata->desc.supply_name);
 err_name:
        kfree(drvdata->desc.name);
 err:
        struct fixed_voltage_data *drvdata = platform_get_drvdata(pdev);
 
        regulator_unregister(drvdata->dev);
+       kfree(drvdata->desc.supply_name);
        kfree(drvdata->desc.name);
 
        return 0;
 
 /**
  * struct fixed_voltage_config - fixed_voltage_config structure
  * @supply_name:       Name of the regulator supply
+ * @input_supply:      Name of the input regulator supply
  * @microvolts:                Output voltage of regulator
  * @gpio:              GPIO to use for enable control
  *                     set to -EINVAL if not used
  */
 struct fixed_voltage_config {
        const char *supply_name;
+       const char *input_supply;
        int microvolts;
        int gpio;
        unsigned startup_delay;