All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: pfuze100: add supply name to regulators
@ 2017-01-24 16:59 Lucas Stach
  2017-01-24 17:50 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas Stach @ 2017-01-24 16:59 UTC (permalink / raw)
  To: linux-arm-kernel

The devicetree binding states that the regulators are described by the
generic regulator binding, so the input supply can just use the generic
"vin" name.

This allows to attach the regulators to their supplies, making the
regulator tree more useful.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/regulator/pfuze100-regulator.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index cb18b5c4f2db..94fbfa5c6de1 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -164,6 +164,7 @@ static struct regulator_ops pfuze100_swb_regulator_ops = {
 	[_chip ## _ ## _name] = {	\
 		.desc = {	\
 			.name = #_name,	\
+			.supply_name = "vin",	\
 			.n_voltages = 1,	\
 			.ops = &pfuze100_fixed_regulator_ops,	\
 			.type = REGULATOR_VOLTAGE,	\
@@ -179,6 +180,7 @@ static struct regulator_ops pfuze100_swb_regulator_ops = {
 	[_chip ## _ ## _name] = {	\
 		.desc = {	\
 			.name = #_name,\
+			.supply_name = "vin",	\
 			.n_voltages = ((max) - (min)) / (step) + 1,	\
 			.ops = &pfuze100_sw_regulator_ops,	\
 			.type = REGULATOR_VOLTAGE,	\
@@ -197,6 +199,7 @@ static struct regulator_ops pfuze100_swb_regulator_ops = {
 	[_chip ## _ ##  _name] = {	\
 		.desc = {	\
 			.name = #_name,	\
+			.supply_name = "vin",	\
 			.n_voltages = ARRAY_SIZE(voltages),	\
 			.ops = &pfuze100_swb_regulator_ops,	\
 			.type = REGULATOR_VOLTAGE,	\
@@ -214,6 +217,7 @@ static struct regulator_ops pfuze100_swb_regulator_ops = {
 	[_chip ## _ ## _name] = {	\
 		.desc = {	\
 			.name = #_name,	\
+			.supply_name = "vin",	\
 			.n_voltages = ((max) - (min)) / (step) + 1,	\
 			.ops = &pfuze100_ldo_regulator_ops,	\
 			.type = REGULATOR_VOLTAGE,	\
@@ -233,6 +237,7 @@ static struct regulator_ops pfuze100_swb_regulator_ops = {
 #define PFUZE3000_VCC_REG(_chip, _name, base, min, max, step)	{	\
 	.desc = {	\
 		.name = #_name,	\
+		.supply_name = "vin",	\
 		.n_voltages = ((max) - (min)) / (step) + 1,	\
 		.ops = &pfuze100_ldo_regulator_ops,	\
 		.type = REGULATOR_VOLTAGE,	\
@@ -253,6 +258,7 @@ static struct regulator_ops pfuze100_swb_regulator_ops = {
 #define PFUZE3000_SW2_REG(_chip, _name, base, min, max, step)	{	\
 	.desc = {	\
 		.name = #_name,\
+		.supply_name = "vin",	\
 		.n_voltages = ((max) - (min)) / (step) + 1,	\
 		.ops = &pfuze100_sw_regulator_ops,	\
 		.type = REGULATOR_VOLTAGE,	\
@@ -270,6 +276,7 @@ static struct regulator_ops pfuze100_swb_regulator_ops = {
 #define PFUZE3000_SW3_REG(_chip, _name, base, min, max, step)	{	\
 	.desc = {	\
 		.name = #_name,\
+		.supply_name = "vin",	\
 		.n_voltages = ((max) - (min)) / (step) + 1,	\
 		.ops = &pfuze100_sw_regulator_ops,	\
 		.type = REGULATOR_VOLTAGE,	\
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] regulator: pfuze100: add supply name to regulators
  2017-01-24 16:59 [PATCH] regulator: pfuze100: add supply name to regulators Lucas Stach
@ 2017-01-24 17:50 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2017-01-24 17:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 24, 2017 at 05:59:20PM +0100, Lucas Stach wrote:

> The devicetree binding states that the regulators are described by the
> generic regulator binding, so the input supply can just use the generic
> "vin" name.

No, there's no generic "vin" name.  The input name for the supply should
be the same as the input name that is specified in the datasheet for the
device so that these regulators are consistent with other devices and
it's easier for people to put together DTs for their systems without
having to guess what the driver author did with the supplies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170124/c9ff20a3/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-24 17:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-24 16:59 [PATCH] regulator: pfuze100: add supply name to regulators Lucas Stach
2017-01-24 17:50 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.