power: qpnp-charger: adaptive input current limiting interface
Expose the following new power supply framework properties
to allow adaptive input current limiting to take place
from userspace applications:
* POWER_SUPPLY_PROP_INPUT_VOLTAGE_REGULATION
* POWER_SUPPLY_PROP_INPUT_CURRENT_MAX
Note that INPUT_CURRENT_MAX is configured to be writeable
and allows to configure the input current limting for the
USB charge path.
CRs-Fixed: 457381
Change-Id: I4a9cdb72dbbcf32d553e9d1396940d49dc454a4d
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
index 11e6cc1..982c30b 100644
--- a/drivers/power/power_supply_sysfs.c
+++ b/drivers/power/power_supply_sysfs.c
@@ -147,7 +147,9 @@
POWER_SUPPLY_ATTR(voltage_min_design),
POWER_SUPPLY_ATTR(voltage_now),
POWER_SUPPLY_ATTR(voltage_avg),
+ POWER_SUPPLY_ATTR(input_voltage_regulation),
POWER_SUPPLY_ATTR(current_max),
+ POWER_SUPPLY_ATTR(input_current_max),
POWER_SUPPLY_ATTR(current_now),
POWER_SUPPLY_ATTR(current_avg),
POWER_SUPPLY_ATTR(power_now),