Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1186532 > unrolled thread
| Started by | huang lin <hl@rock-chips.com> |
|---|---|
| First post | 2015-07-17 09:40 +0200 |
| Last post | 2015-07-20 20:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] phy: rockchip-usb: power down phy when rockchip phy probe huang lin <hl@rock-chips.com> - 2015-07-17 09:40 +0200
Re: [PATCH] phy: rockchip-usb: power down phy when rockchip phy probe Doug Anderson <dianders@chromium.org> - 2015-07-20 20:20 +0200
| From | huang lin <hl@rock-chips.com> |
|---|---|
| Date | 2015-07-17 09:40 +0200 |
| Subject | [PATCH] phy: rockchip-usb: power down phy when rockchip phy probe |
| Message-ID | <pN8pt-7fp-19@gated-at.bofh.it> |
rockchip phy are enable when soc reset, to save power consumption,
we disable it when probe, and enable each phy when it use
Signed-off-by: huang lin <hl@rock-chips.com>
---
drivers/phy/phy-rockchip-usb.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/phy/phy-rockchip-usb.c b/drivers/phy/phy-rockchip-usb.c
index 7d4c336..3b92d7f 100644
--- a/drivers/phy/phy-rockchip-usb.c
+++ b/drivers/phy/phy-rockchip-usb.c
@@ -98,6 +98,7 @@ static int rockchip_usb_phy_probe(struct platform_device *pdev)
struct device_node *child;
struct regmap *grf;
unsigned int reg_offset;
+ int err;
grf = syscon_regmap_lookup_by_phandle(dev->of_node, "rockchip,grf");
if (IS_ERR(grf)) {
@@ -129,6 +130,11 @@ static int rockchip_usb_phy_probe(struct platform_device *pdev)
return PTR_ERR(rk_phy->phy);
}
phy_set_drvdata(rk_phy->phy, rk_phy);
+
+ /* only power up usb phy when it use, so disable it when init*/
+ err = rockchip_usb_phy_power(rk_phy, 1);
+ if (err)
+ return err;
}
phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Doug Anderson <dianders@chromium.org> |
|---|---|
| Date | 2015-07-20 20:20 +0200 |
| Message-ID | <pOnPr-z1-1@gated-at.bofh.it> |
| In reply to | #1186532 |
hl, On Fri, Jul 17, 2015 at 12:29 AM, huang lin <hl@rock-chips.com> wrote: > rockchip phy are enable when soc reset, to save power consumption, > we disable it when probe, and enable each phy when it use > > Signed-off-by: huang lin <hl@rock-chips.com> > --- > drivers/phy/phy-rockchip-usb.c | 6 ++++++ > 1 file changed, 6 insertions(+) Looks right to me. Reviewed-by: Douglas Anderson <dianders@chromium.org> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web