regulator: qcom_pm8008: change reg property format from u16 to u32
Use of_property_read_u32() instead of of_property_read_u16() to read the "reg" property of each PM8008 regulator device tree node. This allows the "reg" property value to be specified in device tree without the parameter "/bits/ 16". This in turn avoids device tree compilation warnings like this one: arch/arm64/boot/dts/vendor/qcom/lahaina-pmic-overlay.dtsi:68.5-30: Warning (reg_format): /soc/i2c@a94000/pm8008i@8/qcom,pm8008i-regulator/regulator@4000:reg: property has invalid length (2 bytes) (#address-cells == 1, #size-cells == 0) Change-Id: I69d7af28339abf3b7ed1365ccfc9343958f944da Signed-off-by: David Collins <collinsd@codeaurora.org>
This commit is contained in:
parent
83c5fbd2f2
commit
0a87e5a641
@ -506,6 +506,7 @@ static int pm8008_register_ldo(struct pm8008_regulator *pm8008_reg,
|
||||
struct device_node *reg_node = pm8008_reg->of_node;
|
||||
char buff[MAX_REG_NAME];
|
||||
int rc, i, init_voltage;
|
||||
u32 base = 0;
|
||||
u8 reg;
|
||||
|
||||
/* get regulator data */
|
||||
@ -518,11 +519,12 @@ static int pm8008_register_ldo(struct pm8008_regulator *pm8008_reg,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
rc = of_property_read_u16(reg_node, "reg", &pm8008_reg->base);
|
||||
rc = of_property_read_u32(reg_node, "reg", &base);
|
||||
if (rc < 0) {
|
||||
pr_err("%s: failed to get regulator base rc=%d\n", name, rc);
|
||||
return rc;
|
||||
}
|
||||
pm8008_reg->base = base;
|
||||
|
||||
pm8008_reg->min_dropout_uv = reg_data[i].min_dropout_uv;
|
||||
of_property_read_u32(reg_node, "qcom,min-dropout-voltage",
|
||||
|
Loading…
Reference in New Issue
Block a user