]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
phy: qcom-ufs: Remove -always-on property
authorBjorn Andersson <bjorn.andersson@linaro.org>
Sun, 22 Jan 2017 21:17:48 +0000 (13:17 -0800)
committerKishon Vijay Abraham I <kishon@ti.com>
Fri, 27 Jan 2017 07:36:52 +0000 (13:06 +0530)
The fact that a regulator is always-on is a property of the regulator,
not a specific consumer. Implementing this in the driver leads to a
system behaviour that is dependent on if the Qualcomm UFS PHY was ever
(partially) probed.

If the specific regulator should be always on in a particular device,
mark it so by specifying "regulator-always-on" in the regulator node.

Reviewed-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Documentation/devicetree/bindings/ufs/ufs-qcom.txt
drivers/phy/phy-qcom-ufs-i.h
drivers/phy/phy-qcom-ufs.c

index b6b5130e5f65a8e625a25bfde7ad3593872040d8..1f69ee1a61ea25b776671be1becb8e8f63a29eb1 100644 (file)
@@ -29,7 +29,6 @@ Optional properties:
 - vdda-pll-max-microamp : specifies max. load that can be drawn from pll supply
 - vddp-ref-clk-supply   : phandle to UFS device ref_clk pad power supply
 - vddp-ref-clk-max-microamp : specifies max. load that can be drawn from this supply
-- vddp-ref-clk-always-on : specifies if this supply needs to be kept always on
 
 Example:
 
index d505d98cf5f8187c1be36c93ca05ac5c7e510804..13b02b7de30b3f0e82d47ffbaa5824bf212a6f15 100644 (file)
@@ -77,7 +77,6 @@ struct ufs_qcom_phy_vreg {
        int min_uV;
        int max_uV;
        bool enabled;
-       bool is_always_on;
 };
 
 struct ufs_qcom_phy {
index bbd3171580848100c2cd1bb1bab4753d85c363bd..c145fa6e824c913ac21ba0c5be49410a2681dd6f 100644 (file)
@@ -242,9 +242,6 @@ static int ufs_qcom_phy_init_vreg(struct device *dev,
                        }
                        err = 0;
                }
-               snprintf(prop_name, MAX_PROP_NAME, "%s-always-on", name);
-               vreg->is_always_on = of_property_read_bool(dev->of_node,
-                                                          prop_name);
        }
 
        if (!strcmp(name, "vdda-pll")) {
@@ -402,7 +399,7 @@ static int ufs_qcom_phy_disable_vreg(struct device *dev,
 {
        int ret = 0;
 
-       if (!vreg || !vreg->enabled || vreg->is_always_on)
+       if (!vreg || !vreg->enabled)
                goto out;
 
        ret = regulator_disable(vreg->reg);