command: Remove the cmd_tbl_t typedef
[oweals/u-boot.git] / drivers / power / axp818.c
index af4d7a69032ad3aa8027b138a85970d82c30d185..0531707c8aa710f61d93a562c801b35d317d4ce5 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * AXP818 driver based on AXP221 driver
  *
@@ -7,11 +8,10 @@
  * Based on axp221.c
  * (C) Copyright 2014 Hans de Goede <hdegoede@redhat.com>
  * (C) Copyright 2013 Oliver Schinagl <oliver@schinagl.nl>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <command.h>
 #include <errno.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/pmic_bus.h>
@@ -162,7 +162,7 @@ int axp_set_dldo(int dldo_num, unsigned int mvolt)
        cfg = axp818_mvolt_to_cfg(mvolt, 700, 3300, 100);
        if (dldo_num == 2 && mvolt > 3300)
                cfg += 1 + axp818_mvolt_to_cfg(mvolt, 3400, 4200, 200);
-       ret = pmic_bus_write(AXP818_ELDO1_CTRL + (dldo_num - 1), cfg);
+       ret = pmic_bus_write(AXP818_DLDO1_CTRL + (dldo_num - 1), cfg);
        if (ret)
                return ret;
 
@@ -256,7 +256,7 @@ int axp_init(void)
        return 0;
 }
 
-int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_poweroff(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
        pmic_bus_write(AXP818_SHUTDOWN, AXP818_SHUTDOWN_POWEROFF);