]> git.sur5r.net Git - u-boot/blobdiff - drivers/power/axp818.c
spi: xilinx_spi: Modify transfer logic xilinx_spi_xfer() function
[u-boot] / drivers / power / axp818.c
index bf6ecd6be59701cd994d4dd1bec66eaabca3d52c..c737da1180fb53c0348a101114a26ffbb9dd9836 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * AXP818 driver based on AXP221 driver
  *
@@ -7,8 +8,6 @@
  * 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>
@@ -255,3 +254,14 @@ int axp_init(void)
 
        return 0;
 }
+
+int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+       pmic_bus_write(AXP818_SHUTDOWN, AXP818_SHUTDOWN_POWEROFF);
+
+       /* infinite loop during shutdown */
+       while (1) {}
+
+       /* not reached */
+       return 0;
+}