pagemap: fix pfn calculation for hugepage
[safe/jmp/linux-2.6] / include / linux / power_supply.h
index 0ab6aa1..ebd2b8f 100644 (file)
@@ -39,6 +39,13 @@ enum {
 };
 
 enum {
+       POWER_SUPPLY_CHARGE_TYPE_UNKNOWN = 0,
+       POWER_SUPPLY_CHARGE_TYPE_NONE,
+       POWER_SUPPLY_CHARGE_TYPE_TRICKLE,
+       POWER_SUPPLY_CHARGE_TYPE_FAST,
+};
+
+enum {
        POWER_SUPPLY_HEALTH_UNKNOWN = 0,
        POWER_SUPPLY_HEALTH_GOOD,
        POWER_SUPPLY_HEALTH_OVERHEAT,
@@ -70,10 +77,12 @@ enum {
 enum power_supply_property {
        /* Properties of type `int' */
        POWER_SUPPLY_PROP_STATUS = 0,
+       POWER_SUPPLY_PROP_CHARGE_TYPE,
        POWER_SUPPLY_PROP_HEALTH,
        POWER_SUPPLY_PROP_PRESENT,
        POWER_SUPPLY_PROP_ONLINE,
        POWER_SUPPLY_PROP_TECHNOLOGY,
+       POWER_SUPPLY_PROP_CYCLE_COUNT,
        POWER_SUPPLY_PROP_VOLTAGE_MAX,
        POWER_SUPPLY_PROP_VOLTAGE_MIN,
        POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
@@ -136,6 +145,7 @@ struct power_supply {
                            enum power_supply_property psp,
                            union power_supply_propval *val);
        void (*external_power_changed)(struct power_supply *psy);
+       void (*set_charged)(struct power_supply *psy);
 
        /* For APM emulation, think legacy userspace. */
        int use_for_apm;
@@ -175,8 +185,10 @@ struct power_supply_info {
        int use_for_apm;
 };
 
+extern struct power_supply *power_supply_get_by_name(char *name);
 extern void power_supply_changed(struct power_supply *psy);
 extern int power_supply_am_i_supplied(struct power_supply *psy);
+extern int power_supply_set_battery_charged(struct power_supply *psy);
 
 #if defined(CONFIG_POWER_SUPPLY) || defined(CONFIG_POWER_SUPPLY_MODULE)
 extern int power_supply_is_system_supplied(void);