summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-08-26 17:34:03 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2014-10-11 01:09:14 +0200
commit79ffbe1db4095b81783a802937c7848145962c75 (patch)
treea84535d4a178bbd2a93ff27d49a24b37cb57c349 /include
parentf112c1c557f908844ffcf2da8de867c2a8a96b9d (diff)
power: Add AMS AS3722 PMIC support
The AS3722 provides a number of DC/DC converters and LDOs as well as 8 GPIOs. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/fdtdec.h1
-rw-r--r--include/power/as3722.h27
2 files changed, 28 insertions, 0 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 99cb3538041..6b1e7e511c3 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -117,6 +117,7 @@ enum fdt_compat_id {
COMPAT_NXP_PTN3460, /* NXP PTN3460 DP/LVDS bridge */
COMPAT_SAMSUNG_EXYNOS_SYSMMU, /* Exynos sysmmu */
COMPAT_PARADE_PS8625, /* Parade PS8622 EDP->LVDS bridge */
+ COMPAT_AMS_AS3722, /* AMS AS3722 PMIC */
COMPAT_COUNT,
};
diff --git a/include/power/as3722.h b/include/power/as3722.h
new file mode 100644
index 00000000000..2c2e45a44ba
--- /dev/null
+++ b/include/power/as3722.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2014 NVIDIA Corporation
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __POWER_AS3722_H__
+#define __POWER_AS3722_H__
+
+#include <asm/types.h>
+
+#define AS3722_GPIO_OUTPUT_VDDH (1 << 0)
+#define AS3722_GPIO_INVERT (1 << 1)
+
+struct as3722;
+
+int as3722_init(struct as3722 **pmic, const void *fdt);
+int as3722_sd_enable(struct as3722 *pmic, unsigned int sd);
+int as3722_sd_set_voltage(struct as3722 *pmic, unsigned int sd, u8 value);
+int as3722_ldo_enable(struct as3722 *pmic, unsigned int ldo);
+int as3722_ldo_set_voltage(struct as3722 *pmic, unsigned int ldo, u8 value);
+int as3722_gpio_configure(struct as3722 *pmic, unsigned int gpio,
+ unsigned long flags);
+int as3722_gpio_direction_output(struct as3722 *pmic, unsigned int gpio,
+ unsigned int level);
+
+#endif /* __POWER_AS3722_H__ */