mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
phy: rockchip-inno-video-combo: use stand phy_mode definition
Switch from rockchip defined PHY_MODE_VIDEO_xx to stand PHY_MODE_xx There is no PHY_MODE_TTL/RGB definition in stand phy_mode, so use RGB as the default mode. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Change-Id: Idaa632df3bf8cd31f1f1848e0b85444c56944fc8
This commit is contained in:
@@ -207,7 +207,6 @@ struct inno_video_phy {
|
||||
void __iomem *phy_base;
|
||||
void __iomem *host_base;
|
||||
struct reset_control *rst;
|
||||
enum phy_mode mode;
|
||||
|
||||
struct {
|
||||
struct clk_hw hw;
|
||||
@@ -529,6 +528,7 @@ static void inno_video_phy_ttl_mode_enable(struct inno_video_phy *inno)
|
||||
static int inno_video_phy_power_on(struct phy *phy)
|
||||
{
|
||||
struct inno_video_phy *inno = phy_get_drvdata(phy);
|
||||
enum phy_mode mode = phy_get_mode(phy);
|
||||
|
||||
clk_prepare_enable(inno->pclk_host);
|
||||
clk_prepare_enable(inno->pclk_phy);
|
||||
@@ -541,18 +541,16 @@ static int inno_video_phy_power_on(struct phy *phy)
|
||||
phy_update_bits(inno, REGISTER_PART_ANALOG, 0x00,
|
||||
POWER_WORK_MASK, POWER_WORK_ENABLE);
|
||||
|
||||
switch (inno->mode) {
|
||||
case PHY_MODE_VIDEO_MIPI:
|
||||
switch (mode) {
|
||||
case PHY_MODE_MIPI_DPHY:
|
||||
inno_video_phy_mipi_mode_enable(inno);
|
||||
break;
|
||||
case PHY_MODE_VIDEO_LVDS:
|
||||
case PHY_MODE_LVDS:
|
||||
inno_video_phy_lvds_mode_enable(inno);
|
||||
break;
|
||||
case PHY_MODE_VIDEO_TTL:
|
||||
default:
|
||||
inno_video_phy_ttl_mode_enable(inno);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -588,18 +586,6 @@ static int inno_video_phy_power_off(struct phy *phy)
|
||||
|
||||
static int inno_video_phy_set_mode(struct phy *phy, enum phy_mode mode)
|
||||
{
|
||||
struct inno_video_phy *inno = phy_get_drvdata(phy);
|
||||
|
||||
switch (mode) {
|
||||
case PHY_MODE_VIDEO_MIPI:
|
||||
case PHY_MODE_VIDEO_LVDS:
|
||||
case PHY_MODE_VIDEO_TTL:
|
||||
inno->mode = mode;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user