[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <1400159454-31107-4-git-send-email-rahul.sharma@samsung.com>
Date: Thu, 15 May 2014 18:40:54 +0530
From: Rahul Sharma <rahul.sharma@...sung.com>
To: linux-kernel@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
dri-devel@...ts.freedesktop.org
Cc: a.hajda@...sung.com, t.stanislaws@...sung.com,
thierry.reding@...il.com, devicetree@...r.kernel.org,
kgene.kim@...sung.com, kishon@...com, kyungmin.park@...sung.com,
robh+dt@...nel.org, grant.likely@...aro.org,
sylvester.nawrocki@...il.com, joshi@...sung.com,
r.sh.open@...il.com, Rahul Sharma <rahul.sharma@...sung.com>
Subject: [PATCH v4 3/3] s5p-tv: hdmi: use hdmiphy as PHY
From: Tomasz Stanislawski <t.stanislaws@...sung.com>
The HDMIPHY (physical interface) is controlled by a single
bit in a power controller's regiter. It was implemented
as clock. It was a simple but effective hack.
This patch makes S5P-HDMI driver to control HDMIPHY via PHY interface.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@...sung.com>
Signed-off-by: Rahul Sharma <Rahul.Sharma@...sung.com>
---
drivers/media/platform/s5p-tv/hdmi_drv.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/media/platform/s5p-tv/hdmi_drv.c b/drivers/media/platform/s5p-tv/hdmi_drv.c
index 534722c..8013e52 100644
--- a/drivers/media/platform/s5p-tv/hdmi_drv.c
+++ b/drivers/media/platform/s5p-tv/hdmi_drv.c
@@ -32,6 +32,7 @@
#include <linux/clk.h>
#include <linux/regulator/consumer.h>
#include <linux/v4l2-dv-timings.h>
+#include <linux/phy/phy.h>
#include <media/s5p_hdmi.h>
#include <media/v4l2-common.h>
@@ -66,7 +67,7 @@ struct hdmi_resources {
struct clk *sclk_hdmi;
struct clk *sclk_pixel;
struct clk *sclk_hdmiphy;
- struct clk *hdmiphy;
+ struct phy *hdmiphy;
struct regulator_bulk_data *regul_bulk;
int regul_count;
};
@@ -586,7 +587,7 @@ static int hdmi_resource_poweron(struct hdmi_resources *res)
if (ret < 0)
return ret;
/* power-on hdmi physical interface */
- clk_enable(res->hdmiphy);
+ phy_power_on(res->hdmiphy);
/* use VPP as parent clock; HDMIPHY is not working yet */
clk_set_parent(res->sclk_hdmi, res->sclk_pixel);
/* turn clocks on */
@@ -600,7 +601,7 @@ static void hdmi_resource_poweroff(struct hdmi_resources *res)
/* turn clocks off */
clk_disable(res->sclk_hdmi);
/* power-off hdmiphy */
- clk_disable(res->hdmiphy);
+ phy_power_off(res->hdmiphy);
/* turn HDMI power off */
regulator_bulk_disable(res->regul_count, res->regul_bulk);
}
@@ -784,7 +785,7 @@ static void hdmi_resources_cleanup(struct hdmi_device *hdev)
/* kfree is NULL-safe */
kfree(res->regul_bulk);
if (!IS_ERR(res->hdmiphy))
- clk_put(res->hdmiphy);
+ phy_put(res->hdmiphy);
if (!IS_ERR(res->sclk_hdmiphy))
clk_put(res->sclk_hdmiphy);
if (!IS_ERR(res->sclk_pixel))
@@ -835,7 +836,7 @@ static int hdmi_resources_init(struct hdmi_device *hdev)
dev_err(dev, "failed to get clock 'sclk_hdmiphy'\n");
goto fail;
}
- res->hdmiphy = clk_get(dev, "hdmiphy");
+ res->hdmiphy = phy_get(dev, "hdmiphy");
if (IS_ERR(res->hdmiphy)) {
dev_err(dev, "failed to get clock 'hdmiphy'\n");
goto fail;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists