Re: [PATCH V11 7/9] regulator: Add a regulator driver for the PM8008 PMIC

From: Stephen Boyd
Date: Fri May 06 2022 - 10:43:20 EST


Quoting Satya Priya (2022-05-05 02:25:37)
> diff --git a/drivers/regulator/qcom-pm8008-regulator.c b/drivers/regulator/qcom-pm8008-regulator.c
> new file mode 100644
> index 0000000..9e2d531
> --- /dev/null
> +++ b/drivers/regulator/qcom-pm8008-regulator.c
> @@ -0,0 +1,216 @@
[...]
> +
> +static const struct linear_range pldo_ranges[] = {
> + REGULATOR_LINEAR_RANGE(1504000, 0, 237, 8000),
> +};
> +
> +static const struct pm8008_regulator_data reg_data[] = {
> + /* name parent base min_uv max_uv headroom_uv voltage_range */
> + { "ldo1", "vdd_l1_l2", 0x4000, 528000, 1504000, 225000, nldo_ranges, },

Why can't 'base' come from the reg property in DT?

> + { "ldo2", "vdd_l1_l2", 0x4100, 528000, 1504000, 225000, nldo_ranges, },
> + { "ldo3", "vdd_l3_l4", 0x4200, 1504000, 3400000, 300000, pldo_ranges, },
> + { "ldo4", "vdd_l3_l4", 0x4300, 1504000, 3400000, 300000, pldo_ranges, },
> + { "ldo5", "vdd_l5", 0x4400, 1504000, 3400000, 200000, pldo_ranges, },
> + { "ldo6", "vdd_l6", 0x4500, 1504000, 3400000, 200000, pldo_ranges, },
> + { "ldo7", "vdd_l7", 0x4600, 1504000, 3400000, 200000, pldo_ranges, },
> +};