Skip to content

Commit fe3f6d0

Browse files
Heikki Krogerusenomsg
authored andcommitted
power_supply: Introduce maximum current property
USB only gives the maximum current allowed to draw. Signed-off-by: Heikki Krogerus <ext-heikki.krogerus@nokia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
1 parent 85efc8a commit fe3f6d0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

drivers/power/power_supply_sysfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ static struct device_attribute power_supply_attrs[] = {
139139
POWER_SUPPLY_ATTR(voltage_min_design),
140140
POWER_SUPPLY_ATTR(voltage_now),
141141
POWER_SUPPLY_ATTR(voltage_avg),
142+
POWER_SUPPLY_ATTR(current_max),
142143
POWER_SUPPLY_ATTR(current_now),
143144
POWER_SUPPLY_ATTR(current_avg),
144145
POWER_SUPPLY_ATTR(power_now),

include/linux/power_supply.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ enum power_supply_property {
8989
POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
9090
POWER_SUPPLY_PROP_VOLTAGE_NOW,
9191
POWER_SUPPLY_PROP_VOLTAGE_AVG,
92+
POWER_SUPPLY_PROP_CURRENT_MAX,
9293
POWER_SUPPLY_PROP_CURRENT_NOW,
9394
POWER_SUPPLY_PROP_CURRENT_AVG,
9495
POWER_SUPPLY_PROP_POWER_NOW,

0 commit comments

Comments
 (0)