lkml.org 
[lkml]   [2005]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Sharp power management: split into sharpsl-dependend and generic parts
Hi!

> > This splits sharpsl_pm.c into sharpsl_pm.c and
> > sharp_pm.c. sharpsl_pm.c contains stuff that is shared between spitz
> > and corgi, sharp_pm.c contains more widely usable code. I'd like
> > something like this to be eventually merged... [Of course, I'll
> > cleanup #ifdef COLLIE's, I did not realize some were still pending.]
> >
> > Comments?
>
> The patch makes it very difficult to see what you've changed. The other
> ifdef COLLIEs look fairly straight forward to clean up and once that's
> done I'm ok with the principle of it.

Yep, sorry about that. Best way to see what I've done is to apply the
patch, then diff between old sharpsl_pm.c and new sharp_pm.c.

> I don't think the filenames are quite right as collie is still a Sharp
> SL series device. How about leaving the common code in sharpsl_pm.c and
> adding sharpsl_pm_pxa.c for the corgi/spitz common code? That should
> make the diffs easier to read. Eventually, sharpsl_pm.c should probably
> end up in arm/common but for now, I'd like to see easy to read
> diffs.

Okay, yes, that's a plan. Works for me.

> Thinking further about the structure, I have another idea which might be
> worth thinking about. If the common sharpsl_pm code was moved to
> arm/common, the files mach-sa1100/sharpsl_pm.c and mach-pxa/sharpsl_pm.c
> could provide the mach dependent functions Only one of the two would
> ever get compiled into a kernel so the files can provide the same
> function namespace and avoid any ugly ifdefs or tables of function
> pointers.

I'd say we want to keep those function pointers. We may want to
support single kernel running on multiple machines. Its probably not
going to go as far as multiboot on pxa and sa1100, but you have
function pointers there, already, and it seems cleaner to have single
mechanism for handling indirection.

> Out of interest, does the code work on collie yet?

Somehow... it is able to read battery status from time to time, and it
detects ac plug/unplug. I do not yet dare to enable real charging.

Pavel
--
Thanks, Sharp!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-22 02:19    [W:0.049 / U:0.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site