Skip to content

Commit 2c99e3d

Browse files
krzkmartinkpetersen
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent dc1d7b3 commit 2c99e3d

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

drivers/ufs/host/ufs-mediatek.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ static int ufs_mtk_vreg_fix_vcc(struct ufs_hba *hba)
806806
return 0;
807807
}
808808

809-
err = ufshcd_populate_vreg(dev, vcc_name, &info->vcc);
809+
err = ufshcd_populate_vreg(dev, vcc_name, &info->vcc, false);
810810
if (err)
811811
return err;
812812

drivers/ufs/host/ufshcd-pltfrm.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static bool phandle_exists(const struct device_node *np,
121121

122122
#define MAX_PROP_SIZE 32
123123
int ufshcd_populate_vreg(struct device *dev, const char *name,
124-
struct ufs_vreg **out_vreg)
124+
struct ufs_vreg **out_vreg, bool skip_current)
125125
{
126126
char prop_name[MAX_PROP_SIZE];
127127
struct ufs_vreg *vreg = NULL;
@@ -147,6 +147,11 @@ int ufshcd_populate_vreg(struct device *dev, const char *name,
147147
if (!vreg->name)
148148
return -ENOMEM;
149149

150+
if (skip_current) {
151+
vreg->max_uA = 0;
152+
goto out;
153+
}
154+
150155
snprintf(prop_name, MAX_PROP_SIZE, "%s-max-microamp", name);
151156
if (of_property_read_u32(np, prop_name, &vreg->max_uA)) {
152157
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)
175180
struct device *dev = hba->dev;
176181
struct ufs_vreg_info *info = &hba->vreg_info;
177182

178-
err = ufshcd_populate_vreg(dev, "vdd-hba", &info->vdd_hba);
183+
err = ufshcd_populate_vreg(dev, "vdd-hba", &info->vdd_hba, true);
179184
if (err)
180185
goto out;
181186

182-
err = ufshcd_populate_vreg(dev, "vcc", &info->vcc);
187+
err = ufshcd_populate_vreg(dev, "vcc", &info->vcc, false);
183188
if (err)
184189
goto out;
185190

186-
err = ufshcd_populate_vreg(dev, "vccq", &info->vccq);
191+
err = ufshcd_populate_vreg(dev, "vccq", &info->vccq, false);
187192
if (err)
188193
goto out;
189194

190-
err = ufshcd_populate_vreg(dev, "vccq2", &info->vccq2);
195+
err = ufshcd_populate_vreg(dev, "vccq2", &info->vccq2, false);
191196
out:
192197
return err;
193198
}

drivers/ufs/host/ufshcd-pltfrm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ void ufshcd_init_pwr_dev_param(struct ufs_dev_params *dev_param);
3232
int ufshcd_pltfrm_init(struct platform_device *pdev,
3333
const struct ufs_hba_variant_ops *vops);
3434
int ufshcd_populate_vreg(struct device *dev, const char *name,
35-
struct ufs_vreg **out_vreg);
35+
struct ufs_vreg **out_vreg, bool skip_current);
3636

3737
#endif /* UFSHCD_PLTFRM_H_ */

0 commit comments

Comments
 (0)