[PATCH v2 2/3] drivers: ufs: add helper for phy_initialization callback
Michal Simek
michal.simek at amd.com
Wed Feb 11 07:24:57 CET 2026
On 2/10/26 17:22, Julien Stephan wrote:
> Introduce ufshcd_ops_phy_initialization() as a helper for invoking the
> phy_initialization callback from ufs_hba_ops.
>
> This mirrors the existing helper pattern used for other ufs_hba_ops
> callbacks and keeps the call sites consistent and easier to maintain.
>
> Signed-off-by: Julien Stephan <jstephan at baylibre.com>
> ---
> drivers/ufs/ufs-rockchip.c | 10 ++++------
> drivers/ufs/ufs.h | 8 ++++++++
> 2 files changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/ufs/ufs-rockchip.c b/drivers/ufs/ufs-rockchip.c
> index 0384244387d..cad753d5990 100644
> --- a/drivers/ufs/ufs-rockchip.c
> +++ b/drivers/ufs/ufs-rockchip.c
> @@ -30,12 +30,10 @@ static int ufs_rockchip_hce_enable_notify(struct ufs_hba *hba,
> ufshcd_dme_reset(hba);
> ufshcd_dme_enable(hba);
>
> - if (hba->ops->phy_initialization) {
> - err = hba->ops->phy_initialization(hba);
> - if (err)
> - dev_err(hba->dev,
> - "Phy init failed (%d)\n", err);
> - }
> + ret = ufshcd_ops_phy_initialization(hba);
> + if (err)
> + dev_err(hba->dev,
> + "Phy init failed (%d)\n", err);
nit: That can be on the same line right?
M
More information about the U-Boot
mailing list