* [PATCH 4/4] power_supply: bump EC version check that we refuse to run with in olpc_battery
@ 2008-04-30 20:30 Andres Salomon
2008-04-30 21:55 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Andres Salomon @ 2008-04-30 20:30 UTC (permalink / raw)
To: Andrew Morton; +Cc: cbou, linux-kernel, dwmw2
Refuse to run with an EC < 0x44. We're playing it safe, and this is
a pretty old EC version.
Also, add a comment about why we're checking the EC version.
Signed-off-by: Andres Salomon <dilinger@debian.org>
---
drivers/power/olpc_battery.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/power/olpc_battery.c b/drivers/power/olpc_battery.c
index cb45a67..086b146 100644
--- a/drivers/power/olpc_battery.c
+++ b/drivers/power/olpc_battery.c
@@ -398,7 +398,12 @@ static int __init olpc_bat_init(void)
if (!olpc_platform_info.ecver)
return -ENXIO;
- if (olpc_platform_info.ecver < 0x43) {
+
+ /*
+ * We've seen a number of EC protocol changes; this driver requires
+ * the latest EC protocol, supported by 0x44 and above.
+ */
+ if (olpc_platform_info.ecver < 0x44) {
printk(KERN_NOTICE "OLPC EC version 0x%02x too old for battery driver.\n", olpc_platform_info.ecver);
return -ENXIO;
}
--
1.5.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 4/4] power_supply: bump EC version check that we refuse to run with in olpc_battery
2008-04-30 20:30 [PATCH 4/4] power_supply: bump EC version check that we refuse to run with in olpc_battery Andres Salomon
@ 2008-04-30 21:55 ` Andrew Morton
2008-04-30 23:12 ` Andres Salomon
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2008-04-30 21:55 UTC (permalink / raw)
To: Andres Salomon; +Cc: cbou, linux-kernel, dwmw2
On Wed, 30 Apr 2008 16:30:30 -0400
Andres Salomon <dilinger@queued.net> wrote:
>
> Refuse to run with an EC < 0x44. We're playing it safe, and this is
> a pretty old EC version.
>
> Also, add a comment about why we're checking the EC version.
Sigh. Presantly, the entirety of olpc_battery.c looks very nice
in an 80-column display.
>
> diff --git a/drivers/power/olpc_battery.c b/drivers/power/olpc_battery.c
> index cb45a67..086b146 100644
> --- a/drivers/power/olpc_battery.c
> +++ b/drivers/power/olpc_battery.c
> @@ -398,7 +398,12 @@ static int __init olpc_bat_init(void)
>
> if (!olpc_platform_info.ecver)
> return -ENXIO;
> - if (olpc_platform_info.ecver < 0x43) {
> +
> + /*
> + * We've seen a number of EC protocol changes; this driver requires
> + * the latest EC protocol, supported by 0x44 and above.
> + */
> + if (olpc_platform_info.ecver < 0x44) {
> printk(KERN_NOTICE "OLPC EC version 0x%02x too old for battery driver.\n", olpc_platform_info.ecver);
> return -ENXIO;
Now it needs 0x80 :(
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 4/4] power_supply: bump EC version check that we refuse to run with in olpc_battery
2008-04-30 21:55 ` Andrew Morton
@ 2008-04-30 23:12 ` Andres Salomon
0 siblings, 0 replies; 3+ messages in thread
From: Andres Salomon @ 2008-04-30 23:12 UTC (permalink / raw)
To: Andrew Morton; +Cc: cbou, linux-kernel, dwmw2
On Wed, 30 Apr 2008 14:55:15 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Wed, 30 Apr 2008 16:30:30 -0400
> Andres Salomon <dilinger@queued.net> wrote:
>
> >
> > Refuse to run with an EC < 0x44. We're playing it safe, and this is
> > a pretty old EC version.
> >
> > Also, add a comment about why we're checking the EC version.
>
> Sigh. Presantly, the entirety of olpc_battery.c looks very nice
> in an 80-column display.
>
> >
> > diff --git a/drivers/power/olpc_battery.c b/drivers/power/olpc_battery.c
> > index cb45a67..086b146 100644
> > --- a/drivers/power/olpc_battery.c
> > +++ b/drivers/power/olpc_battery.c
> > @@ -398,7 +398,12 @@ static int __init olpc_bat_init(void)
> >
> > if (!olpc_platform_info.ecver)
> > return -ENXIO;
> > - if (olpc_platform_info.ecver < 0x43) {
> > +
> > + /*
> > + * We've seen a number of EC protocol changes; this driver requires
> > + * the latest EC protocol, supported by 0x44 and above.
> > + */
> > + if (olpc_platform_info.ecver < 0x44) {
> > printk(KERN_NOTICE "OLPC EC version 0x%02x too old for battery driver.\n", olpc_platform_info.ecver);
> > return -ENXIO;
>
> Now it needs 0x80 :(
You can fight dwmw2 on that one, I'm keeping out of such battles. :)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-30 23:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-30 20:30 [PATCH 4/4] power_supply: bump EC version check that we refuse to run with in olpc_battery Andres Salomon
2008-04-30 21:55 ` Andrew Morton
2008-04-30 23:12 ` Andres Salomon
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).