Commit c11f0b8f authored by Chen-Yu Tsai's avatar Chen-Yu Tsai Committed by Sebastian Reichel

power: supply: axp20x_usb_power: Fix typo in VBUS current limit macros

The VBUS current limit value macros have VBUS typed as VBUC, while
the bitmask macro is named correctly. Fix it.

Fixes: 69fb4dca ("power: Add an axp20x-usb-power driver")
Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 2e8c9d7b
......@@ -36,10 +36,10 @@
#define AXP20X_VBUS_VHOLD_MASK GENMASK(5, 3)
#define AXP20X_VBUS_VHOLD_OFFSET 3
#define AXP20X_VBUS_CLIMIT_MASK 3
#define AXP20X_VBUC_CLIMIT_900mA 0
#define AXP20X_VBUC_CLIMIT_500mA 1
#define AXP20X_VBUC_CLIMIT_100mA 2
#define AXP20X_VBUC_CLIMIT_NONE 3
#define AXP20X_VBUS_CLIMIT_900mA 0
#define AXP20X_VBUS_CLIMIT_500mA 1
#define AXP20X_VBUS_CLIMIT_100mA 2
#define AXP20X_VBUS_CLIMIT_NONE 3
#define AXP20X_ADC_EN1_VBUS_CURR BIT(2)
#define AXP20X_ADC_EN1_VBUS_VOLT BIT(3)
......@@ -107,19 +107,19 @@ static int axp20x_usb_power_get_property(struct power_supply *psy,
return ret;
switch (v & AXP20X_VBUS_CLIMIT_MASK) {
case AXP20X_VBUC_CLIMIT_100mA:
case AXP20X_VBUS_CLIMIT_100mA:
if (power->axp20x_id == AXP221_ID)
val->intval = -1; /* No 100mA limit */
else
val->intval = 100000;
break;
case AXP20X_VBUC_CLIMIT_500mA:
case AXP20X_VBUS_CLIMIT_500mA:
val->intval = 500000;
break;
case AXP20X_VBUC_CLIMIT_900mA:
case AXP20X_VBUS_CLIMIT_900mA:
val->intval = 900000;
break;
case AXP20X_VBUC_CLIMIT_NONE:
case AXP20X_VBUS_CLIMIT_NONE:
val->intval = -1;
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment