* [PATCH] Fix build for beagleboard
2008-09-11 11:50 [PATCH] Fix for twl4030-power.c build failure " Peter 'p2' De Schrijver
@ 2008-09-11 11:50 ` Peter 'p2' De Schrijver
2008-09-11 18:15 ` Tony Lindgren
2008-09-12 10:31 ` Felipe Balbi
0 siblings, 2 replies; 18+ messages in thread
From: Peter 'p2' De Schrijver @ 2008-09-11 11:50 UTC (permalink / raw)
To: linux-omap; +Cc: Peter 'p2' De Schrijver
---
drivers/i2c/chips/twl4030-power.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
index 195c3c4..04a13aa 100644
--- a/drivers/i2c/chips/twl4030-power.c
+++ b/drivers/i2c/chips/twl4030-power.c
@@ -149,7 +149,7 @@ struct triton_ins t2_wrst_seq[] __initdata = {
struct triton_ins sleep_on_seq[] __initdata = {
{MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_RC, RES_TYPE_ALL, RES_TYPE2_R0,
RES_STATE_SLEEP), 4},
- {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE_R7,
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
RES_STATE_SLEEP), 4},
};
@@ -160,6 +160,9 @@ struct triton_ins sleep_off_seq[] __initdata = {
{MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
RES_STATE_ACTIVE), 0x2},
};
+
+struct triton_ins t2_wrst_seq[] __initdata = { };
+
#endif
static int __init twl4030_write_script_byte(u8 address, u8 byte)
--
1.5.6.3
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix build for beagleboard
2008-09-11 11:50 ` [PATCH] Fix build " Peter 'p2' De Schrijver
@ 2008-09-11 18:15 ` Tony Lindgren
2008-09-12 10:32 ` [PATCH] *** SUBJECT HERE *** Peter 'p2' De Schrijver
2008-09-12 10:31 ` Felipe Balbi
1 sibling, 1 reply; 18+ messages in thread
From: Tony Lindgren @ 2008-09-11 18:15 UTC (permalink / raw)
To: Peter 'p2' De Schrijver; +Cc: linux-omap
* Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com> [080911 04:50]:
Signed-off-by?
Tony
> ---
> drivers/i2c/chips/twl4030-power.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
> index 195c3c4..04a13aa 100644
> --- a/drivers/i2c/chips/twl4030-power.c
> +++ b/drivers/i2c/chips/twl4030-power.c
> @@ -149,7 +149,7 @@ struct triton_ins t2_wrst_seq[] __initdata = {
> struct triton_ins sleep_on_seq[] __initdata = {
> {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_RC, RES_TYPE_ALL, RES_TYPE2_R0,
> RES_STATE_SLEEP), 4},
> - {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE_R7,
> + {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
> RES_STATE_SLEEP), 4},
> };
>
> @@ -160,6 +160,9 @@ struct triton_ins sleep_off_seq[] __initdata = {
> {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
> RES_STATE_ACTIVE), 0x2},
> };
> +
> +struct triton_ins t2_wrst_seq[] __initdata = { };
> +
> #endif
>
> static int __init twl4030_write_script_byte(u8 address, u8 byte)
> --
> 1.5.6.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix build for beagleboard
2008-09-11 11:50 ` [PATCH] Fix build " Peter 'p2' De Schrijver
2008-09-11 18:15 ` Tony Lindgren
@ 2008-09-12 10:31 ` Felipe Balbi
1 sibling, 0 replies; 18+ messages in thread
From: Felipe Balbi @ 2008-09-12 10:31 UTC (permalink / raw)
To: ext Peter 'p2' De Schrijver; +Cc: linux-omap
From: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
---
drivers/i2c/chips/twl4030-power.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
index 195c3c4..04a13aa 100644
--- a/drivers/i2c/chips/twl4030-power.c
+++ b/drivers/i2c/chips/twl4030-power.c
@@ -149,7 +149,7 @@ struct triton_ins t2_wrst_seq[] __initdata = {
struct triton_ins sleep_on_seq[] __initdata = {
{MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_RC, RES_TYPE_ALL, RES_TYPE2_R0,
RES_STATE_SLEEP), 4},
- {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE_R7,
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
RES_STATE_SLEEP), 4},
};
@@ -160,6 +160,9 @@ struct triton_ins sleep_off_seq[] __initdata = {
{MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
RES_STATE_ACTIVE), 0x2},
};
+
+struct triton_ins t2_wrst_seq[] __initdata = { };
+
#endif
static int __init twl4030_write_script_byte(u8 address, u8 byte)
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH] Fix build for beagleboard
2008-09-12 10:32 ` [PATCH] *** SUBJECT HERE *** Peter 'p2' De Schrijver
@ 2008-09-12 10:32 ` Peter 'p2' De Schrijver
2008-09-12 12:06 ` Felipe Balbi
2008-09-12 14:02 ` Paul Walmsley
0 siblings, 2 replies; 18+ messages in thread
From: Peter 'p2' De Schrijver @ 2008-09-12 10:32 UTC (permalink / raw)
To: linux-omap; +Cc: Peter 'p2' De Schrijver
Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
---
drivers/i2c/chips/twl4030-power.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
index 195c3c4..04a13aa 100644
--- a/drivers/i2c/chips/twl4030-power.c
+++ b/drivers/i2c/chips/twl4030-power.c
@@ -149,7 +149,7 @@ struct triton_ins t2_wrst_seq[] __initdata = {
struct triton_ins sleep_on_seq[] __initdata = {
{MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_RC, RES_TYPE_ALL, RES_TYPE2_R0,
RES_STATE_SLEEP), 4},
- {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE_R7,
+ {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
RES_STATE_SLEEP), 4},
};
@@ -160,6 +160,9 @@ struct triton_ins sleep_off_seq[] __initdata = {
{MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
RES_STATE_ACTIVE), 0x2},
};
+
+struct triton_ins t2_wrst_seq[] __initdata = { };
+
#endif
static int __init twl4030_write_script_byte(u8 address, u8 byte)
--
1.5.6.3
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix build for beagleboard
2008-09-12 10:32 ` [PATCH] Fix build for beagleboard Peter 'p2' De Schrijver
@ 2008-09-12 12:06 ` Felipe Balbi
2008-09-12 17:21 ` Tony Lindgren
2008-09-12 14:02 ` Paul Walmsley
1 sibling, 1 reply; 18+ messages in thread
From: Felipe Balbi @ 2008-09-12 12:06 UTC (permalink / raw)
To: ext Peter 'p2' De Schrijver; +Cc: linux-omap
Hi Tony,
please amend the following into this patch:
On Fri, Sep 12, 2008 at 01:32:36PM +0300, Peter 'p2' De Schrijver wrote:
>
> Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
> ---
> drivers/i2c/chips/twl4030-power.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
> index 195c3c4..04a13aa 100644
> --- a/drivers/i2c/chips/twl4030-power.c
> +++ b/drivers/i2c/chips/twl4030-power.c
> @@ -149,7 +149,7 @@ struct triton_ins t2_wrst_seq[] __initdata = {
> struct triton_ins sleep_on_seq[] __initdata = {
> {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_RC, RES_TYPE_ALL, RES_TYPE2_R0,
> RES_STATE_SLEEP), 4},
> - {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE_R7,
> + {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
> RES_STATE_SLEEP), 4},
> };
>
> @@ -160,6 +160,9 @@ struct triton_ins sleep_off_seq[] __initdata = {
> {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
> RES_STATE_ACTIVE), 0x2},
> };
> +
> +struct triton_ins t2_wrst_seq[] __initdata = { };
> +
> #endif
>
> static int __init twl4030_write_script_byte(u8 address, u8 byte)
diff -u b/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
--- b/drivers/i2c/chips/twl4030-power.c
+++ b/drivers/i2c/chips/twl4030-power.c
@@ -215,7 +215,6 @@
static int __init config_sleep_wake_sequence(void)
{
int err = 0;
- u8 data;
/*
* CLKREQ is pulled high on the 2430SDP, therefore, we need to take
--
balbi
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix build for beagleboard
2008-09-12 10:32 ` [PATCH] Fix build for beagleboard Peter 'p2' De Schrijver
2008-09-12 12:06 ` Felipe Balbi
@ 2008-09-12 14:02 ` Paul Walmsley
1 sibling, 0 replies; 18+ messages in thread
From: Paul Walmsley @ 2008-09-12 14:02 UTC (permalink / raw)
To: Peter 'p2' De Schrijver; +Cc: linux-omap
On Fri, 12 Sep 2008, Peter 'p2' De Schrijver wrote:
>
> Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
This patch is also necessary for 2430SDP builds to succeed.
- Paul
> ---
> drivers/i2c/chips/twl4030-power.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
> index 195c3c4..04a13aa 100644
> --- a/drivers/i2c/chips/twl4030-power.c
> +++ b/drivers/i2c/chips/twl4030-power.c
> @@ -149,7 +149,7 @@ struct triton_ins t2_wrst_seq[] __initdata = {
> struct triton_ins sleep_on_seq[] __initdata = {
> {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_RC, RES_TYPE_ALL, RES_TYPE2_R0,
> RES_STATE_SLEEP), 4},
> - {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE_R7,
> + {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
> RES_STATE_SLEEP), 4},
> };
>
> @@ -160,6 +160,9 @@ struct triton_ins sleep_off_seq[] __initdata = {
> {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
> RES_STATE_ACTIVE), 0x2},
> };
> +
> +struct triton_ins t2_wrst_seq[] __initdata = { };
> +
> #endif
>
> static int __init twl4030_write_script_byte(u8 address, u8 byte)
> --
> 1.5.6.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
- Paul
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix build for beagleboard
2008-09-12 12:06 ` Felipe Balbi
@ 2008-09-12 17:21 ` Tony Lindgren
0 siblings, 0 replies; 18+ messages in thread
From: Tony Lindgren @ 2008-09-12 17:21 UTC (permalink / raw)
To: Felipe Balbi; +Cc: ext Peter 'p2' De Schrijver, linux-omap
* Felipe Balbi <felipe.balbi@nokia.com> [080912 05:07]:
> Hi Tony,
>
> please amend the following into this patch:
>
> On Fri, Sep 12, 2008 at 01:32:36PM +0300, Peter 'p2' De Schrijver wrote:
> >
> > Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
> > ---
> > drivers/i2c/chips/twl4030-power.c | 5 ++++-
> > 1 files changed, 4 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
> > index 195c3c4..04a13aa 100644
> > --- a/drivers/i2c/chips/twl4030-power.c
> > +++ b/drivers/i2c/chips/twl4030-power.c
> > @@ -149,7 +149,7 @@ struct triton_ins t2_wrst_seq[] __initdata = {
> > struct triton_ins sleep_on_seq[] __initdata = {
> > {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_RC, RES_TYPE_ALL, RES_TYPE2_R0,
> > RES_STATE_SLEEP), 4},
> > - {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE_R7,
> > + {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
> > RES_STATE_SLEEP), 4},
> > };
> >
> > @@ -160,6 +160,9 @@ struct triton_ins sleep_off_seq[] __initdata = {
> > {MSG_BROADCAST(DEV_GRP_NULL, RES_GRP_ALL, RES_TYPE_ALL, RES_TYPE2_R0,
> > RES_STATE_ACTIVE), 0x2},
> > };
> > +
> > +struct triton_ins t2_wrst_seq[] __initdata = { };
> > +
> > #endif
> >
> > static int __init twl4030_write_script_byte(u8 address, u8 byte)
>
> diff -u b/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
> --- b/drivers/i2c/chips/twl4030-power.c
> +++ b/drivers/i2c/chips/twl4030-power.c
> @@ -215,7 +215,6 @@
> static int __init config_sleep_wake_sequence(void)
> {
> int err = 0;
> - u8 data;
>
> /*
> * CLKREQ is pulled high on the 2430SDP, therefore, we need to take
>
Thanks, pushed with this change.
Tony
^ permalink raw reply [flat|nested] 18+ messages in thread
* [patch] kill compile warning on twl4030-power.c
@ 2008-09-15 15:12 Felipe Balbi
2008-09-15 15:55 ` Peter 'p2' De Schrijver
0 siblings, 1 reply; 18+ messages in thread
From: Felipe Balbi @ 2008-09-15 15:12 UTC (permalink / raw)
To: Linux OMAP Mailing List
From: Felipe Balbi <felipe.balbi@nokia.com>
This part of the patch was left out on previous merge. Here's a
fix for that.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
---
diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
index 04a13aa..afc19cd 100644
--- a/drivers/i2c/chips/twl4030-power.c
+++ b/drivers/i2c/chips/twl4030-power.c
@@ -215,7 +215,6 @@ static int __init twl4030_write_script(u8 address, struct triton_ins *script,
static int __init config_sleep_wake_sequence(void)
{
int err = 0;
- u8 data;
/*
* CLKREQ is pulled high on the 2430SDP, therefore, we need to take
--
balbi
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [patch] kill compile warning on twl4030-power.c
2008-09-15 15:12 [patch] kill compile warning on twl4030-power.c Felipe Balbi
@ 2008-09-15 15:55 ` Peter 'p2' De Schrijver
2008-09-15 16:21 ` Felipe Balbi
0 siblings, 1 reply; 18+ messages in thread
From: Peter 'p2' De Schrijver @ 2008-09-15 15:55 UTC (permalink / raw)
To: ext Felipe Balbi; +Cc: Linux OMAP Mailing List
On Mon, Sep 15, 2008 at 06:12:11PM +0300, ext Felipe Balbi wrote:
> From: Felipe Balbi <felipe.balbi@nokia.com>
>
> This part of the patch was left out on previous merge. Here's a
> fix for that.
>
I doubt this works if you compile for SDP or labrador. OTOH the code for
that bit looks suspicious :)
Cheers,
Peter.
--
goa is a state of mind
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [patch] kill compile warning on twl4030-power.c
2008-09-15 15:55 ` Peter 'p2' De Schrijver
@ 2008-09-15 16:21 ` Felipe Balbi
2008-09-15 16:23 ` Felipe Balbi
2008-09-15 16:24 ` Peter 'p2' De Schrijver
0 siblings, 2 replies; 18+ messages in thread
From: Felipe Balbi @ 2008-09-15 16:21 UTC (permalink / raw)
To: Peter 'p2' De Schrijver; +Cc: ext Felipe Balbi, Linux OMAP Mailing List
On Mon, Sep 15, 2008 at 06:55:12PM +0300, Peter 'p2' De Schrijver wrote:
> On Mon, Sep 15, 2008 at 06:12:11PM +0300, ext Felipe Balbi wrote:
> > From: Felipe Balbi <felipe.balbi@nokia.com>
> >
> > This part of the patch was left out on previous merge. Here's a
> > fix for that.
> >
>
> I doubt this works if you compile for SDP or labrador. OTOH the code for
> that bit looks suspicious :)
Hmmm... that's true. That variable is only used on 3430sdp and 3430
labrador. How about this version:
diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
index 04a13aa..b8723e8 100644
--- a/drivers/i2c/chips/twl4030-power.c
+++ b/drivers/i2c/chips/twl4030-power.c
@@ -245,14 +245,15 @@ static int __init config_sleep_wake_sequence(void)
err |= twl4030_write_script(0x2F, sleep_off_seq,
ARRAY_SIZE(sleep_off_seq));
-#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP_3430LABRADOR)
- /* Disabling AC charger effect on sleep-active transitions */
- err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
- R_CFG_P1_TRANSITION);
- data &= 0x0;
- err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, data ,
- R_CFG_P1_TRANSITION);
-#endif
+ if (machine_is_omap_3430sdp()) {
+ /* Disabling AC charger effect on sleep-active transitions */
+ err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
+ R_CFG_P1_TRANSITION);
+ data &= 0x0;
+ err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, data ,
+ R_CFG_P1_TRANSITION);
+ }
+
/* P1/P2/P3 LVL_WAKEUP should be on LEVEL */
err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, LVL_WAKEUP,
R_P1_SW_EVENTS);
It's weird that a grep for LABRADOR on arch/arm does not return
anything. Are we missing some patches ??
--
balbi
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [patch] kill compile warning on twl4030-power.c
2008-09-15 16:21 ` Felipe Balbi
@ 2008-09-15 16:23 ` Felipe Balbi
2008-09-15 16:24 ` Peter 'p2' De Schrijver
1 sibling, 0 replies; 18+ messages in thread
From: Felipe Balbi @ 2008-09-15 16:23 UTC (permalink / raw)
To: Felipe Balbi; +Cc: Peter 'p2' De Schrijver, Linux OMAP Mailing List
On Mon, Sep 15, 2008 at 07:21:25PM +0300, Felipe Balbi wrote:
> On Mon, Sep 15, 2008 at 06:55:12PM +0300, Peter 'p2' De Schrijver wrote:
> > On Mon, Sep 15, 2008 at 06:12:11PM +0300, ext Felipe Balbi wrote:
> > > From: Felipe Balbi <felipe.balbi@nokia.com>
> > >
> > > This part of the patch was left out on previous merge. Here's a
> > > fix for that.
> > >
> >
> > I doubt this works if you compile for SDP or labrador. OTOH the code for
> > that bit looks suspicious :)
>
> Hmmm... that's true. That variable is only used on 3430sdp and 3430
> labrador. How about this version:
and I missed the #include <asm/mach-types.h>
> diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
> index 04a13aa..b8723e8 100644
> --- a/drivers/i2c/chips/twl4030-power.c
> +++ b/drivers/i2c/chips/twl4030-power.c
> @@ -245,14 +245,15 @@ static int __init config_sleep_wake_sequence(void)
> err |= twl4030_write_script(0x2F, sleep_off_seq,
> ARRAY_SIZE(sleep_off_seq));
>
> -#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP_3430LABRADOR)
> - /* Disabling AC charger effect on sleep-active transitions */
> - err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
> - R_CFG_P1_TRANSITION);
> - data &= 0x0;
> - err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, data ,
> - R_CFG_P1_TRANSITION);
> -#endif
> + if (machine_is_omap_3430sdp()) {
> + /* Disabling AC charger effect on sleep-active transitions */
> + err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
> + R_CFG_P1_TRANSITION);
> + data &= 0x0;
> + err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, data ,
> + R_CFG_P1_TRANSITION);
> + }
> +
> /* P1/P2/P3 LVL_WAKEUP should be on LEVEL */
> err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, LVL_WAKEUP,
> R_P1_SW_EVENTS);
--
balbi
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [patch] kill compile warning on twl4030-power.c
2008-09-15 16:21 ` Felipe Balbi
2008-09-15 16:23 ` Felipe Balbi
@ 2008-09-15 16:24 ` Peter 'p2' De Schrijver
2008-09-15 16:36 ` Felipe Balbi
1 sibling, 1 reply; 18+ messages in thread
From: Peter 'p2' De Schrijver @ 2008-09-15 16:24 UTC (permalink / raw)
To: ext Felipe Balbi; +Cc: Linux OMAP Mailing List
Hi,
> > I doubt this works if you compile for SDP or labrador. OTOH the code for
> > that bit looks suspicious :)
>
> Hmmm... that's true. That variable is only used on 3430sdp and 3430
> labrador. How about this version:
>
> diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
> index 04a13aa..b8723e8 100644
> --- a/drivers/i2c/chips/twl4030-power.c
> +++ b/drivers/i2c/chips/twl4030-power.c
> @@ -245,14 +245,15 @@ static int __init config_sleep_wake_sequence(void)
> err |= twl4030_write_script(0x2F, sleep_off_seq,
> ARRAY_SIZE(sleep_off_seq));
>
> -#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP_3430LABRADOR)
> - /* Disabling AC charger effect on sleep-active transitions */
> - err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
> - R_CFG_P1_TRANSITION);
> - data &= 0x0;
This does not make sense :)
> - err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, data ,
> - R_CFG_P1_TRANSITION);
> -#endif
> + if (machine_is_omap_3430sdp()) {
> + /* Disabling AC charger effect on sleep-active transitions */
> + err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
> + R_CFG_P1_TRANSITION);
> + data &= 0x0;
> + err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, data ,
> + R_CFG_P1_TRANSITION);
> + }
> +
> /* P1/P2/P3 LVL_WAKEUP should be on LEVEL */
> err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, LVL_WAKEUP,
> R_P1_SW_EVENTS);
>
> It's weird that a grep for LABRADOR on arch/arm does not return
> anything. Are we missing some patches ??
>
Hmm. Good question :)
Cheers,
Peter.
--
goa is a state of mind
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [patch] kill compile warning on twl4030-power.c
2008-09-15 16:24 ` Peter 'p2' De Schrijver
@ 2008-09-15 16:36 ` Felipe Balbi
2008-09-15 17:30 ` Peter 'p2' De Schrijver
0 siblings, 1 reply; 18+ messages in thread
From: Felipe Balbi @ 2008-09-15 16:36 UTC (permalink / raw)
To: Peter 'p2' De Schrijver; +Cc: ext Felipe Balbi, Linux OMAP Mailing List
On Mon, Sep 15, 2008 at 07:24:21PM +0300, Peter 'p2' De Schrijver wrote:
> Hi,
>
> > > I doubt this works if you compile for SDP or labrador. OTOH the code for
> > > that bit looks suspicious :)
> >
> > Hmmm... that's true. That variable is only used on 3430sdp and 3430
> > labrador. How about this version:
> >
> > diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
> > index 04a13aa..b8723e8 100644
> > --- a/drivers/i2c/chips/twl4030-power.c
> > +++ b/drivers/i2c/chips/twl4030-power.c
> > @@ -245,14 +245,15 @@ static int __init config_sleep_wake_sequence(void)
> > err |= twl4030_write_script(0x2F, sleep_off_seq,
> > ARRAY_SIZE(sleep_off_seq));
> >
> > -#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP_3430LABRADOR)
> > - /* Disabling AC charger effect on sleep-active transitions */
> > - err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
> > - R_CFG_P1_TRANSITION);
> > - data &= 0x0;
>
> This does not make sense :)
Why not? That data variable is only used on 3430SDP and LABRADOR
anyways. Any other build will keep generating "unused variable" warnings
and that's annoying :-p
--
balbi
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [patch] kill compile warning on twl4030-power.c
2008-09-15 16:36 ` Felipe Balbi
@ 2008-09-15 17:30 ` Peter 'p2' De Schrijver
2008-09-15 17:34 ` Felipe Balbi
2008-09-15 18:23 ` Felipe Balbi
0 siblings, 2 replies; 18+ messages in thread
From: Peter 'p2' De Schrijver @ 2008-09-15 17:30 UTC (permalink / raw)
To: ext Felipe Balbi; +Cc: Linux OMAP Mailing List
> > > -#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP_3430LABRADOR)
> > > - /* Disabling AC charger effect on sleep-active transitions */
> > > - err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
> > > - R_CFG_P1_TRANSITION);
> > > - data &= 0x0;
> >
> > This does not make sense :)
>
> Why not? That data variable is only used on 3430SDP and LABRADOR
> anyways. Any other build will keep generating "unused variable" warnings
> and that's annoying :-p
Because a logical and with 0 will always result in 0. So the read is
useless. So the original code is probably wrong.
Cheers,
Peter.
--
goa is a state of mind
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [patch] kill compile warning on twl4030-power.c
2008-09-15 17:30 ` Peter 'p2' De Schrijver
@ 2008-09-15 17:34 ` Felipe Balbi
2008-09-15 18:23 ` Felipe Balbi
1 sibling, 0 replies; 18+ messages in thread
From: Felipe Balbi @ 2008-09-15 17:34 UTC (permalink / raw)
To: Peter 'p2' De Schrijver; +Cc: ext Felipe Balbi, Linux OMAP Mailing List
On Mon, Sep 15, 2008 at 08:30:20PM +0300, Peter 'p2' De Schrijver wrote:
> > > > -#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP_3430LABRADOR)
> > > > - /* Disabling AC charger effect on sleep-active transitions */
> > > > - err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
> > > > - R_CFG_P1_TRANSITION);
> > > > - data &= 0x0;
> > >
> > > This does not make sense :)
> >
> > Why not? That data variable is only used on 3430SDP and LABRADOR
> > anyways. Any other build will keep generating "unused variable" warnings
> > and that's annoying :-p
>
> Because a logical and with 0 will always result in 0. So the read is
> useless. So the original code is probably wrong.
ehehe, but that's not what I was changing :-p
--
balbi
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [patch] kill compile warning on twl4030-power.c
2008-09-15 17:30 ` Peter 'p2' De Schrijver
2008-09-15 17:34 ` Felipe Balbi
@ 2008-09-15 18:23 ` Felipe Balbi
2008-09-16 12:29 ` [PATCH] Fix build for beagleboard Peter 'p2' De Schrijver
1 sibling, 1 reply; 18+ messages in thread
From: Felipe Balbi @ 2008-09-15 18:23 UTC (permalink / raw)
To: Peter 'p2' De Schrijver; +Cc: ext Felipe Balbi, Linux OMAP Mailing List
On Mon, Sep 15, 2008 at 08:30:20PM +0300, Peter 'p2' De Schrijver wrote:
> > > > -#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP_3430LABRADOR)
> > > > - /* Disabling AC charger effect on sleep-active transitions */
> > > > - err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
> > > > - R_CFG_P1_TRANSITION);
> > > > - data &= 0x0;
> > >
> > > This does not make sense :)
> >
> > Why not? That data variable is only used on 3430SDP and LABRADOR
> > anyways. Any other build will keep generating "unused variable" warnings
> > and that's annoying :-p
>
> Because a logical and with 0 will always result in 0. So the read is
> useless. So the original code is probably wrong.
Maybe you meant data &= ~(1 << 0); ???
--
balbi
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH] Fix build for beagleboard
2008-09-15 18:23 ` Felipe Balbi
@ 2008-09-16 12:29 ` Peter 'p2' De Schrijver
2008-09-23 10:54 ` Tony Lindgren
0 siblings, 1 reply; 18+ messages in thread
From: Peter 'p2' De Schrijver @ 2008-09-16 12:29 UTC (permalink / raw)
To: linux-omap, me; +Cc: Peter 'p2' De Schrijver
Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
---
drivers/i2c/chips/twl4030-power.c | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
index 195c3c4..ea8f447 100644
--- a/drivers/i2c/chips/twl4030-power.c
+++ b/drivers/i2c/chips/twl4030-power.c
@@ -212,7 +216,6 @@ static int __init twl4030_write_script(u8 address, struct triton_ins *script,
static int __init config_sleep_wake_sequence(void)
{
int err = 0;
- u8 data;
/*
* CLKREQ is pulled high on the 2430SDP, therefore, we need to take
@@ -242,14 +245,16 @@ static int __init config_sleep_wake_sequence(void)
err |= twl4030_write_script(0x2F, sleep_off_seq,
ARRAY_SIZE(sleep_off_seq));
-#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP_3430LABRADOR)
- /* Disabling AC charger effect on sleep-active transitions */
- err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
- R_CFG_P1_TRANSITION);
- data &= 0x0;
- err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, data ,
- R_CFG_P1_TRANSITION);
-#endif
+ if (machine_is_omap_3430sdp() || machine_is_omap_ldp()) {
+ u8 data;
+ /* Disabling AC charger effect on sleep-active transitions */
+ err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
+ R_CFG_P1_TRANSITION);
+ data &= ~(1<<1);
+ err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, data ,
+ R_CFG_P1_TRANSITION);
+ }
+
/* P1/P2/P3 LVL_WAKEUP should be on LEVEL */
err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, LVL_WAKEUP,
R_P1_SW_EVENTS);
--
1.5.6.3
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH] Fix build for beagleboard
2008-09-16 12:29 ` [PATCH] Fix build for beagleboard Peter 'p2' De Schrijver
@ 2008-09-23 10:54 ` Tony Lindgren
0 siblings, 0 replies; 18+ messages in thread
From: Tony Lindgren @ 2008-09-23 10:54 UTC (permalink / raw)
To: Peter 'p2' De Schrijver; +Cc: linux-omap, me
* Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com> [080916 15:30]:
Pushing.
Tony
>
> Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
> ---
> drivers/i2c/chips/twl4030-power.c | 25 +++++++++++++++----------
> 1 files changed, 15 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/i2c/chips/twl4030-power.c b/drivers/i2c/chips/twl4030-power.c
> index 195c3c4..ea8f447 100644
> --- a/drivers/i2c/chips/twl4030-power.c
> +++ b/drivers/i2c/chips/twl4030-power.c
> @@ -212,7 +216,6 @@ static int __init twl4030_write_script(u8 address, struct triton_ins *script,
> static int __init config_sleep_wake_sequence(void)
> {
> int err = 0;
> - u8 data;
>
> /*
> * CLKREQ is pulled high on the 2430SDP, therefore, we need to take
> @@ -242,14 +245,16 @@ static int __init config_sleep_wake_sequence(void)
> err |= twl4030_write_script(0x2F, sleep_off_seq,
> ARRAY_SIZE(sleep_off_seq));
>
> -#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP_3430LABRADOR)
> - /* Disabling AC charger effect on sleep-active transitions */
> - err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
> - R_CFG_P1_TRANSITION);
> - data &= 0x0;
> - err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, data ,
> - R_CFG_P1_TRANSITION);
> -#endif
> + if (machine_is_omap_3430sdp() || machine_is_omap_ldp()) {
> + u8 data;
> + /* Disabling AC charger effect on sleep-active transitions */
> + err |= twl4030_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &data,
> + R_CFG_P1_TRANSITION);
> + data &= ~(1<<1);
> + err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, data ,
> + R_CFG_P1_TRANSITION);
> + }
> +
> /* P1/P2/P3 LVL_WAKEUP should be on LEVEL */
> err |= twl4030_i2c_write_u8(TWL4030_MODULE_PM_MASTER, LVL_WAKEUP,
> R_P1_SW_EVENTS);
> --
> 1.5.6.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2008-09-23 10:54 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-15 15:12 [patch] kill compile warning on twl4030-power.c Felipe Balbi
2008-09-15 15:55 ` Peter 'p2' De Schrijver
2008-09-15 16:21 ` Felipe Balbi
2008-09-15 16:23 ` Felipe Balbi
2008-09-15 16:24 ` Peter 'p2' De Schrijver
2008-09-15 16:36 ` Felipe Balbi
2008-09-15 17:30 ` Peter 'p2' De Schrijver
2008-09-15 17:34 ` Felipe Balbi
2008-09-15 18:23 ` Felipe Balbi
2008-09-16 12:29 ` [PATCH] Fix build for beagleboard Peter 'p2' De Schrijver
2008-09-23 10:54 ` Tony Lindgren
-- strict thread matches above, loose matches on Subject: below --
2008-09-11 11:50 [PATCH] Fix for twl4030-power.c build failure " Peter 'p2' De Schrijver
2008-09-11 11:50 ` [PATCH] Fix build " Peter 'p2' De Schrijver
2008-09-11 18:15 ` Tony Lindgren
2008-09-12 10:32 ` [PATCH] *** SUBJECT HERE *** Peter 'p2' De Schrijver
2008-09-12 10:32 ` [PATCH] Fix build for beagleboard Peter 'p2' De Schrijver
2008-09-12 12:06 ` Felipe Balbi
2008-09-12 17:21 ` Tony Lindgren
2008-09-12 14:02 ` Paul Walmsley
2008-09-12 10:31 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox