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>
This commit is contained in:
committed by
Stephen Boyd
parent
556c6f2f0c
commit
b33eb64fa4
@@ -166,8 +166,6 @@ struct power_supply {
|
||||
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;
|
||||
@@ -217,7 +215,8 @@ 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);
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user