aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/stw481x.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-15 19:37:40 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-15 19:37:40 -0500
commitdb0b2d01163cc3050eb52a979541e0d16553be48 (patch)
tree2a4370fc568e444c98913100b2a520035cc99930 /include/linux/mfd/stw481x.h
parent16cd9d1c0f149ee0c8073de037e7c57886234aa0 (diff)
parent90b128ed1557c2f523995a379a53e5105891ecf8 (diff)
Merge tag 'mfd-3.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next
Pull MFD updates from Samuel Ortiz: "For the 3.13 merge window we have a couple of new drivers for the AMS AS3722 PMIC and for STMicroelectronics STw481x PMIC. Although this is a smaller update than usual, we also have: - Device tree support for the max77693 driver - linux/of.h inclusion for all DT compatible MFD drivers, to avoid build breakage in the future - Support for Intel Wildcat Point-LP PCH through the lpc_ich driver - A small arizona update for new wm5110 DSP registers and a few fixes - A small palmas update as well, including an of_device table addition and a few minor fixes - Two small mfd-core changes, one including a memory leak fix for when mfd_add_device() fails - Our usual round of minor cleanups and janitorial fixes" * tag 'mfd-3.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next: (63 commits) Documentation: mfd: Update s2mps11.txt mfd: pm8921: Potential NULL dereference in pm8921_remove() mfd: Fix memory leak in mfd_add_devices() mfd: Stop setting refcounting pointers in original mfd_cell arrays mfd: wm5110: Enable micd clamp functionality mfd: lpc_ich: Add Device IDs for Intel Wildcat Point-LP PCH mfd: max77693: Fix up bug of wrong interrupt number mfd: as3722: Don't export the regmap config mfd: twl6040: Remove obsolete cleanup for i2c clientdata mfd: tps65910: Remove warning during dt node parsing mfd: lpc_sch: Ignore resource conflicts when adding mfd cells mfd: ti_am335x_tscadc: Avoid possible deadlock of reg_lock mfd: syscon: Return -ENOSYS if CONFIG_MFD_SYSCON is not enabled mfd: Add support for ams AS3722 PMIC mfd: max77693: Include linux/of.h header mfd: tc3589x: Detect the precise version mfd: omap-usb: prepare/unprepare clock while enable/disable mfd: max77686: Include linux/of.h header mfd: max8907: Include linux/of.h header mfd: max8997: Include linux/of.h header ...
Diffstat (limited to 'include/linux/mfd/stw481x.h')
-rw-r--r--include/linux/mfd/stw481x.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/include/linux/mfd/stw481x.h b/include/linux/mfd/stw481x.h
new file mode 100644
index 000000000000..eda121556e5d
--- /dev/null
+++ b/include/linux/mfd/stw481x.h
@@ -0,0 +1,56 @@
1/*
2 * Copyright (C) 2011 ST-Ericsson SA
3 * Written on behalf of Linaro for ST-Ericsson
4 *
5 * Author: Linus Walleij <linus.walleij@linaro.org>
6 *
7 * License terms: GNU General Public License (GPL) version 2
8 */
9#ifndef MFD_STW481X_H
10#define MFD_STW481X_H
11
12#include <linux/i2c.h>
13#include <linux/regulator/machine.h>
14#include <linux/regmap.h>
15#include <linux/bitops.h>
16
17/* These registers are accessed from more than one driver */
18#define STW_CONF1 0x11U
19#define STW_CONF1_PDN_VMMC 0x01U
20#define STW_CONF1_VMMC_MASK 0x0eU
21#define STW_CONF1_VMMC_1_8V 0x02U
22#define STW_CONF1_VMMC_2_85V 0x04U
23#define STW_CONF1_VMMC_3V 0x06U
24#define STW_CONF1_VMMC_1_85V 0x08U
25#define STW_CONF1_VMMC_2_6V 0x0aU
26#define STW_CONF1_VMMC_2_7V 0x0cU
27#define STW_CONF1_VMMC_3_3V 0x0eU
28#define STW_CONF1_MMC_LS_STATUS 0x10U
29#define STW_PCTL_REG_LO 0x1eU
30#define STW_PCTL_REG_HI 0x1fU
31#define STW_CONF1_V_MONITORING 0x20U
32#define STW_CONF1_IT_WARN 0x40U
33#define STW_CONF1_PDN_VAUX 0x80U
34#define STW_CONF2 0x20U
35#define STW_CONF2_MASK_TWARN 0x01U
36#define STW_CONF2_VMMC_EXT 0x02U
37#define STW_CONF2_MASK_IT_WAKE_UP 0x04U
38#define STW_CONF2_GPO1 0x08U
39#define STW_CONF2_GPO2 0x10U
40#define STW_VCORE_SLEEP 0x21U
41
42/**
43 * struct stw481x - state holder for the Stw481x drivers
44 * @mutex: mutex to serialize I2C accesses
45 * @i2c_client: corresponding I2C client
46 * @regulator: regulator device for regulator children
47 * @map: regmap handle to access device registers
48 */
49struct stw481x {
50 struct mutex lock;
51 struct i2c_client *client;
52 struct regulator_dev *vmmc_regulator;
53 struct regmap *map;
54};
55
56#endif