phy: phy-mtk-tphy: fix the phy type setting issue
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Wed, 14 Sep 2022 06:07:46 +0000 (14:07 +0800)
committerVinod Koul <vkoul@kernel.org>
Tue, 20 Sep 2022 06:29:06 +0000 (11:59 +0530)
commit931c05a8cb1be029ef2fbc1e4af313d4cb297c47
tree6a60dd661acfac16078fac0a7247ddc414c4a4f2
parent1e77f026eb094cac123e701f97a8c042c82b32a3
phy: phy-mtk-tphy: fix the phy type setting issue

The PHY type is not set if the index is non zero, prepare type
value according to the index, like as mask value.

Fixes: 39099a443358 ("phy: phy-mtk-tphy: support type switch by pericfg")
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220914060746.10004-7-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/mediatek/phy-mtk-tphy.c