power: charge animation: fix cmd compile error

cmd depends on DM_CHARGE_DISPLAY and default y.

Change-Id: I5e685e0020c4aa1da80ffc27e5a576bc8969c3be
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
Joseph Chen 2019-04-30 10:11:31 +08:00
parent 6213b40154
commit 94cf1096ee
4 changed files with 7 additions and 4 deletions

View File

@ -1299,6 +1299,8 @@ config CMD_REGULATOR
config CMD_CHARGE_DISPLAY
bool "Enable Driver Model Charge Display command"
depends on DM_CHARGE_DISPLAY
default y
help
Support U-Boot charge display.

View File

@ -10,7 +10,7 @@
#include <power/charge_display.h>
#include <power/charge_animation.h>
static int charge_display(cmd_tbl_t *cmdtp, int flag, int argc,
static int do_charge_display(cmd_tbl_t *cmdtp, int flag, int argc,
char *const argv[])
{
int on_soc, on_voltage, screen_voltage;
@ -61,7 +61,7 @@ static int charge_display(cmd_tbl_t *cmdtp, int flag, int argc,
return 0;
}
U_BOOT_CMD(charge, 4, 0, charge_display,
U_BOOT_CMD(charge, 4, 0, do_charge_display,
"Charge display",
"-charge\n"
"-charge <power on soc> <power on voltage> <screen on voltage>"

View File

@ -9,7 +9,7 @@
#include <dm.h>
#include <power/charge_display.h>
static int charge_display_show(struct udevice *dev)
int charge_display_show(struct udevice *dev)
{
const struct dm_charge_display_ops *ops = dev_get_driver_ops(dev);

View File

@ -12,5 +12,6 @@ struct dm_charge_display_ops {
};
int charge_display(void);
int charge_display_show(struct udevice *dev);
#endif