2009-09-09 14:12:01

by Pavel Machek

[permalink] [raw]
Subject: [patch for 2.6.31] zaurus c3000 aka spitz: fix resume

Hi, Linus!

Spitz resume was broken for year or likely two, and it would be very
nice to fix it for 2.6.31 release. One liner is below, and it really
can not harm. It already is in Eric's fix queue, so pulling that for
.31 should work, too.

Do you think you could take it?
Pavel

---


sharpsl_pm.c code tries to read battery state very early during
resume, but those battery meters are connected on SPI and that's only
resumed way later.

Replace the check with simple checking of battery fatal signal, that
actually works at this stage.

Signed-off-by: Pavel Machek <[email protected]>
Tested-by: Stanislav Brabec <[email protected]>
Acked-by: Dmitry Eremin-Solenikov <[email protected]>

--- linux-rc/arch/arm.ofic/mach-pxa/sharpsl_pm.c 2009-08-28 00:19:10.000000000 +0200
+++ linux-rc/arch/arm/mach-pxa/sharpsl_pm.c 2009-09-04 11:18:33.000000000 +0200
@@ -678,8 +678,8 @@
dev_dbg(sharpsl_pm.dev, "User triggered wakeup in offline charger.\n");
}

- if ((!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_LOCK)) || (sharpsl_fatal_check() < 0) )
- {
+ if ((!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_LOCK)) ||
+ (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_FATAL))) {
dev_err(sharpsl_pm.dev, "Fatal condition. Suspend.\n");
corgi_goto_sleep(alarm_time, alarm_enable, state);
return 1;

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


2009-09-09 14:37:59

by Eric Miao

[permalink] [raw]
Subject: Re: [patch for 2.6.31] zaurus c3000 aka spitz: fix resume

On Wed, Sep 9, 2009 at 3:50 PM, Pavel Machek<[email protected]> wrote:
> Hi, Linus!
>
> Spitz resume was broken for year or likely two, and it would be very
> nice to fix it for 2.6.31 release. One liner is below, and it really
> can not harm. It already is in Eric's fix queue, so pulling that for
> .31 should work, too.
>

This should be sitting in rmk's git tree and I'm not sure if Russell
has sent the pull request already.

2009-09-09 14:48:37

by Daniel Walker

[permalink] [raw]
Subject: Re: [patch for 2.6.31] zaurus c3000 aka spitz: fix resume

On Wed, 2009-09-09 at 09:50 +0200, Pavel Machek wrote:
> Hi, Linus!
>
> Spitz resume was broken for year or likely two, and it would be very
> nice to fix it for 2.6.31 release. One liner is below, and it really
> can not harm. It already is in Eric's fix queue, so pulling that for
> .31 should work, too.
>
> Do you think you could take it?

One checkpatch error here..

ERROR: trailing whitespace
#77: FILE: arch/arm/mach-pxa/sharpsl_pm.c:681:
+^Iif ((!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_LOCK)) || $

total: 1 errors, 0 warnings, 10 lines checked


Daniel

2009-09-09 18:24:05

by Russell King - ARM Linux

[permalink] [raw]
Subject: Re: [patch for 2.6.31] zaurus c3000 aka spitz: fix resume

On Wed, Sep 09, 2009 at 10:37:41PM +0800, Eric Miao wrote:
> On Wed, Sep 9, 2009 at 3:50 PM, Pavel Machek<[email protected]> wrote:
> > Hi, Linus!
> >
> > Spitz resume was broken for year or likely two, and it would be very
> > nice to fix it for 2.6.31 release. One liner is below, and it really
> > can not harm. It already is in Eric's fix queue, so pulling that for
> > .31 should work, too.
> >
>
> This should be sitting in rmk's git tree and I'm not sure if Russell
> has sent the pull request already.

It's just Pavel being his obnoxious impatient self...

2009-09-10 00:40:42

by Eric Miao

[permalink] [raw]
Subject: Re: [patch for 2.6.31] zaurus c3000 aka spitz: fix resume

On Wed, Sep 9, 2009 at 10:49 PM, Daniel Walker <[email protected]> wrote:
> On Wed, 2009-09-09 at 09:50 +0200, Pavel Machek wrote:
>> Hi, Linus!
>>
>> Spitz resume was broken for year or likely two, and it would be very
>> nice to fix it for 2.6.31 release. One liner is below, and it really
>> can not harm. It already is in Eric's fix queue, so pulling that for
>> .31 should work, too.
>>
>> Do you think you could take it?
>
> One checkpatch error here..
>
> ERROR: trailing whitespace
> #77: FILE: arch/arm/mach-pxa/sharpsl_pm.c:681:
> +^Iif ((!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_LOCK)) || $
>
> total: 1 errors, 0 warnings, 10 lines checked
>

This has been fixed in the version I sent to Russell.

2009-09-10 19:05:23

by Pavel Machek

[permalink] [raw]
Subject: Re: [patch for 2.6.31] zaurus c3000 aka spitz: fix resume

On Thu 2009-09-10 08:40:24, Eric Miao wrote:
> On Wed, Sep 9, 2009 at 10:49 PM, Daniel Walker <[email protected]> wrote:
> > On Wed, 2009-09-09 at 09:50 +0200, Pavel Machek wrote:
> >> Hi, Linus!
> >>
> >> Spitz resume was broken for year or likely two, and it would be very
> >> nice to fix it for 2.6.31 release. One liner is below, and it really
> >> can not harm. It already is in Eric's fix queue, so pulling that for
> >> .31 should work, too.
> >>
> >> Do you think you could take it?
> >
> > One checkpatch error here..
> >
> > ERROR: trailing whitespace
> > #77: FILE: arch/arm/mach-pxa/sharpsl_pm.c:681:
> > +^Iif ((!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_LOCK)) || $
> >
> > total: 1 errors, 0 warnings, 10 lines checked
> >
>
> This has been fixed in the version I sent to Russell.

Thanks and sorry for the noise.

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

2009-09-10 19:19:37

by Pavel Machek

[permalink] [raw]
Subject: Re: [patch for 2.6.31] zaurus c3000 aka spitz: fix resume

On Wed 2009-09-09 19:23:40, Russell King - ARM Linux wrote:
> On Wed, Sep 09, 2009 at 10:37:41PM +0800, Eric Miao wrote:
> > On Wed, Sep 9, 2009 at 3:50 PM, Pavel Machek<[email protected]> wrote:
> > > Hi, Linus!
> > >
> > > Spitz resume was broken for year or likely two, and it would be very
> > > nice to fix it for 2.6.31 release. One liner is below, and it really
> > > can not harm. It already is in Eric's fix queue, so pulling that for
> > > .31 should work, too.
> > >
> >
> > This should be sitting in rmk's git tree and I'm not sure if Russell
> > has sent the pull request already.
>
> It's just Pavel being his obnoxious impatient self...

Aha, Russell, being polite and helpful, as usual.

Only that, you know, you missed the deadline, so... perhaps I had
reason to be impatient?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

2009-09-10 22:42:26

by Russell King - ARM Linux

[permalink] [raw]
Subject: Re: [patch for 2.6.31] zaurus c3000 aka spitz: fix resume

On Thu, Sep 10, 2009 at 09:19:32PM +0200, Pavel Machek wrote:
> On Wed 2009-09-09 19:23:40, Russell King - ARM Linux wrote:
> > On Wed, Sep 09, 2009 at 10:37:41PM +0800, Eric Miao wrote:
> > > On Wed, Sep 9, 2009 at 3:50 PM, Pavel Machek<[email protected]> wrote:
> > > > Hi, Linus!
> > > >
> > > > Spitz resume was broken for year or likely two, and it would be very
> > > > nice to fix it for 2.6.31 release. One liner is below, and it really
> > > > can not harm. It already is in Eric's fix queue, so pulling that for
> > > > .31 should work, too.
> > > >
> > >
> > > This should be sitting in rmk's git tree and I'm not sure if Russell
> > > has sent the pull request already.
> >
> > It's just Pavel being his obnoxious impatient self...
>
> Aha, Russell, being polite and helpful, as usual.
>
> Only that, you know, you missed the deadline, so... perhaps I had
> reason to be impatient?

I missed the deadline because I was waiting on others to sort out telling
me whether a bugfix patch was actually correct, and then it took several
days and mails to get an attributation line out of them. I finally got
that yesterday, and since I'm not doing kernel work (in fact, I'm hardly
in front of the computer at the moment) these things are going to _HAVE_
to wait until this weekend.

By agreement with Linus, I do not send pull requests more often than once
a week, absolute maximum. So if I've something pending in the queue, I
hold off sending the queue until that issue is resolved.

Don't like it? Tough. This is the workflow that I've been forced into
by other flame wars. It would be my personal preference to ensure that
fixes make their way in a timely manner into mainline, but due to that,
it's just not possible.

2009-09-11 01:19:37

by Eric Miao

[permalink] [raw]
Subject: Re: [patch for 2.6.31] zaurus c3000 aka spitz: fix resume

On Fri, Sep 11, 2009 at 6:41 AM, Russell King - ARM Linux
<[email protected]> wrote:
> On Thu, Sep 10, 2009 at 09:19:32PM +0200, Pavel Machek wrote:
>> On Wed 2009-09-09 19:23:40, Russell King - ARM Linux wrote:
>> > On Wed, Sep 09, 2009 at 10:37:41PM +0800, Eric Miao wrote:
>> > > On Wed, Sep 9, 2009 at 3:50 PM, Pavel Machek<[email protected]> wrote:
>> > > > Hi, Linus!
>> > > >
>> > > > Spitz resume was broken for year or likely two, and it would be very
>> > > > nice to fix it for 2.6.31 release. One liner is below, and it really
>> > > > can not harm. It already is in Eric's fix queue, so pulling that for
>> > > > .31 should work, too.
>> > > >
>> > >
>> > > This should be sitting in rmk's git tree and I'm not sure if Russell
>> > > has sent the pull request already.
>> >
>> > It's just Pavel being his obnoxious impatient self...
>>
>> Aha, Russell, being polite and helpful, as usual.
>>
>> Only that, you know, you missed the deadline, so... perhaps I had
>> reason to be impatient?
>
> I missed the deadline because I was waiting on others to sort out telling
> me whether a bugfix patch was actually correct, and then it took several
> days and mails to get an attributation line out of them.  I finally got
> that yesterday, and since I'm not doing kernel work (in fact, I'm hardly
> in front of the computer at the moment) these things are going to _HAVE_
> to wait until this weekend.
>
> By agreement with Linus, I do not send pull requests more often than once
> a week, absolute maximum.  So if I've something pending in the queue, I
> hold off sending the queue until that issue is resolved.
>
> Don't like it?  Tough.  This is the workflow that I've been forced into
> by other flame wars.  It would be my personal preference to ensure that
> fixes make their way in a timely manner into mainline, but due to that,
> it's just not possible.
>

