summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-sunxi
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-04-25 14:07:37 +0200
committerHans de Goede <hdegoede@redhat.com>2015-05-04 16:51:53 +0200
commit1d624a4f08d3a478e38ceb1a048c3da4982021df (patch)
tree8efe42d4188d216469b31774a04de50659cdef66 /arch/arm/include/asm/arch-sunxi
parent12ce15538a4512834138ee4d0ded416286ec46ad (diff)
downloadu-boot-imx-1d624a4f08d3a478e38ceb1a048c3da4982021df.zip
u-boot-imx-1d624a4f08d3a478e38ceb1a048c3da4982021df.tar.gz
u-boot-imx-1d624a4f08d3a478e38ceb1a048c3da4982021df.tar.bz2
sunxi: axp: Move axp pmic register helpers to a separate file
Move the register helpers used to access the registers via p2wi resp. rsb bus on the otherwise identical axp221 and axp223 pmics to a separate file, so that they can be used by the upcoming standalone axp gpio driver too. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'arch/arm/include/asm/arch-sunxi')
-rw-r--r--arch/arm/include/asm/arch-sunxi/pmic_bus.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-sunxi/pmic_bus.h b/arch/arm/include/asm/arch-sunxi/pmic_bus.h
new file mode 100644
index 0000000..9c4372a
--- /dev/null
+++ b/arch/arm/include/asm/arch-sunxi/pmic_bus.h
@@ -0,0 +1,18 @@
+/*
+ * (C) Copyright 2015 Hans de Goede <hdegoede@redhat.com>
+ *
+ * Sunxi PMIC bus access helpers header
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _SUNXI_PMIC_BUS_H
+#define _SUNXI_PMIS_BUS_H
+
+int pmic_bus_init(void);
+int pmic_bus_read(u8 reg, u8 *data);
+int pmic_bus_write(u8 reg, u8 data);
+int pmic_bus_setbits(u8 reg, u8 bits);
+int pmic_bus_clrbits(u8 reg, u8 bits);
+
+#endif