* [PATCH] regulator: tps80031: Implement list_voltage and set n_voltages = 1 for fixed regulators
@ 2012-11-23 1:25 Axel Lin
2012-11-23 5:24 ` Laxman Dewangan
2012-11-23 12:13 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2012-11-23 1:25 UTC (permalink / raw)
To: Mark Brown; +Cc: Laxman Dewangan, Liam Girdwood, linux-kernel
Implement list_voltage for fixed regulators, otherwise
regulator_is_supported_voltage() returns 0.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/tps80031-regulator.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c
index 6d5f203..50f89b0 100644
--- a/drivers/regulator/tps80031-regulator.c
+++ b/drivers/regulator/tps80031-regulator.c
@@ -407,15 +407,18 @@ static struct regulator_ops tps80031_ldo_ops = {
};
static struct regulator_ops tps80031_vbus_sw_ops = {
+ .list_voltage = regulator_list_voltage_linear,
.enable = tps80031_vbus_enable,
.disable = tps80031_vbus_disable,
.is_enabled = tps80031_vbus_is_enabled,
};
static struct regulator_ops tps80031_vbus_hw_ops = {
+ .list_voltage = regulator_list_voltage_linear,
};
static struct regulator_ops tps80031_ext_reg_ops = {
+ .list_voltage = regulator_list_voltage_linear,
.enable = tps80031_reg_enable,
.disable = tps80031_reg_disable,
.is_enabled = tps80031_reg_is_enabled,
@@ -477,7 +480,8 @@ static struct regulator_ops tps80031_ext_reg_ops = {
.desc = { \
.name = "tps80031_"#_id, \
.id = TPS80031_REGULATOR_##_id, \
- .n_voltages = 2, \
+ .min_uV = max_mV * 1000, \
+ .n_voltages = 1, \
.ops = &_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] regulator: tps80031: Implement list_voltage and set n_voltages = 1 for fixed regulators
2012-11-23 1:25 [PATCH] regulator: tps80031: Implement list_voltage and set n_voltages = 1 for fixed regulators Axel Lin
@ 2012-11-23 5:24 ` Laxman Dewangan
2012-11-23 12:13 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Laxman Dewangan @ 2012-11-23 5:24 UTC (permalink / raw)
To: Axel Lin; +Cc: Mark Brown, Liam Girdwood, linux-kernel@vger.kernel.org
On Friday 23 November 2012 06:55 AM, Axel Lin wrote:
> Implement list_voltage for fixed regulators, otherwise
> regulator_is_supported_voltage() returns 0.
>
This rail is used for vbus only which is 5V or 0. I don't see any use
for using this rail for other purpose. It just need enable/disable.
But this change does not hurt anything on my usage.
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: tps80031: Implement list_voltage and set n_voltages = 1 for fixed regulators
2012-11-23 1:25 [PATCH] regulator: tps80031: Implement list_voltage and set n_voltages = 1 for fixed regulators Axel Lin
2012-11-23 5:24 ` Laxman Dewangan
@ 2012-11-23 12:13 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-11-23 12:13 UTC (permalink / raw)
To: Axel Lin; +Cc: Laxman Dewangan, Liam Girdwood, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 179 bytes --]
On Fri, Nov 23, 2012 at 09:25:54AM +0800, Axel Lin wrote:
> Implement list_voltage for fixed regulators, otherwise
> regulator_is_supported_voltage() returns 0.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-23 12:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-23 1:25 [PATCH] regulator: tps80031: Implement list_voltage and set n_voltages = 1 for fixed regulators Axel Lin
2012-11-23 5:24 ` Laxman Dewangan
2012-11-23 12:13 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox