Skip to content

Commit 2392050

Browse files
cristiccvinodkoul
authored andcommitted
phy: rockchip: samsung-hdptx: Provide config params validation support
Implement the phy_ops.validate() callback to allow checking the PHY configuration parameters without actually applying them. Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Cristian Ciocaltea <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent c871a31 commit 2392050

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,10 +1799,22 @@ static int rk_hdptx_phy_configure(struct phy *phy, union phy_configure_opts *opt
17991799
return 0;
18001800
}
18011801

1802+
static int rk_hdptx_phy_validate(struct phy *phy, enum phy_mode mode,
1803+
int submode, union phy_configure_opts *opts)
1804+
{
1805+
struct rk_hdptx_phy *hdptx = phy_get_drvdata(phy);
1806+
1807+
if (mode != PHY_MODE_DP)
1808+
return rk_hdptx_phy_verify_hdmi_config(hdptx, &opts->hdmi);
1809+
1810+
return rk_hdptx_phy_verify_dp_config(hdptx, &opts->dp);
1811+
}
1812+
18021813
static const struct phy_ops rk_hdptx_phy_ops = {
18031814
.power_on = rk_hdptx_phy_power_on,
18041815
.power_off = rk_hdptx_phy_power_off,
18051816
.configure = rk_hdptx_phy_configure,
1817+
.validate = rk_hdptx_phy_validate,
18061818
.owner = THIS_MODULE,
18071819
};
18081820

0 commit comments

Comments
 (0)