mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 05:32:00 +00:00
scsi: ufs: core: Do not look for unsupported vdd-hba-max-microamp
Bindings do not allow vdd-hba-max-microamp property and the driver does not use it (does not control load of vdd-hba supply). Skip looking for this property to avoid misleading dmesg messages: ufshcd-qcom 1d84000.ufs: ufshcd_populate_vreg: unable to find vdd-hba-max-microamp Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230906113302.201888-1-krzysztof.kozlowski@linaro.org Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
dc1d7b3633
commit
2c99e3d7d2
@ -806,7 +806,7 @@ static int ufs_mtk_vreg_fix_vcc(struct ufs_hba *hba)
|
||||
return 0;
|
||||
}
|
||||
|
||||
err = ufshcd_populate_vreg(dev, vcc_name, &info->vcc);
|
||||
err = ufshcd_populate_vreg(dev, vcc_name, &info->vcc, false);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
@ -121,7 +121,7 @@ static bool phandle_exists(const struct device_node *np,
|
||||
|
||||
#define MAX_PROP_SIZE 32
|
||||
int ufshcd_populate_vreg(struct device *dev, const char *name,
|
||||
struct ufs_vreg **out_vreg)
|
||||
struct ufs_vreg **out_vreg, bool skip_current)
|
||||
{
|
||||
char prop_name[MAX_PROP_SIZE];
|
||||
struct ufs_vreg *vreg = NULL;
|
||||
@ -147,6 +147,11 @@ int ufshcd_populate_vreg(struct device *dev, const char *name,
|
||||
if (!vreg->name)
|
||||
return -ENOMEM;
|
||||
|
||||
if (skip_current) {
|
||||
vreg->max_uA = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
snprintf(prop_name, MAX_PROP_SIZE, "%s-max-microamp", name);
|
||||
if (of_property_read_u32(np, prop_name, &vreg->max_uA)) {
|
||||
dev_info(dev, "%s: unable to find %s\n", __func__, prop_name);
|
||||
@ -175,19 +180,19 @@ static int ufshcd_parse_regulator_info(struct ufs_hba *hba)
|
||||
struct device *dev = hba->dev;
|
||||
struct ufs_vreg_info *info = &hba->vreg_info;
|
||||
|
||||
err = ufshcd_populate_vreg(dev, "vdd-hba", &info->vdd_hba);
|
||||
err = ufshcd_populate_vreg(dev, "vdd-hba", &info->vdd_hba, true);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
err = ufshcd_populate_vreg(dev, "vcc", &info->vcc);
|
||||
err = ufshcd_populate_vreg(dev, "vcc", &info->vcc, false);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
err = ufshcd_populate_vreg(dev, "vccq", &info->vccq);
|
||||
err = ufshcd_populate_vreg(dev, "vccq", &info->vccq, false);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
err = ufshcd_populate_vreg(dev, "vccq2", &info->vccq2);
|
||||
err = ufshcd_populate_vreg(dev, "vccq2", &info->vccq2, false);
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
@ -32,6 +32,6 @@ void ufshcd_init_pwr_dev_param(struct ufs_dev_params *dev_param);
|
||||
int ufshcd_pltfrm_init(struct platform_device *pdev,
|
||||
const struct ufs_hba_variant_ops *vops);
|
||||
int ufshcd_populate_vreg(struct device *dev, const char *name,
|
||||
struct ufs_vreg **out_vreg);
|
||||
struct ufs_vreg **out_vreg, bool skip_current);
|
||||
|
||||
#endif /* UFSHCD_PLTFRM_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user