* [PATCH 3/4] phy: qcom-ufs: Remove -always-on property [not found] <20170119104739.4376-1-bjorn.andersson@linaro.org> @ 2017-01-19 10:47 ` Bjorn Andersson 2017-01-19 19:39 ` Vivek Gautam [not found] ` <20170119104739.4376-3-bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 0 siblings, 2 replies; 4+ messages in thread From: Bjorn Andersson @ 2017-01-19 10:47 UTC (permalink / raw) To: Kishon Vijay Abraham I Cc: linux-kernel, linux-arm-msm, Rob Herring, Mark Rutland, devicetree, Subhash Jadavani, Vivek Gautam 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. Cc: Subhash Jadavani <subhashj@codeaurora.org> Cc: Vivek Gautam <vivek.gautam@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> --- Documentation/devicetree/bindings/ufs/ufs-qcom.txt | 1 - drivers/phy/phy-qcom-ufs-i.h | 1 - drivers/phy/phy-qcom-ufs.c | 5 +---- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/ufs/ufs-qcom.txt b/Documentation/devicetree/bindings/ufs/ufs-qcom.txt index b6b5130e5f65..1f69ee1a61ea 100644 --- a/Documentation/devicetree/bindings/ufs/ufs-qcom.txt +++ b/Documentation/devicetree/bindings/ufs/ufs-qcom.txt @@ -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: diff --git a/drivers/phy/phy-qcom-ufs-i.h b/drivers/phy/phy-qcom-ufs-i.h index d505d98cf5f8..13b02b7de30b 100644 --- a/drivers/phy/phy-qcom-ufs-i.h +++ b/drivers/phy/phy-qcom-ufs-i.h @@ -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 { diff --git a/drivers/phy/phy-qcom-ufs.c b/drivers/phy/phy-qcom-ufs.c index bbd317158084..c145fa6e824c 100644 --- a/drivers/phy/phy-qcom-ufs.c +++ b/drivers/phy/phy-qcom-ufs.c @@ -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); -- 2.11.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 3/4] phy: qcom-ufs: Remove -always-on property 2017-01-19 10:47 ` [PATCH 3/4] phy: qcom-ufs: Remove -always-on property Bjorn Andersson @ 2017-01-19 19:39 ` Vivek Gautam [not found] ` <20170119104739.4376-3-bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 1 sibling, 0 replies; 4+ messages in thread From: Vivek Gautam @ 2017-01-19 19:39 UTC (permalink / raw) To: Bjorn Andersson Cc: Kishon Vijay Abraham I, linux-kernel@vger.kernel.org, linux-arm-msm, Rob Herring, Mark Rutland, devicetree@vger.kernel.org, Subhash Jadavani On Thu, Jan 19, 2017 at 4:17 PM, Bjorn Andersson <bjorn.andersson@linaro.org> wrote: > 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. > > Cc: Subhash Jadavani <subhashj@codeaurora.org> > Cc: Vivek Gautam <vivek.gautam@codeaurora.org> > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> > --- Looks good. Reviewed-by: Vivek Gautam <vivek.gautam@codeaurora.org> Regards Vivek > Documentation/devicetree/bindings/ufs/ufs-qcom.txt | 1 - > drivers/phy/phy-qcom-ufs-i.h | 1 - > drivers/phy/phy-qcom-ufs.c | 5 +---- > 3 files changed, 1 insertion(+), 6 deletions(-) > > diff --git a/Documentation/devicetree/bindings/ufs/ufs-qcom.txt b/Documentation/devicetree/bindings/ufs/ufs-qcom.txt > index b6b5130e5f65..1f69ee1a61ea 100644 > --- a/Documentation/devicetree/bindings/ufs/ufs-qcom.txt > +++ b/Documentation/devicetree/bindings/ufs/ufs-qcom.txt > @@ -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: > > diff --git a/drivers/phy/phy-qcom-ufs-i.h b/drivers/phy/phy-qcom-ufs-i.h > index d505d98cf5f8..13b02b7de30b 100644 > --- a/drivers/phy/phy-qcom-ufs-i.h > +++ b/drivers/phy/phy-qcom-ufs-i.h > @@ -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 { > diff --git a/drivers/phy/phy-qcom-ufs.c b/drivers/phy/phy-qcom-ufs.c > index bbd317158084..c145fa6e824c 100644 > --- a/drivers/phy/phy-qcom-ufs.c > +++ b/drivers/phy/phy-qcom-ufs.c > @@ -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); > -- > 2.11.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20170119104739.4376-3-bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* Re: [PATCH 3/4] phy: qcom-ufs: Remove -always-on property [not found] ` <20170119104739.4376-3-bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2017-01-20 22:53 ` Subhash Jadavani 2017-01-21 20:43 ` Rob Herring 1 sibling, 0 replies; 4+ messages in thread From: Subhash Jadavani @ 2017-01-20 22:53 UTC (permalink / raw) To: Bjorn Andersson Cc: Kishon Vijay Abraham I, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA, Vivek Gautam On 2017-01-19 02:47, Bjorn Andersson wrote: > 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. > > Cc: Subhash Jadavani <subhashj-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> > Cc: Vivek Gautam <vivek.gautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> > Signed-off-by: Bjorn Andersson <bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > --- > Documentation/devicetree/bindings/ufs/ufs-qcom.txt | 1 - > drivers/phy/phy-qcom-ufs-i.h | 1 - > drivers/phy/phy-qcom-ufs.c | 5 +---- > 3 files changed, 1 insertion(+), 6 deletions(-) > > diff --git a/Documentation/devicetree/bindings/ufs/ufs-qcom.txt > b/Documentation/devicetree/bindings/ufs/ufs-qcom.txt > index b6b5130e5f65..1f69ee1a61ea 100644 > --- a/Documentation/devicetree/bindings/ufs/ufs-qcom.txt > +++ b/Documentation/devicetree/bindings/ufs/ufs-qcom.txt > @@ -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: > > diff --git a/drivers/phy/phy-qcom-ufs-i.h > b/drivers/phy/phy-qcom-ufs-i.h > index d505d98cf5f8..13b02b7de30b 100644 > --- a/drivers/phy/phy-qcom-ufs-i.h > +++ b/drivers/phy/phy-qcom-ufs-i.h > @@ -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 { > diff --git a/drivers/phy/phy-qcom-ufs.c b/drivers/phy/phy-qcom-ufs.c > index bbd317158084..c145fa6e824c 100644 > --- a/drivers/phy/phy-qcom-ufs.c > +++ b/drivers/phy/phy-qcom-ufs.c > @@ -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); Looks good to me. Reviewed-by: Subhash Jadavani <subhashj-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3/4] phy: qcom-ufs: Remove -always-on property [not found] ` <20170119104739.4376-3-bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2017-01-20 22:53 ` Subhash Jadavani @ 2017-01-21 20:43 ` Rob Herring 1 sibling, 0 replies; 4+ messages in thread From: Rob Herring @ 2017-01-21 20:43 UTC (permalink / raw) To: Bjorn Andersson Cc: Kishon Vijay Abraham I, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA, Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA, Subhash Jadavani, Vivek Gautam On Thu, Jan 19, 2017 at 02:47:38AM -0800, Bjorn Andersson wrote: > 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. > > Cc: Subhash Jadavani <subhashj-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> > Cc: Vivek Gautam <vivek.gautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> > Signed-off-by: Bjorn Andersson <bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > --- > Documentation/devicetree/bindings/ufs/ufs-qcom.txt | 1 - > drivers/phy/phy-qcom-ufs-i.h | 1 - > drivers/phy/phy-qcom-ufs.c | 5 +---- > 3 files changed, 1 insertion(+), 6 deletions(-) Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-21 20:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170119104739.4376-1-bjorn.andersson@linaro.org>
2017-01-19 10:47 ` [PATCH 3/4] phy: qcom-ufs: Remove -always-on property Bjorn Andersson
2017-01-19 19:39 ` Vivek Gautam
[not found] ` <20170119104739.4376-3-bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-01-20 22:53 ` Subhash Jadavani
2017-01-21 20:43 ` Rob Herring
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).