sunxi: power: axp818: Add support for switch SW

The AXP818 has a switchable output, SW. This is commonly used for
controlling power to the LCD backlight.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
diff --git a/include/axp818.h b/include/axp818.h
index 5630eed..f7f343a 100644
--- a/include/axp818.h
+++ b/include/axp818.h
@@ -24,6 +24,7 @@
 #define AXP818_OUTPUT_CTRL2_DLDO2_EN	(1 << 4)
 #define AXP818_OUTPUT_CTRL2_DLDO3_EN	(1 << 5)
 #define AXP818_OUTPUT_CTRL2_DLDO4_EN	(1 << 6)
+#define AXP818_OUTPUT_CTRL2_SW_EN	(1 << 7)
 #define AXP818_OUTPUT_CTRL3	0x13
 #define AXP818_OUTPUT_CTRL3_FLDO1_EN	(1 << 2)
 #define AXP818_OUTPUT_CTRL3_FLDO2_EN	(1 << 3)
diff --git a/include/axp_pmic.h b/include/axp_pmic.h
index b203cc8..2ed5196 100644
--- a/include/axp_pmic.h
+++ b/include/axp_pmic.h
@@ -32,6 +32,7 @@
 int axp_set_dldo(int dldo_num, unsigned int mvolt);
 int axp_set_eldo(int eldo_num, unsigned int mvolt);
 int axp_set_fldo(int fldo_num, unsigned int mvolt);
+int axp_set_sw(bool on);
 int axp_init(void);
 int axp_get_sid(unsigned int *sid);