2009-09-17 07:17:44

by Linus Walleij

[permalink] [raw]
Subject: [PATCH] Voltage count for AB3100 regulator

This sets the number of voltages for the AB3100 regulators so that
they play well with the voltage listing functions and can be used
properly with the MMC regulator integration glue for example.

Signed-off-by: Linus Walleij <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Liam Girdwood <[email protected]>
Cc: Samuel Ortiz <[email protected]>
---
The MFD update containing the AB3100 regulator patch has not yet
hit mainline so I guess we'll have to queue this up in Sam's tree
too if it's not changing in the next few hours, OK Sam?
---
drivers/regulator/ab3100.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c
index 156979d..49aeee8 100644
--- a/drivers/regulator/ab3100.c
+++ b/drivers/regulator/ab3100.c
@@ -521,30 +521,35 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
.name = "LDO_E",
.id = AB3100_LDO_E,
.ops = &regulator_ops_variable_sleepable,
+ .n_voltages = ARRAY_SIZE(ldo_e_buck_typ_voltages),
.type = REGULATOR_VOLTAGE,
},
{
.name = "LDO_F",
.id = AB3100_LDO_F,
.ops = &regulator_ops_variable,
+ .n_voltages = ARRAY_SIZE(ldo_f_typ_voltages),
.type = REGULATOR_VOLTAGE,
},
{
.name = "LDO_G",
.id = AB3100_LDO_G,
.ops = &regulator_ops_variable,
+ .n_voltages = ARRAY_SIZE(ldo_g_typ_voltages),
.type = REGULATOR_VOLTAGE,
},
{
.name = "LDO_H",
.id = AB3100_LDO_H,
.ops = &regulator_ops_variable,
+ .n_voltages = ARRAY_SIZE(ldo_h_typ_voltages),
.type = REGULATOR_VOLTAGE,
},
{
.name = "LDO_K",
.id = AB3100_LDO_K,
.ops = &regulator_ops_variable,
+ .n_voltages = ARRAY_SIZE(ldo_k_typ_voltages),
.type = REGULATOR_VOLTAGE,
},
{
@@ -557,6 +562,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
.name = "BUCK",
.id = AB3100_BUCK,
.ops = &regulator_ops_variable_sleepable,
+ .n_voltages = ARRAY_SIZE(ldo_e_buck_typ_voltages),
.type = REGULATOR_VOLTAGE,
},
};
--
1.6.2.1


2009-09-17 08:57:06

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [PATCH] Voltage count for AB3100 regulator

Hi Linus,

On Thu, Sep 17, 2009 at 09:17:33AM +0200, Linus Walleij wrote:
> This sets the number of voltages for the AB3100 regulators so that
> they play well with the voltage listing functions and can be used
> properly with the MMC regulator integration glue for example.
>
> Signed-off-by: Linus Walleij <[email protected]>
> Cc: Mark Brown <[email protected]>
> Cc: Liam Girdwood <[email protected]>
> Cc: Samuel Ortiz <[email protected]>
> ---
> The MFD update containing the AB3100 regulator patch has not yet
> hit mainline so I guess we'll have to queue this up in Sam's tree
> too if it's not changing in the next few hours, OK Sam?
Patch applied.
I am going to send my pull request to Linus today, yours was the last one I
take for this merge window.

Cheers,
Samuel.


> ---
> drivers/regulator/ab3100.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c
> index 156979d..49aeee8 100644
> --- a/drivers/regulator/ab3100.c
> +++ b/drivers/regulator/ab3100.c
> @@ -521,30 +521,35 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
> .name = "LDO_E",
> .id = AB3100_LDO_E,
> .ops = &regulator_ops_variable_sleepable,
> + .n_voltages = ARRAY_SIZE(ldo_e_buck_typ_voltages),
> .type = REGULATOR_VOLTAGE,
> },
> {
> .name = "LDO_F",
> .id = AB3100_LDO_F,
> .ops = &regulator_ops_variable,
> + .n_voltages = ARRAY_SIZE(ldo_f_typ_voltages),
> .type = REGULATOR_VOLTAGE,
> },
> {
> .name = "LDO_G",
> .id = AB3100_LDO_G,
> .ops = &regulator_ops_variable,
> + .n_voltages = ARRAY_SIZE(ldo_g_typ_voltages),
> .type = REGULATOR_VOLTAGE,
> },
> {
> .name = "LDO_H",
> .id = AB3100_LDO_H,
> .ops = &regulator_ops_variable,
> + .n_voltages = ARRAY_SIZE(ldo_h_typ_voltages),
> .type = REGULATOR_VOLTAGE,
> },
> {
> .name = "LDO_K",
> .id = AB3100_LDO_K,
> .ops = &regulator_ops_variable,
> + .n_voltages = ARRAY_SIZE(ldo_k_typ_voltages),
> .type = REGULATOR_VOLTAGE,
> },
> {
> @@ -557,6 +562,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
> .name = "BUCK",
> .id = AB3100_BUCK,
> .ops = &regulator_ops_variable_sleepable,
> + .n_voltages = ARRAY_SIZE(ldo_e_buck_typ_voltages),
> .type = REGULATOR_VOLTAGE,
> },
> };
> --
> 1.6.2.1
>

--
Intel Open Source Technology Centre
http://oss.intel.com/

2009-09-17 09:29:21

by Liam Girdwood

[permalink] [raw]
Subject: Re: [PATCH] Voltage count for AB3100 regulator

On Thu, 2009-09-17 at 10:58 +0200, Samuel Ortiz wrote:
> Hi Linus,
>
> On Thu, Sep 17, 2009 at 09:17:33AM +0200, Linus Walleij wrote:
> > This sets the number of voltages for the AB3100 regulators so that
> > they play well with the voltage listing functions and can be used
> > properly with the MMC regulator integration glue for example.
> >
> > Signed-off-by: Linus Walleij <[email protected]>
> > Cc: Mark Brown <[email protected]>
> > Cc: Liam Girdwood <[email protected]>
> > Cc: Samuel Ortiz <[email protected]>
> > ---
> > The MFD update containing the AB3100 regulator patch has not yet
> > hit mainline so I guess we'll have to queue this up in Sam's tree
> > too if it's not changing in the next few hours, OK Sam?
> Patch applied.
> I am going to send my pull request to Linus today, yours was the last one I
> take for this merge window.

I'll send my pull request for regulator after mfd is merged. Iirc the
only conflicts are in Kconfig.

Thanks

Liam