Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1384133 > unrolled thread
| Started by | Richard Fitzgerald <rf@opensource.wolfsonmicro.com> |
|---|---|
| First post | 2016-04-21 14:10 +0200 |
| Last post | 2016-04-21 17:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] regulator: arizona-ldo1: Mark as always-on if no LDOENA Richard Fitzgerald <rf@opensource.wolfsonmicro.com> - 2016-04-21 14:10 +0200
Re: [PATCH] regulator: arizona-ldo1: Mark as always-on if no LDOENA Mark Brown <broonie@kernel.org> - 2016-04-21 17:30 +0200
| From | Richard Fitzgerald <rf@opensource.wolfsonmicro.com> |
|---|---|
| Date | 2016-04-21 14:10 +0200 |
| Subject | [PATCH] regulator: arizona-ldo1: Mark as always-on if no LDOENA |
| Message-ID | <rqlAK-vr-21@gated-at.bofh.it> |
If we don't have a GPIO for LDOENA it's impossible to turn
the LDO1 regulator off so mark it as always-on.
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
---
drivers/regulator/arizona-ldo1.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/arizona-ldo1.c b/drivers/regulator/arizona-ldo1.c
index f7c88ff..cc62ea2 100644
--- a/drivers/regulator/arizona-ldo1.c
+++ b/drivers/regulator/arizona-ldo1.c
@@ -290,9 +290,9 @@ static int arizona_ldo1_probe(struct platform_device *pdev)
config.ena_gpio = arizona->pdata.ldoena;
if (arizona->pdata.ldo1)
- config.init_data = arizona->pdata.ldo1;
- else
- config.init_data = &ldo1->init_data;
+ ldo1->init_data = *arizona->pdata.ldo1;
+
+ config.init_data = &ldo1->init_data;
/*
* LDO1 can only be used to supply DCVDD so if it has no
@@ -301,6 +301,13 @@ static int arizona_ldo1_probe(struct platform_device *pdev)
if (config.init_data->num_consumer_supplies == 0)
arizona->external_dcvdd = true;
+ if (!arizona->external_dcvdd && (config.ena_gpio == 0) &&
+ !config.ena_gpio_initialized) {
+ dev_warn(arizona->dev,
+ "No LDOENA: regulator will be always-on\n");
+ ldo1->init_data.constraints.always_on = true;
+ }
+
ldo1->regulator = devm_regulator_register(&pdev->dev, desc, &config);
of_node_put(config.of_node);
--
1.9.1
[toc] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-04-21 17:30 +0200 |
| Message-ID | <rqoIi-2PN-9@gated-at.bofh.it> |
| In reply to | #1384133 |
[Multipart message — attachments visible in raw view] — view raw
On Thu, Apr 21, 2016 at 01:02:02PM +0100, Richard Fitzgerald wrote: > If we don't have a GPIO for LDOENA it's impossible to turn > the LDO1 regulator off so mark it as always-on. If there is no enable control method for the regulator this should be redundant. If that's not the case you should fix that.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web