Skip to content

Commit 67e4085

Browse files
petegriffinmartinkpetersen
authored andcommitted
scsi: ufs: exynos: Move phy calls to .exit() callback
ufshcd_pltfrm_remove() calls ufshcd_remove(hba) which in turn calls ufshcd_hba_exit(). By moving the phy_power_off() and phy_exit() calls to the newly created .exit callback they get called by ufshcd_variant_hba_exit() before ufshcd_hba_exit() turns off the regulators. This is also similar flow to the ufs-qcom driver. Signed-off-by: Peter Griffin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent deac9ad commit 67e4085

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

drivers/ufs/host/ufs-exynos.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,6 +1522,14 @@ static int exynos_ufs_init(struct ufs_hba *hba)
15221522
return ret;
15231523
}
15241524

1525+
static void exynos_ufs_exit(struct ufs_hba *hba)
1526+
{
1527+
struct exynos_ufs *ufs = ufshcd_get_variant(hba);
1528+
1529+
phy_power_off(ufs->phy);
1530+
phy_exit(ufs->phy);
1531+
}
1532+
15251533
static int exynos_ufs_host_reset(struct ufs_hba *hba)
15261534
{
15271535
struct exynos_ufs *ufs = ufshcd_get_variant(hba);
@@ -1977,6 +1985,7 @@ static int gs101_ufs_pre_pwr_change(struct exynos_ufs *ufs,
19771985
static const struct ufs_hba_variant_ops ufs_hba_exynos_ops = {
19781986
.name = "exynos_ufs",
19791987
.init = exynos_ufs_init,
1988+
.exit = exynos_ufs_exit,
19801989
.hce_enable_notify = exynos_ufs_hce_enable_notify,
19811990
.link_startup_notify = exynos_ufs_link_startup_notify,
19821991
.pwr_change_notify = exynos_ufs_pwr_change_notify,
@@ -2015,13 +2024,7 @@ static int exynos_ufs_probe(struct platform_device *pdev)
20152024

20162025
static void exynos_ufs_remove(struct platform_device *pdev)
20172026
{
2018-
struct ufs_hba *hba = platform_get_drvdata(pdev);
2019-
struct exynos_ufs *ufs = ufshcd_get_variant(hba);
2020-
20212027
ufshcd_pltfrm_remove(pdev);
2022-
2023-
phy_power_off(ufs->phy);
2024-
phy_exit(ufs->phy);
20252028
}
20262029

20272030
static struct exynos_ufs_uic_attr exynos7_uic_attr = {

0 commit comments

Comments
 (0)