2 * Copyright (C) 2010 Texas Instruments
4 * SPDX-License-Identifier: GPL-2.0+
13 int do_vbat(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
16 if (strncmp(argv[1], "startcharge", 12) == 0)
17 twl6030_start_usb_charging();
18 else if (strncmp(argv[1], "stopcharge", 11) == 0)
19 twl6030_stop_usb_charging();
20 else if (strncmp(argv[1], "status", 7) == 0) {
21 twl6030_get_battery_voltage();
22 twl6030_get_battery_current();
32 return cmd_usage(cmdtp);
37 "battery charging, voltage/current measurements",
38 "status - display battery voltage and current\n"
39 "bat startcharge - start charging via USB\n"
40 "bat stopcharge - stop charging\n"
42 #endif /* CONFIG_BAT_CMD */