aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/olpc_battery.c
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2008-05-02 16:41:59 -0400
committerAnton Vorontsov <cbouatmailru@gmail.com>2008-05-04 05:14:08 -0400
commit484d6d50cca3941db6e063113d124333aed0abc0 (patch)
tree7bd15eb728716a577be2d1e28a8fcbc817f91152 /drivers/power/olpc_battery.c
parentb2bd8a3bcdd18101eb5d85c267c1a1fb8ce9acc7 (diff)
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: Andres Salomon <dilinger@debian.org> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power/olpc_battery.c')
-rw-r--r--drivers/power/olpc_battery.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/power/olpc_battery.c b/drivers/power/olpc_battery.c
index d5fe6f0c9de0..c8b596a7fc94 100644
--- a/drivers/power/olpc_battery.c
+++ b/drivers/power/olpc_battery.c
@@ -389,8 +389,14 @@ static int __init olpc_bat_init(void)
389 389
390 if (!olpc_platform_info.ecver) 390 if (!olpc_platform_info.ecver)
391 return -ENXIO; 391 return -ENXIO;
392 if (olpc_platform_info.ecver < 0x43) { 392
393 printk(KERN_NOTICE "OLPC EC version 0x%02x too old for battery driver.\n", olpc_platform_info.ecver); 393 /*
394 * We've seen a number of EC protocol changes; this driver requires
395 * the latest EC protocol, supported by 0x44 and above.
396 */
397 if (olpc_platform_info.ecver < 0x44) {
398 printk(KERN_NOTICE "OLPC EC version 0x%02x too old for "
399 "battery driver.\n", olpc_platform_info.ecver);
394 return -ENXIO; 400 return -ENXIO;
395 } 401 }
396 402