Commit 484d6d50 authored by Andres Salomon's avatar Andres Salomon Committed by Anton Vorontsov

power_supply: bump EC version check that we refuse to run with in olpc_battery

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: default avatarAndres Salomon <dilinger@debian.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
parent b2bd8a3b
...@@ -389,8 +389,14 @@ static int __init olpc_bat_init(void) ...@@ -389,8 +389,14 @@ static int __init olpc_bat_init(void)
if (!olpc_platform_info.ecver) if (!olpc_platform_info.ecver)
return -ENXIO; return -ENXIO;
if (olpc_platform_info.ecver < 0x43) {
printk(KERN_NOTICE "OLPC EC version 0x%02x too old for battery driver.\n", olpc_platform_info.ecver); /*
* 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; return -ENXIO;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment