[PATCH v2 4/4] scsi: ufs: remove "<name>-fixed-regulator" device tree property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"<name>-fixed-regulator" device tree property can be
safely removed because below things are fixed or resolved,

- "<name>-max-microamp" becomes optional property: Undefined
  "<name>-max-microamp" will not cause initialization fail.

- regulator_set_load operation now has rules: Only those regulators
  which have configured current limit from "<name>-max-microamp"
  property is allowed to change its load.

The difference of regulators which define "<name>-fixed-regulator"
or not is listed as below,

- "<name>-max-microamp": If an existed regulator which defined
  "<name>-fixed-regulator", it shall be lack of "<name>-max-microamp"
  property in device tree thus regulator_set_load behaviors will be
  the same as before this patch.

- "vcc-supply-1p8": This only impacts "vcc-supply" regulator. However
  vcc shall not define "<name>-fixed-regulator" in device tree
  otherwise ufshcd_config_vreg() will use zero voltage values as
  request to regulator_set_voltage() and may lead to unexpected
  results.

Therefore this patch is safe for all existed regulators with
"<name>-fixed-regulator" property already used.

Signed-off-by: Stanley Chu <stanley.chu@xxxxxxxxxxxx>
---
 drivers/scsi/ufs/ufshcd-pltfrm.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index 2f244d388ca8..a667e7ba1c8b 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -151,11 +151,6 @@ static int ufshcd_populate_vreg(struct device *dev, const char *name,
 
 	vreg->name = kstrdup(name, GFP_KERNEL);
 
-	/* if fixed regulator no need further initialization */
-	snprintf(prop_name, MAX_PROP_SIZE, "%s-fixed-regulator", name);
-	if (of_property_read_bool(np, prop_name))
-		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);
-- 
2.18.0




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux