* [PATCH] OMAP4: PANDA, SDP: Fix EHCI regulator supply
@ 2011-06-24 14:37 Jassi Brar
2011-06-24 17:07 ` Jaswinder Singh
2011-06-27 15:02 ` [PATCHv2] " Jassi Brar
0 siblings, 2 replies; 10+ messages in thread
From: Jassi Brar @ 2011-06-24 14:37 UTC (permalink / raw)
To: linux-arm-kernel
VUSB is a fixed level line and hence have no set_voltage
callback in regulator ops, but has apply_uV set to true.
As a result it fails to register with the regulator core.
Remove setting apply_uV.
Also, assign name to VUSB supply, without which regulator core
fails to find it and assigns the default 'dummy' regulator to
the ehci-omap device.
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
---
arch/arm/mach-omap2/board-4430sdp.c | 6 +++++-
arch/arm/mach-omap2/board-omap4panda.c | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 63de2d3..1ec60be 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -504,16 +504,20 @@ static struct regulator_init_data sdp4430_vdac = {
},
};
+static struct regulator_consumer_supply sdp4430_vusb_supply =
+ REGULATOR_SUPPLY("hsusb0", "ehci-omap.0");
+
static struct regulator_init_data sdp4430_vusb = {
.constraints = {
.min_uV = 3300000,
.max_uV = 3300000,
- .apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
+ .num_consumer_supplies = 1,
+ .consumer_supplies = &sdp4430_vusb_supply,
};
static struct regulator_init_data sdp4430_clk32kg = {
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index d4f9879..7429f7e 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -362,16 +362,20 @@ static struct regulator_init_data omap4_panda_vdac = {
},
};
+static struct regulator_consumer_supply omap4_panda_vusb_supply =
+ REGULATOR_SUPPLY("hsusb0", "ehci-omap.0");
+
static struct regulator_init_data omap4_panda_vusb = {
.constraints = {
.min_uV = 3300000,
.max_uV = 3300000,
- .apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
+ .num_consumer_supplies = 1,
+ .consumer_supplies = &omap4_panda_vusb_supply,
};
static struct regulator_init_data omap4_panda_clk32kg = {
--
1.7.4.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] OMAP4: PANDA, SDP: Fix EHCI regulator supply
2011-06-24 14:37 [PATCH] OMAP4: PANDA, SDP: Fix EHCI regulator supply Jassi Brar
@ 2011-06-24 17:07 ` Jaswinder Singh
2011-06-27 8:00 ` Felipe Balbi
2011-06-27 15:02 ` [PATCHv2] " Jassi Brar
1 sibling, 1 reply; 10+ messages in thread
From: Jaswinder Singh @ 2011-06-24 17:07 UTC (permalink / raw)
To: linux-arm-kernel
[CC'ing Liam and Mark as well]
On 24 June 2011 20:07, Jassi Brar <jaswinder.singh@linaro.org> wrote:
> VUSB is a fixed level line and hence have no set_voltage
> callback in regulator ops, but has apply_uV set to true.
> As a result it fails to register with the regulator core.
> Remove setting apply_uV.
>
> Also, assign name to VUSB supply, without which regulator core
> fails to find it and assigns the default 'dummy' regulator to
> the ehci-omap device.
>
> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
> ---
> ?arch/arm/mach-omap2/board-4430sdp.c ? ?| ? ?6 +++++-
> ?arch/arm/mach-omap2/board-omap4panda.c | ? ?6 +++++-
> ?2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
> index 63de2d3..1ec60be 100644
> --- a/arch/arm/mach-omap2/board-4430sdp.c
> +++ b/arch/arm/mach-omap2/board-4430sdp.c
> @@ -504,16 +504,20 @@ static struct regulator_init_data sdp4430_vdac = {
> ? ? ? ?},
> ?};
>
> +static struct regulator_consumer_supply sdp4430_vusb_supply =
> + ? ? ? REGULATOR_SUPPLY("hsusb0", "ehci-omap.0");
> +
> ?static struct regulator_init_data sdp4430_vusb = {
> ? ? ? ?.constraints = {
> ? ? ? ? ? ? ? ?.min_uV ? ? ? ? ? ? ? ? = 3300000,
> ? ? ? ? ? ? ? ?.max_uV ? ? ? ? ? ? ? ? = 3300000,
> - ? ? ? ? ? ? ? .apply_uV ? ? ? ? ? ? ? = true,
> ? ? ? ? ? ? ? ?.valid_modes_mask ? ? ? = REGULATOR_MODE_NORMAL
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| REGULATOR_MODE_STANDBY,
> ? ? ? ? ? ? ? ?.valid_ops_mask ?= ? ? ?REGULATOR_CHANGE_MODE
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| REGULATOR_CHANGE_STATUS,
> ? ? ? ?},
> + ? ? ? .num_consumer_supplies ?= 1,
> + ? ? ? .consumer_supplies ? ? ?= &sdp4430_vusb_supply,
> ?};
>
> ?static struct regulator_init_data sdp4430_clk32kg = {
> diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
> index d4f9879..7429f7e 100644
> --- a/arch/arm/mach-omap2/board-omap4panda.c
> +++ b/arch/arm/mach-omap2/board-omap4panda.c
> @@ -362,16 +362,20 @@ static struct regulator_init_data omap4_panda_vdac = {
> ? ? ? ?},
> ?};
>
> +static struct regulator_consumer_supply omap4_panda_vusb_supply =
> + ? ? ? REGULATOR_SUPPLY("hsusb0", "ehci-omap.0");
> +
> ?static struct regulator_init_data omap4_panda_vusb = {
> ? ? ? ?.constraints = {
> ? ? ? ? ? ? ? ?.min_uV ? ? ? ? ? ? ? ? = 3300000,
> ? ? ? ? ? ? ? ?.max_uV ? ? ? ? ? ? ? ? = 3300000,
> - ? ? ? ? ? ? ? .apply_uV ? ? ? ? ? ? ? = true,
> ? ? ? ? ? ? ? ?.valid_modes_mask ? ? ? = REGULATOR_MODE_NORMAL
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| REGULATOR_MODE_STANDBY,
> ? ? ? ? ? ? ? ?.valid_ops_mask ?= ? ? ?REGULATOR_CHANGE_MODE
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| REGULATOR_CHANGE_STATUS,
> ? ? ? ?},
> + ? ? ? .num_consumer_supplies ?= 1,
> + ? ? ? .consumer_supplies ? ? ?= &omap4_panda_vusb_supply,
> ?};
>
> ?static struct regulator_init_data omap4_panda_clk32kg = {
> --
> 1.7.4.1
>
>
--
Linaro.org ? Open source software for ARM SoCs | Follow Linaro
http://facebook.com/pages/Linaro/155974581091106 ?-
http://twitter.com/#!/linaroorg - http://linaro.org/linaro-blog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] OMAP4: PANDA, SDP: Fix EHCI regulator supply
2011-06-24 17:07 ` Jaswinder Singh
@ 2011-06-27 8:00 ` Felipe Balbi
2011-06-27 8:08 ` Jaswinder Singh
0 siblings, 1 reply; 10+ messages in thread
From: Felipe Balbi @ 2011-06-27 8:00 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Fri, Jun 24, 2011 at 10:37:56PM +0530, Jaswinder Singh wrote:
> [CC'ing Liam and Mark as well]
>
> On 24 June 2011 20:07, Jassi Brar <jaswinder.singh@linaro.org> wrote:
> > VUSB is a fixed level line and hence have no set_voltage
> > callback in regulator ops, but has apply_uV set to true.
> > As a result it fails to register with the regulator core.
> > Remove setting apply_uV.
> >
> > Also, assign name to VUSB supply, without which regulator core
> > fails to find it and assigns the default 'dummy' regulator to
> > the ehci-omap device.
> >
> > Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
> > ---
> > ?arch/arm/mach-omap2/board-4430sdp.c ? ?| ? ?6 +++++-
> > ?arch/arm/mach-omap2/board-omap4panda.c | ? ?6 +++++-
> > ?2 files changed, 10 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
> > index 63de2d3..1ec60be 100644
> > --- a/arch/arm/mach-omap2/board-4430sdp.c
> > +++ b/arch/arm/mach-omap2/board-4430sdp.c
> > @@ -504,16 +504,20 @@ static struct regulator_init_data sdp4430_vdac = {
> > ? ? ? ?},
> > ?};
> >
> > +static struct regulator_consumer_supply sdp4430_vusb_supply =
> > + ? ? ? REGULATOR_SUPPLY("hsusb0", "ehci-omap.0");
this should be an array.
> > ?static struct regulator_init_data sdp4430_vusb = {
> > ? ? ? ?.constraints = {
> > ? ? ? ? ? ? ? ?.min_uV ? ? ? ? ? ? ? ? = 3300000,
> > ? ? ? ? ? ? ? ?.max_uV ? ? ? ? ? ? ? ? = 3300000,
> > - ? ? ? ? ? ? ? .apply_uV ? ? ? ? ? ? ? = true,
> > ? ? ? ? ? ? ? ?.valid_modes_mask ? ? ? = REGULATOR_MODE_NORMAL
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| REGULATOR_MODE_STANDBY,
> > ? ? ? ? ? ? ? ?.valid_ops_mask ?= ? ? ?REGULATOR_CHANGE_MODE
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| REGULATOR_CHANGE_STATUS,
> > ? ? ? ?},
> > + ? ? ? .num_consumer_supplies ?= 1,
ARRAY_SIZE()
> > + ? ? ? .consumer_supplies ? ? ?= &sdp4430_vusb_supply,
drop the &.
ditto to other.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110627/373e8a39/attachment-0001.sig>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] OMAP4: PANDA, SDP: Fix EHCI regulator supply
2011-06-27 8:00 ` Felipe Balbi
@ 2011-06-27 8:08 ` Jaswinder Singh
2011-06-27 8:35 ` Felipe Balbi
0 siblings, 1 reply; 10+ messages in thread
From: Jaswinder Singh @ 2011-06-27 8:08 UTC (permalink / raw)
To: linux-arm-kernel
Hi Felipe,
On 27 June 2011 13:30, Felipe Balbi <balbi@ti.com> wrote:
>> >
>> > +static struct regulator_consumer_supply sdp4430_vusb_supply =
>> > + ? ? ? REGULATOR_SUPPLY("hsusb0", "ehci-omap.0");
>
> this should be an array.
Ok, I can make it an array of _one_ element.
Though I am not sure why is that a good thing, or are we to use another
possible VUSB supply on Panda/SDP boards ? Please suggest so that
I can add that too.
>> > ?static struct regulator_init_data sdp4430_vusb = {
>> > ? ? ? ?.constraints = {
>> > ? ? ? ? ? ? ? ?.min_uV ? ? ? ? ? ? ? ? = 3300000,
>> > ? ? ? ? ? ? ? ?.max_uV ? ? ? ? ? ? ? ? = 3300000,
>> > - ? ? ? ? ? ? ? .apply_uV ? ? ? ? ? ? ? = true,
>> > ? ? ? ? ? ? ? ?.valid_modes_mask ? ? ? = REGULATOR_MODE_NORMAL
>> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| REGULATOR_MODE_STANDBY,
>> > ? ? ? ? ? ? ? ?.valid_ops_mask ?= ? ? ?REGULATOR_CHANGE_MODE
>> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| REGULATOR_CHANGE_STATUS,
>> > ? ? ? ?},
>> > + ? ? ? .num_consumer_supplies ?= 1,
>
> ARRAY_SIZE()
Yes, of course if we are to switch to single-element array.
Thanks,
Jassi
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] OMAP4: PANDA, SDP: Fix EHCI regulator supply
2011-06-27 8:08 ` Jaswinder Singh
@ 2011-06-27 8:35 ` Felipe Balbi
2011-06-27 10:05 ` Jaswinder Singh
0 siblings, 1 reply; 10+ messages in thread
From: Felipe Balbi @ 2011-06-27 8:35 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Mon, Jun 27, 2011 at 01:38:54PM +0530, Jaswinder Singh wrote:
> Hi Felipe,
>
> On 27 June 2011 13:30, Felipe Balbi <balbi@ti.com> wrote:
>
> >> >
> >> > +static struct regulator_consumer_supply sdp4430_vusb_supply =
> >> > + ? ? ? REGULATOR_SUPPLY("hsusb0", "ehci-omap.0");
> >
> > this should be an array.
> Ok, I can make it an array of _one_ element.
> Though I am not sure why is that a good thing, or are we to use another
> possible VUSB supply on Panda/SDP boards ? Please suggest so that
> I can add that too.
same comment I gave before to another patch:
it makes the diff a lot easier to understand should anyone modify this
later. It's also a matter of consistency.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110627/2eb65267/attachment.sig>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] OMAP4: PANDA, SDP: Fix EHCI regulator supply
2011-06-27 8:35 ` Felipe Balbi
@ 2011-06-27 10:05 ` Jaswinder Singh
2011-06-27 10:11 ` Felipe Balbi
0 siblings, 1 reply; 10+ messages in thread
From: Jaswinder Singh @ 2011-06-27 10:05 UTC (permalink / raw)
To: linux-arm-kernel
Hi Felipe,
On 27 June 2011 14:05, Felipe Balbi <balbi@ti.com> wrote:
>> >> > +static struct regulator_consumer_supply sdp4430_vusb_supply =
>> >> > + ? ? ? REGULATOR_SUPPLY("hsusb0", "ehci-omap.0");
>> >
>> > this should be an array.
>> Ok, I can make it an array of _one_ element.
>> Though I am not sure why is that a good thing, or are we to use another
>> possible VUSB supply on Panda/SDP boards ? ?Please suggest so that
>> I can add that too.
>
> same comment I gave before to another patch:
>
> it makes the diff a lot easier to understand should anyone modify this
> later. It's also a matter of consistency.
>
A quick grep showed otherwise though ...
In arch/arm/mach-omap2/
Total regulators defined = 71
Regulators with exactly 1 supply = 58
Single element non-array definitions = 46/58
Single element array definitions = 12/58
Even if we consider 20% to be norm for consistency, I am not sure it's
a good one.
Still many samsung guys piously enclose magic value defines in parenthesis,
just to maintain 'consistency' !
And, I don't understand how does diff become any easier beyond 2
elements in the array.
Sorry for being bitchy, but I am unable to buy any reason other than
having more than
one element to use array.
-Jassi
--
Linaro.org ? Open source software for ARM SoCs | Follow Linaro
http://facebook.com/pages/Linaro/155974581091106 ?-
http://twitter.com/#!/linaroorg - http://linaro.org/linaro-blog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] OMAP4: PANDA, SDP: Fix EHCI regulator supply
2011-06-27 10:05 ` Jaswinder Singh
@ 2011-06-27 10:11 ` Felipe Balbi
2011-06-27 11:10 ` Jaswinder Singh
0 siblings, 1 reply; 10+ messages in thread
From: Felipe Balbi @ 2011-06-27 10:11 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Mon, Jun 27, 2011 at 03:35:41PM +0530, Jaswinder Singh wrote:
> On 27 June 2011 14:05, Felipe Balbi <balbi@ti.com> wrote:
> >> >> > +static struct regulator_consumer_supply sdp4430_vusb_supply =
> >> >> > + ? ? ? REGULATOR_SUPPLY("hsusb0", "ehci-omap.0");
> >> >
> >> > this should be an array.
> >> Ok, I can make it an array of _one_ element.
> >> Though I am not sure why is that a good thing, or are we to use another
> >> possible VUSB supply on Panda/SDP boards ? ?Please suggest so that
> >> I can add that too.
> >
> > same comment I gave before to another patch:
> >
> > it makes the diff a lot easier to understand should anyone modify this
> > later. It's also a matter of consistency.
> >
> A quick grep showed otherwise though ...
>
> In arch/arm/mach-omap2/
> Total regulators defined = 71
> Regulators with exactly 1 supply = 58
> Single element non-array definitions = 46/58
> Single element array definitions = 12/58
>
> Even if we consider 20% to be norm for consistency, I am not sure it's
> a good one.
the patch which converted all non-array, to array seems to have been
taken yet, then.
> Still many samsung guys piously enclose magic value defines in parenthesis,
> just to maintain 'consistency' !
that's just plain stupidity.
> And, I don't understand how does diff become any easier beyond 2
> elements in the array.
http://marc.info/?l=linux-omap&m=130738044715490&w=2
> Sorry for being bitchy, but I am unable to buy any reason other than
> having more than
> one element to use array.
I also seem to recall someone (either Russell or Linus) once explained
why we should never mistake one-element arrays with pointers.
Unfortunately, I fail to find the thread, it's quite old.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110627/d9d4a361/attachment.sig>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] OMAP4: PANDA, SDP: Fix EHCI regulator supply
2011-06-27 10:11 ` Felipe Balbi
@ 2011-06-27 11:10 ` Jaswinder Singh
0 siblings, 0 replies; 10+ messages in thread
From: Jaswinder Singh @ 2011-06-27 11:10 UTC (permalink / raw)
To: linux-arm-kernel
On 27 June 2011 15:41, Felipe Balbi <balbi@ti.com> wrote:
> Hi,
>
> On Mon, Jun 27, 2011 at 03:35:41PM +0530, Jaswinder Singh wrote:
>> On 27 June 2011 14:05, Felipe Balbi <balbi@ti.com> wrote:
>> >> >> > +static struct regulator_consumer_supply sdp4430_vusb_supply =
>> >> >> > + ? ? ? REGULATOR_SUPPLY("hsusb0", "ehci-omap.0");
>> >> >
>> >> > this should be an array.
>> >> Ok, I can make it an array of _one_ element.
>> >> Though I am not sure why is that a good thing, or are we to use another
>> >> possible VUSB supply on Panda/SDP boards ? ?Please suggest so that
>> >> I can add that too.
>> >
>> > same comment I gave before to another patch:
>> >
>> > it makes the diff a lot easier to understand should anyone modify this
>> > later. It's also a matter of consistency.
>> >
>> A quick grep showed otherwise though ...
>>
>> In arch/arm/mach-omap2/
>> Total regulators defined ? ? ? ? ? ? ? ? ? ? ? ? ?= ?71
>> Regulators with exactly 1 supply ? ? ? ? ? = ? 58
>> Single element non-array definitions ? ? = ?46/58
>> Single element array definitions ? ? ? ? ? ? = ?12/58
>>
>> Even if we consider 20% to be norm for consistency, I am not sure it's
>> a good one.
>
> the patch which converted all non-array, to array seems to have been
> taken yet, then.
>
Ok, I don't have that patch. If everything else has been converted
then there is no point in sticking out. Please let me know which repo has that.
I'll adapt to that.
>> And, I don't understand how does diff become any easier beyond 2
>> elements in the array.
>
> http://marc.info/?l=linux-omap&m=130738044715490&w=2
>
Yes, that's why I said "beyond 2 elements"
Only, if any, "difficulty" would be _first_ time when someone patches
to add second supply.
After that it'll just be same as you expect.
>> Sorry for being bitchy, but I am unable to buy any reason other than
>> having more than
>> one element to use array.
>
> I also seem to recall someone (either Russell or Linus) once explained
> why we should never mistake one-element arrays with pointers.
> Unfortunately, I fail to find the thread, it's quite old.
Yes, I vaguely remember the thread, but not sure if it's issue here.
-j
--
Linaro.org ? Open source software for ARM SoCs | Follow Linaro
http://facebook.com/pages/Linaro/155974581091106 ?-
http://twitter.com/#!/linaroorg - http://linaro.org/linaro-blog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCHv2] OMAP4: PANDA, SDP: Fix EHCI regulator supply
2011-06-24 14:37 [PATCH] OMAP4: PANDA, SDP: Fix EHCI regulator supply Jassi Brar
2011-06-24 17:07 ` Jaswinder Singh
@ 2011-06-27 15:02 ` Jassi Brar
2011-06-27 15:05 ` Felipe Balbi
1 sibling, 1 reply; 10+ messages in thread
From: Jassi Brar @ 2011-06-27 15:02 UTC (permalink / raw)
To: linux-arm-kernel
VUSB is a fixed level line and hence have no set_voltage
callback in regulator ops, but has apply_uV set to true.
As a result it fails to register with the regulator core.
Remove setting apply_uV.
Also, assign name to VUSB supply, without which regulator core
fails to find it and assigns the default 'dummy' regulator to
the ehci-omap device.
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
---
arch/arm/mach-omap2/board-4430sdp.c | 7 ++++++-
arch/arm/mach-omap2/board-omap4panda.c | 7 ++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 63de2d3..9493cd3 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -504,16 +504,21 @@ static struct regulator_init_data sdp4430_vdac = {
},
};
+static struct regulator_consumer_supply sdp4430_vusb_supply[] = {
+ REGULATOR_SUPPLY("hsusb0", "ehci-omap.0"),
+};
+
static struct regulator_init_data sdp4430_vusb = {
.constraints = {
.min_uV = 3300000,
.max_uV = 3300000,
- .apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
+ .num_consumer_supplies = ARRAY_SIZE(sdp4430_vusb_supply),
+ .consumer_supplies = sdp4430_vusb_supply,
};
static struct regulator_init_data sdp4430_clk32kg = {
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index d4f9879..2beb0d5 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -362,16 +362,21 @@ static struct regulator_init_data omap4_panda_vdac = {
},
};
+static struct regulator_consumer_supply omap4_panda_vusb_supply[] = {
+ REGULATOR_SUPPLY("hsusb0", "ehci-omap.0"),
+};
+
static struct regulator_init_data omap4_panda_vusb = {
.constraints = {
.min_uV = 3300000,
.max_uV = 3300000,
- .apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
+ .num_consumer_supplies = ARRAY_SIZE(omap4_panda_vusb_supply),
+ .consumer_supplies = omap4_panda_vusb_supply,
};
static struct regulator_init_data omap4_panda_clk32kg = {
--
1.7.4.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCHv2] OMAP4: PANDA, SDP: Fix EHCI regulator supply
2011-06-27 15:02 ` [PATCHv2] " Jassi Brar
@ 2011-06-27 15:05 ` Felipe Balbi
0 siblings, 0 replies; 10+ messages in thread
From: Felipe Balbi @ 2011-06-27 15:05 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jun 27, 2011 at 08:32:03PM +0530, Jassi Brar wrote:
> VUSB is a fixed level line and hence have no set_voltage
> callback in regulator ops, but has apply_uV set to true.
> As a result it fails to register with the regulator core.
> Remove setting apply_uV.
>
> Also, assign name to VUSB supply, without which regulator core
> fails to find it and assigns the default 'dummy' regulator to
> the ehci-omap device.
>
> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
FWIW:
Reviewed-by: Felipe Balbi <balbi@ti.com>
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110627/fda49ccc/attachment.sig>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-06-27 15:05 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-24 14:37 [PATCH] OMAP4: PANDA, SDP: Fix EHCI regulator supply Jassi Brar
2011-06-24 17:07 ` Jaswinder Singh
2011-06-27 8:00 ` Felipe Balbi
2011-06-27 8:08 ` Jaswinder Singh
2011-06-27 8:35 ` Felipe Balbi
2011-06-27 10:05 ` Jaswinder Singh
2011-06-27 10:11 ` Felipe Balbi
2011-06-27 11:10 ` Jaswinder Singh
2011-06-27 15:02 ` [PATCHv2] " Jassi Brar
2011-06-27 15:05 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).