power: core: add power supply APIs

Rename power_supply_set_charging_by to power_supply_set_online to
more accurately reflect the intent of the API.

Add power_supply_set_charge_type to enable a charger driver to set
a POWER_SUPPLY_PROP_CHARGE_TYPE. Ultimately this is handled like
a request, the receiving charger driver then can handle the request
and report the adequate POWER_SUPPLY_PROP_CHARGE_TYPE once necessary
action has been taken.

Change-Id: Idf4760c7d6c0f61a9eccc656cd469a6ac5fdc6cd
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index cab042b..b4dcecb 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -157,8 +157,6 @@
 				     enum power_supply_property psp);
 	void (*external_power_changed)(struct power_supply *psy);
 	void (*set_charged)(struct power_supply *psy);
-	int (*set_current_limit)(struct power_supply *psy, int limit);
-	int (*set_charging_by)(struct power_supply *psy, bool enable);
 
 	/* For APM emulation, think legacy userspace. */
 	int use_for_apm;
@@ -208,7 +206,8 @@
 extern int power_supply_am_i_supplied(struct power_supply *psy);
 extern int power_supply_set_battery_charged(struct power_supply *psy);
 extern int power_supply_set_current_limit(struct power_supply *psy, int limit);
-extern int power_supply_set_charging_by(struct power_supply *psy, bool enable);
+extern int power_supply_set_online(struct power_supply *psy, bool enable);
+extern int power_supply_set_charge_type(struct power_supply *psy, int type);
 
 #if defined(CONFIG_POWER_SUPPLY) || defined(CONFIG_POWER_SUPPLY_MODULE)
 extern int power_supply_is_system_supplied(void);