aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2017-04-28 12:17:08 +0200
committerSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2017-04-28 12:31:30 +0200
commit1443413b009f4fe68af378b66f19dfc5b6180015 (patch)
tree8af8e0606b88d3325b54783e307ce542b4ed6b02
parent529d7441f4eeaa453669d3dd62386a298a0cd12a (diff)
phy: apq8064: add clkoe pin supportlegacy/tracking-qcomlt-fixes
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-rw-r--r--drivers/phy/phy-qcom-apq8064-sata.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/phy/phy-qcom-apq8064-sata.c b/drivers/phy/phy-qcom-apq8064-sata.c
index 69ce2afac015..9e97eb47d76d 100644
--- a/drivers/phy/phy-qcom-apq8064-sata.c
+++ b/drivers/phy/phy-qcom-apq8064-sata.c
@@ -16,6 +16,7 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/time.h>
+#include <linux/of_gpio.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/slab.h>
@@ -218,6 +219,15 @@ static int qcom_apq8064_sata_phy_probe(struct platform_device *pdev)
struct phy_provider *phy_provider;
struct phy *generic_phy;
int ret;
+ int sataclk_gpio;
+
+ sataclk_gpio = of_get_named_gpio(dev->of_node, "clkoe-gpio", 0);
+ if (sataclk_gpio >= 0) {
+ devm_gpio_request_one(dev, sataclk_gpio,
+ GPIOF_OUT_INIT_HIGH, "RESET");
+ gpio_direction_output(sataclk_gpio, 1);
+ gpio_set_value(sataclk_gpio, 1);
+ }
phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL);
if (!phy)