Message ID | 20240327101724.2982-8-mihai.sain@microchip.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | regulator: mcp16502: Update the names from buck regulators | expand |
On Wed, Mar 27, 2024 at 12:17:24PM +0200, Mihai Sain wrote: > Use generic names for buck regulators to avoid any confusion. > Update the names from buck regulators in order to match > the datasheet block diagram for the buck regulators. > > Signed-off-by: Mihai Sain <mihai.sain@microchip.com> I know the regulator core will create dummy regulators when they are not provided in the devicetree, so I am not 100% on how backwards compatibility works here. You'll end up with a bunch of dummies and therefore the regulator-names and constraints on the regulator will be lost, no? Can you explain how is this backwards compatible with the old devicetrees? Thanks, Conor. > --- > drivers/regulator/mcp16502.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c > index 0c15a19fe83a..d6fc9f1afaef 100644 > --- a/drivers/regulator/mcp16502.c > +++ b/drivers/regulator/mcp16502.c > @@ -468,13 +468,13 @@ static const struct linear_range b234_ranges[] = { > > static const struct regulator_desc mcp16502_desc[] = { > /* MCP16502_REGULATOR(_name, _id, ranges, regulator_ops, ramp_table) */ > - MCP16502_REGULATOR("VDD_IO", BUCK1, b1l12_ranges, mcp16502_buck_ops, > + MCP16502_REGULATOR("BUCK1", BUCK1, b1l12_ranges, mcp16502_buck_ops, > mcp16502_ramp_b1l12), > - MCP16502_REGULATOR("VDD_DDR", BUCK2, b234_ranges, mcp16502_buck_ops, > + MCP16502_REGULATOR("BUCK2", BUCK2, b234_ranges, mcp16502_buck_ops, > mcp16502_ramp_b234), > - MCP16502_REGULATOR("VDD_CORE", BUCK3, b234_ranges, mcp16502_buck_ops, > + MCP16502_REGULATOR("BUCK3", BUCK3, b234_ranges, mcp16502_buck_ops, > mcp16502_ramp_b234), > - MCP16502_REGULATOR("VDD_OTHER", BUCK4, b234_ranges, mcp16502_buck_ops, > + MCP16502_REGULATOR("BUCK4", BUCK4, b234_ranges, mcp16502_buck_ops, > mcp16502_ramp_b234), > MCP16502_REGULATOR("LDO1", LDO1, b1l12_ranges, mcp16502_ldo_ops, > mcp16502_ramp_b1l12), > -- > 2.44.0 >
On Wed, Mar 27, 2024 at 04:28:49PM +0000, Conor Dooley wrote: > On Wed, Mar 27, 2024 at 12:17:24PM +0200, Mihai Sain wrote: > > Use generic names for buck regulators to avoid any confusion. > > Update the names from buck regulators in order to match > > the datasheet block diagram for the buck regulators. > I know the regulator core will create dummy regulators when they are not > provided in the devicetree, so I am not 100% on how backwards > compatibility works here. > You'll end up with a bunch of dummies and therefore the regulator-names > and constraints on the regulator will be lost, no? > Can you explain how is this backwards compatible with the old > devicetrees? It quite simply isn't backwards compatible. The original driver looks to be pretty broken but this breaks compatibility, we'd need a transition plan of some kind which probably needs some core work to cope with fallback names.
diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c index 0c15a19fe83a..d6fc9f1afaef 100644 --- a/drivers/regulator/mcp16502.c +++ b/drivers/regulator/mcp16502.c @@ -468,13 +468,13 @@ static const struct linear_range b234_ranges[] = { static const struct regulator_desc mcp16502_desc[] = { /* MCP16502_REGULATOR(_name, _id, ranges, regulator_ops, ramp_table) */ - MCP16502_REGULATOR("VDD_IO", BUCK1, b1l12_ranges, mcp16502_buck_ops, + MCP16502_REGULATOR("BUCK1", BUCK1, b1l12_ranges, mcp16502_buck_ops, mcp16502_ramp_b1l12), - MCP16502_REGULATOR("VDD_DDR", BUCK2, b234_ranges, mcp16502_buck_ops, + MCP16502_REGULATOR("BUCK2", BUCK2, b234_ranges, mcp16502_buck_ops, mcp16502_ramp_b234), - MCP16502_REGULATOR("VDD_CORE", BUCK3, b234_ranges, mcp16502_buck_ops, + MCP16502_REGULATOR("BUCK3", BUCK3, b234_ranges, mcp16502_buck_ops, mcp16502_ramp_b234), - MCP16502_REGULATOR("VDD_OTHER", BUCK4, b234_ranges, mcp16502_buck_ops, + MCP16502_REGULATOR("BUCK4", BUCK4, b234_ranges, mcp16502_buck_ops, mcp16502_ramp_b234), MCP16502_REGULATOR("LDO1", LDO1, b1l12_ranges, mcp16502_ldo_ops, mcp16502_ramp_b1l12),
Use generic names for buck regulators to avoid any confusion. Update the names from buck regulators in order to match the datasheet block diagram for the buck regulators. Signed-off-by: Mihai Sain <mihai.sain@microchip.com> --- drivers/regulator/mcp16502.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)