diff options
author | 2023-02-16 17:02:26 +0100 | |
---|---|---|
committer | 2023-04-12 21:56:40 +0530 | |
commit | 605b90371912edb2214088e69f5e7e1121507062 (patch) | |
tree | 4d101146089d77ead60207a8df9fe8a05cd8bfbd /drivers/phy/mediatek/phy-mtk-hdmi.c | |
parent | dt-bindings: phy: mediatek: hdmi-phy: Add mt8195 compatible (diff) | |
download | linux-605b90371912edb2214088e69f5e7e1121507062.tar.gz linux-605b90371912edb2214088e69f5e7e1121507062.tar.bz2 linux-605b90371912edb2214088e69f5e7e1121507062.zip |
phy: phy-mtk-hdmi: Add generic phy configure callback
Some phys, such as mt8195, needs to have a configure callback defined.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
Link: https://lore.kernel.org/r/20220919-v8-2-a84c80468fe9@baylibre.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/mediatek/phy-mtk-hdmi.c')
-rw-r--r-- | drivers/phy/mediatek/phy-mtk-hdmi.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c b/drivers/phy/mediatek/phy-mtk-hdmi.c index b16d437d6721..32f713301768 100644 --- a/drivers/phy/mediatek/phy-mtk-hdmi.c +++ b/drivers/phy/mediatek/phy-mtk-hdmi.c @@ -8,10 +8,12 @@ static int mtk_hdmi_phy_power_on(struct phy *phy); static int mtk_hdmi_phy_power_off(struct phy *phy); +static int mtk_hdmi_phy_configure(struct phy *phy, union phy_configure_opts *opts); static const struct phy_ops mtk_hdmi_phy_dev_ops = { .power_on = mtk_hdmi_phy_power_on, .power_off = mtk_hdmi_phy_power_off, + .configure = mtk_hdmi_phy_configure, .owner = THIS_MODULE, }; @@ -43,6 +45,16 @@ static int mtk_hdmi_phy_power_off(struct phy *phy) return 0; } +static int mtk_hdmi_phy_configure(struct phy *phy, union phy_configure_opts *opts) +{ + struct mtk_hdmi_phy *hdmi_phy = phy_get_drvdata(phy); + + if (hdmi_phy->conf->hdmi_phy_configure) + return hdmi_phy->conf->hdmi_phy_configure(phy, opts); + + return 0; +} + static const struct phy_ops * mtk_hdmi_phy_dev_get_ops(const struct mtk_hdmi_phy *hdmi_phy) { |