aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/max8997.h
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2011-03-04 15:50:26 +0900
committerSamuel Ortiz <sameo@linux.intel.com>2011-03-23 10:42:03 +0100
commit527e7e9a82ec95cdb8f694855004b3d262efd09f (patch)
tree5c58fb64d9efcf37c712b55c6ce993567483e2e3 /include/linux/mfd/max8997.h
parentmfd: Rename mfd_shared_cell_{en,dis}able to drop the "shared" part (diff)
downloadlinux-dev-527e7e9a82ec95cdb8f694855004b3d262efd09f.tar.xz
linux-dev-527e7e9a82ec95cdb8f694855004b3d262efd09f.zip
mfd: MAX8997/8966 support
MAX8997/MAX8966 chip is a multi-function device with I2C bussses. The chip includes PMIC, RTC, Fuel Gauge, MUIC, Haptic, Flash control, and Battery (charging) control. This patch is an initial release of a MAX8997/8966 driver that supports to enable the chip with its primary I2C bus that connects every device mentioned above except for Fuel Gauge, which uses another I2C bus. The fuel gauge is not supported by this mfd driver and is supported by a seperated driver of MAX17042 Fuel Gauge (yes, the fuel gauge part is compatible with MAX17042). Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd/max8997.h')
-rw-r--r--include/linux/mfd/max8997.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/include/linux/mfd/max8997.h b/include/linux/mfd/max8997.h
new file mode 100644
index 000000000000..d0d9136c104b
--- /dev/null
+++ b/include/linux/mfd/max8997.h
@@ -0,0 +1,88 @@
+/*
+ * max8997.h - Driver for the Maxim 8997/8966
+ *
+ * Copyright (C) 2009-2010 Samsung Electrnoics
+ * MyungJoo Ham <myungjoo.ham@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * This driver is based on max8998.h
+ *
+ * MAX8997 has PMIC, MUIC, HAPTIC, RTC, FLASH, and Fuel Gauge devices.
+ * Except Fuel Gauge, every device shares the same I2C bus and included in
+ * this mfd driver. Although the fuel gauge is included in the chip, it is
+ * excluded from the driver because a) it has a different I2C bus from
+ * others and b) it can be enabled simply by using MAX17042 driver.
+ */
+
+#ifndef __LINUX_MFD_MAX8998_H
+#define __LINUX_MFD_MAX8998_H
+
+#include <linux/regulator/consumer.h>
+
+/* MAX8997/8966 regulator IDs */
+enum max8998_regulators {
+ MAX8997_LDO1 = 0,
+ MAX8997_LDO2,
+ MAX8997_LDO3,
+ MAX8997_LDO4,
+ MAX8997_LDO5,
+ MAX8997_LDO6,
+ MAX8997_LDO7,
+ MAX8997_LDO8,
+ MAX8997_LDO9,
+ MAX8997_LDO10,
+ MAX8997_LDO11,
+ MAX8997_LDO12,
+ MAX8997_LDO13,
+ MAX8997_LDO14,
+ MAX8997_LDO15,
+ MAX8997_LDO16,
+ MAX8997_LDO17,
+ MAX8997_LDO18,
+ MAX8997_LDO21,
+ MAX8997_BUCK1,
+ MAX8997_BUCK2,
+ MAX8997_BUCK3,
+ MAX8997_BUCK4,
+ MAX8997_BUCK5,
+ MAX8997_BUCK6,
+ MAX8997_BUCK7,
+ MAX8997_EN32KHZ_AP,
+ MAX8997_EN32KHZ_CP,
+ MAX8997_ENVICHG,
+ MAX8997_ESAFEOUT1,
+ MAX8997_ESAFEOUT2,
+ MAX8997_CHARGER_CV, /* control MBCCV of MBCCTRL3 */
+ MAX8997_CHARGER, /* charger current, MBCCTRL4 */
+ MAX8997_CHARGER_TOPOFF, /* MBCCTRL5 */
+};
+
+struct max8997_regulator_data {
+ int id;
+ struct regulator_init_data *initdata;
+};
+
+struct max8997_platform_data {
+ bool wakeup;
+ /* PMIC: Not implemented */
+ /* MUIC: Not implemented */
+ /* HAPTIC: Not implemented */
+ /* RTC: Not implemented */
+ /* Flash: Not implemented */
+ /* Charger control: Not implemented */
+};
+
+#endif /* __LINUX_MFD_MAX8998_H */