[pkg-fso-commits] [SCM] linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko branch, andy-tracking, updated. upstream/20090303.gitb9de904e-140-g23b564c

Nelson Castillo arhuaco at freaks-unidos.net
Mon Jun 8 17:30:10 UTC 2009


The following commit has been merged in the andy-tracking branch:
commit 4c9a8d5badc466a68d71754d47bbb792a8dc44da
Author: Nelson Castillo <arhuaco at freaks-unidos.net>
Date:   Tue Apr 28 18:58:05 2009 -0500

    GTA01: Add "present" property to power_supply
    
    Small patch to add /sys/class/power_supply/battery/present.
    You must not run a GTA01 without battery thus it is always 1.
    
    Signed-off-by: Nelson Castillo <arhuaco at freaks-unidos.net>

diff --git a/drivers/power/gta01_battery.c b/drivers/power/gta01_battery.c
index 909f7fe..81a0fe7 100644
--- a/drivers/power/gta01_battery.c
+++ b/drivers/power/gta01_battery.c
@@ -19,6 +19,7 @@ struct gta01_battery {
 };
 
 static enum power_supply_property gta01_bat_props[] = {
+	POWER_SUPPLY_PROP_PRESENT,
 	POWER_SUPPLY_PROP_STATUS,
 	POWER_SUPPLY_PROP_VOLTAGE_NOW,
 	POWER_SUPPLY_PROP_CURRENT_NOW,
@@ -43,6 +44,9 @@ static int gta01_bat_get_property(struct power_supply *psy,
 	case POWER_SUPPLY_PROP_CURRENT_NOW:
 		val->intval = bat->pdata->get_current();
 		break;
+	case POWER_SUPPLY_PROP_PRESENT:
+		val->intval = 1; /* You must never run GTA01 without battery. */
+		break;
 	default:
 		return -EINVAL;
 	}

-- 
linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko



More information about the pkg-fso-commits mailing list