Pavel,

It is still possible to get this into the stable release so take easy.

2009-09-15 11:33:57

by Pavel Machek

[permalink] [raw]
Subject: Re: [patch for 2.6.31] zaurus c3000 aka spitz: fix resume

On Fri 2009-09-11 09:19:19, Eric Miao wrote:
> On Fri, Sep 11, 2009 at 6:41 AM, Russell King - ARM Linux
> <[email protected]> wrote:
> > On Thu, Sep 10, 2009 at 09:19:32PM +0200, Pavel Machek wrote:
> >> On Wed 2009-09-09 19:23:40, Russell King - ARM Linux wrote:
> >> > On Wed, Sep 09, 2009 at 10:37:41PM +0800, Eric Miao wrote:
> >> > > On Wed, Sep 9, 2009 at 3:50 PM, Pavel Machek<[email protected]> wrote:
> >> > > > Hi, Linus!
> >> > > >
> >> > > > Spitz resume was broken for year or likely two, and it would be very
> >> > > > nice to fix it for 2.6.31 release. One liner is below, and it really
> >> > > > can not harm. It already is in Eric's fix queue, so pulling that for
> >> > > > .31 should work, too.
> >> > > >
> >> > >
> >> > > This should be sitting in rmk's git tree and I'm not sure if Russell
> >> > > has sent the pull request already.
> >> >
> >> > It's just Pavel being his obnoxious impatient self...
> >>
> >> Aha, Russell, being polite and helpful, as usual.
> >>
> >> Only that, you know, you missed the deadline, so... perhaps I had
> >> reason to be impatient?
> >
> > I missed the deadline because I was waiting on others to sort out telling
> > me whether a bugfix patch was actually correct, and then it took several
> > days and mails to get an attributation line out of them. ??I finally got
> > that yesterday, and since I'm not doing kernel work (in fact, I'm hardly
> > in front of the computer at the moment) these things are going to _HAVE_
> > to wait until this weekend.
> >
> > By agreement with Linus, I do not send pull requests more often than once
> > a week, absolute maximum. ??So if I've something pending in the queue, I
> > hold off sending the queue until that issue is resolved.
> >
> > Don't like it? ??Tough. ??This is the workflow that I've been forced into
> > by other flame wars. ??It would be my personal preference to ensure that
> > fixes make their way in a timely manner into mainline, but due to that,
> > it's just not possible.
> >
>
> Pavel,
>
> It is still possible to get this into the stable release so take easy.

Ok, so can you (or Russell?) add cc: [email protected] header so that
stable is notified when patch is merged?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html