diff mbox series

[v5,4/8] power: supply: fix wrong interpretation of register value

Message ID 20221029093000.45451-5-sravanhome@gmail.com
State New
Headers show
Series Add support for mp2733 battery charger | expand

Commit Message

Saravanan Sekar Oct. 29, 2022, 9:29 a.m. UTC
fix the switch cases to match the register value.

Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
---
 drivers/power/supply/mp2629_charger.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Andy Shevchenko Oct. 29, 2022, 10:52 p.m. UTC | #1
On Sat, Oct 29, 2022 at 11:30 AM Saravanan Sekar <sravanhome@gmail.com> wrote:
>
> fix the switch cases to match the register value.

Something is still wrong with the English grammar (i.e. capitalization
at the beginning of the sentence).
diff mbox series

Patch

diff --git a/drivers/power/supply/mp2629_charger.c b/drivers/power/supply/mp2629_charger.c
index bf9c27b463a8..46d620bd23b9 100644
--- a/drivers/power/supply/mp2629_charger.c
+++ b/drivers/power/supply/mp2629_charger.c
@@ -284,10 +284,10 @@  static int mp2629_charger_battery_get_prop(struct power_supply *psy,
 			val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
 			break;
 		case 0x01:
-		case 0x10:
+		case 0x02:
 			val->intval = POWER_SUPPLY_STATUS_CHARGING;
 			break;
-		case 0x11:
+		case 0x03:
 			val->intval = POWER_SUPPLY_STATUS_FULL;
 		}
 		break;
@@ -305,7 +305,7 @@  static int mp2629_charger_battery_get_prop(struct power_supply *psy,
 		case 0x01:
 			val->intval = POWER_SUPPLY_CHARGE_TYPE_TRICKLE;
 			break;
-		case 0x10:
+		case 0x02:
 			val->intval = POWER_SUPPLY_CHARGE_TYPE_STANDARD;
 			break;
 		default: