aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-07 11:35:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-07 11:35:35 -0400
commitd042380886fb2fc6c4b0fcfe1214ba473769a8e9 (patch)
tree61e29ff167e0f83f67930ee9911062415030e1ef /include/linux/mfd
parent3477d168ba61c5b0ca42d3d4642f3463609a5417 (diff)
parentb8d336ed90f541097a2ce583be430bb3e895dfbd (diff)
Merge tag 'mfd-for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Pull MFD updates from Lee Jones: "Core framework: - Add the MFD bindings doc to MAINTAINERS New drivers: - X-Powers AC100 Audio CODEC and RTC - TI LP873x PMIC - Rockchip RK808 PMIC - Samsung Exynos Low Power Audio New device support: - Add support for STMPE1600 variant to stmpe - Add support for PM8018 PMIC to pm8921-core - Add support for AXP806 PMIC in axp20x - Add support for AXP209 GPIO in axp20x New functionality: - Add support for Reset to all STMPE variants - Add support for MKBP event support to cros_ec - Add support for USB to intel_soc_pmic_bxtwc - Add support for IRQs and Power Button to tps65217 Fix-ups: - Clean-up defunct author emails (da9063, max14577) - Kconfig fixups (wm8350-i2c, as37220 - Constify (altera-a10sr, sm501) - Supply PCI IDs (intel-lpss-pci) - Improve clocking (qcom_rpm) - Fix IRQ probing (ucb1x00-core) - Ensure fault log is cleared (da9052) - Remove NO_IRQ check (ucb1x00-core) - Supply I2C properties (intel-lpss-acpi, intel-lpss-pci) - Non standard declaration (tps65217, max8997-irq) - Remove unused code (lp873x, db8500-prcmu, ab8500-debugfs, cros_ec_spi) - Make non-modular (altera-a10sr, intel_msic, smsc-ece1099, sun6i-prcm, twl-core) - OF bindings (ac100, stmpe, qcom-pm8xxx, qcom-rpm, rk808, axp20x, lp873x, exynos5433-lpass, act8945a, aspeed-scu, twl6040, arizona) Bugfixes: - Release OF pointer (qcom_rpm) - Avoid double shifting in suspend/resume (88pm80x) - Fix 'defined but not used' error (exynos-lpass) - Fix 'sleeping whilst attomic' (atmel-hlcdc)" * tag 'mfd-for-linus-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (69 commits) mfd: arizona: Handle probe deferral for reset GPIO mfd: arizona: Remove arizona_of_get_named_gpio helper function mfd: arizona: Add DT options for max_channels_clocked and PDM speaker config mfd: twl6040: Register child device for twl6040-pdmclk mfd: cros_ec_spi: Remove unused variable 'request' mfd: omap-usb-host: Return value is not 'const int' mfd: ab8500-debugfs: Remove 'weak' function suspend_test_wake_cause_interrupt_is_mine() mfd: ab8500-debugfs: Remove ab8500_dump_all_banks_to_mem() mfd: db8500-prcmu: Remove unused *prcmu_set_ddr_opp() calls mfd: ab8500-debugfs: Prevent initialised field from being over-written mfd: max8997-irq: 'inline' should be at the beginning of the declaration mfd: rk808: Fix RK818_IRQ_DISCHG_ILIM initializer mfd: tps65217: Fix nonstandard declaration mfd: lp873x: Remove unused mutex lock from struct lp873x mfd: atmel-hlcdc: Do not sleep in atomic context mfd: exynos-lpass: Mark PM functions as __maybe_unused mfd: intel-lpss: Add default I2C device properties for Apollo Lake mfd: twl-core: Make it explicitly non-modular mfd: sun6i-prcm: Make it explicitly non-modular mfd: smsc-ece1099: Make it explicitly non-modular ...
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/88pm80x.h4
-rw-r--r--include/linux/mfd/abx500/ab8500.h2
-rw-r--r--include/linux/mfd/ac100.h178
-rw-r--r--include/linux/mfd/arizona/core.h12
-rw-r--r--include/linux/mfd/axp20x.h60
-rw-r--r--include/linux/mfd/cros_ec.h18
-rw-r--r--include/linux/mfd/cros_ec_commands.h34
-rw-r--r--include/linux/mfd/da9063/core.h4
-rw-r--r--include/linux/mfd/da9063/pdata.h4
-rw-r--r--include/linux/mfd/da9063/registers.h4
-rw-r--r--include/linux/mfd/db8500-prcmu.h6
-rw-r--r--include/linux/mfd/dbx500-prcmu.h9
-rw-r--r--include/linux/mfd/lp873x.h1
-rw-r--r--include/linux/mfd/max14577-private.h2
-rw-r--r--include/linux/mfd/max14577.h2
-rw-r--r--include/linux/mfd/rk808.h154
-rw-r--r--include/linux/mfd/syscon/exynos5-pmu.h4
-rw-r--r--include/linux/mfd/tps65217.h12
-rw-r--r--include/linux/mfd/twl6040.h2
19 files changed, 472 insertions, 40 deletions
diff --git a/include/linux/mfd/88pm80x.h b/include/linux/mfd/88pm80x.h
index d409ceb2231e..c118a7ec94d6 100644
--- a/include/linux/mfd/88pm80x.h
+++ b/include/linux/mfd/88pm80x.h
@@ -350,7 +350,7 @@ static inline int pm80x_dev_suspend(struct device *dev)
350 int irq = platform_get_irq(pdev, 0); 350 int irq = platform_get_irq(pdev, 0);
351 351
352 if (device_may_wakeup(dev)) 352 if (device_may_wakeup(dev))
353 set_bit((1 << irq), &chip->wu_flag); 353 set_bit(irq, &chip->wu_flag);
354 354
355 return 0; 355 return 0;
356} 356}
@@ -362,7 +362,7 @@ static inline int pm80x_dev_resume(struct device *dev)
362 int irq = platform_get_irq(pdev, 0); 362 int irq = platform_get_irq(pdev, 0);
363 363
364 if (device_may_wakeup(dev)) 364 if (device_may_wakeup(dev))
365 clear_bit((1 << irq), &chip->wu_flag); 365 clear_bit(irq, &chip->wu_flag);
366 366
367 return 0; 367 return 0;
368} 368}
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h
index 9475fee2bfc5..d33c245e75ca 100644
--- a/include/linux/mfd/abx500/ab8500.h
+++ b/include/linux/mfd/abx500/ab8500.h
@@ -63,6 +63,8 @@ enum ab8500_version {
63#define AB8500_STE_TEST 0x14 63#define AB8500_STE_TEST 0x14
64#define AB8500_OTP_EMUL 0x15 64#define AB8500_OTP_EMUL 0x15
65 65
66#define AB8500_DEBUG_FIELD_LAST 0x16
67
66/* 68/*
67 * Interrupts 69 * Interrupts
68 * Values used to index into array ab8500_irq_regoffset[] defined in 70 * Values used to index into array ab8500_irq_regoffset[] defined in
diff --git a/include/linux/mfd/ac100.h b/include/linux/mfd/ac100.h
new file mode 100644
index 000000000000..3c148f196b9f
--- /dev/null
+++ b/include/linux/mfd/ac100.h
@@ -0,0 +1,178 @@
1/*
2 * Functions and registers to access AC100 codec / RTC combo IC.
3 *
4 * Copyright (C) 2016 Chen-Yu Tsai
5 *
6 * Chen-Yu Tsai <wens@csie.org>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __LINUX_MFD_AC100_H
14#define __LINUX_MFD_AC100_H
15
16#include <linux/regmap.h>
17
18struct ac100_dev {
19 struct device *dev;
20 struct regmap *regmap;
21};
22
23/* Audio codec related registers */
24#define AC100_CHIP_AUDIO_RST 0x00
25#define AC100_PLL_CTRL1 0x01
26#define AC100_PLL_CTRL2 0x02
27#define AC100_SYSCLK_CTRL 0x03
28#define AC100_MOD_CLK_ENA 0x04
29#define AC100_MOD_RST_CTRL 0x05
30#define AC100_I2S_SR_CTRL 0x06
31
32/* I2S1 interface */
33#define AC100_I2S1_CLK_CTRL 0x10
34#define AC100_I2S1_SND_OUT_CTRL 0x11
35#define AC100_I2S1_SND_IN_CTRL 0x12
36#define AC100_I2S1_MXR_SRC 0x13
37#define AC100_I2S1_VOL_CTRL1 0x14
38#define AC100_I2S1_VOL_CTRL2 0x15
39#define AC100_I2S1_VOL_CTRL3 0x16
40#define AC100_I2S1_VOL_CTRL4 0x17
41#define AC100_I2S1_MXR_GAIN 0x18
42
43/* I2S2 interface */
44#define AC100_I2S2_CLK_CTRL 0x20
45#define AC100_I2S2_SND_OUT_CTRL 0x21
46#define AC100_I2S2_SND_IN_CTRL 0x22
47#define AC100_I2S2_MXR_SRC 0x23
48#define AC100_I2S2_VOL_CTRL1 0x24
49#define AC100_I2S2_VOL_CTRL2 0x25
50#define AC100_I2S2_VOL_CTRL3 0x26
51#define AC100_I2S2_VOL_CTRL4 0x27
52#define AC100_I2S2_MXR_GAIN 0x28
53
54/* I2S3 interface */
55#define AC100_I2S3_CLK_CTRL 0x30
56#define AC100_I2S3_SND_OUT_CTRL 0x31
57#define AC100_I2S3_SND_IN_CTRL 0x32
58#define AC100_I2S3_SIG_PATH_CTRL 0x33
59
60/* ADC digital controls */
61#define AC100_ADC_DIG_CTRL 0x40
62#define AC100_ADC_VOL_CTRL 0x41
63
64/* HMIC plug sensing / key detection */
65#define AC100_HMIC_CTRL1 0x44
66#define AC100_HMIC_CTRL2 0x45
67#define AC100_HMIC_STATUS 0x46
68
69/* DAC digital controls */
70#define AC100_DAC_DIG_CTRL 0x48
71#define AC100_DAC_VOL_CTRL 0x49
72#define AC100_DAC_MXR_SRC 0x4c
73#define AC100_DAC_MXR_GAIN 0x4d
74
75/* Analog controls */
76#define AC100_ADC_APC_CTRL 0x50
77#define AC100_ADC_SRC 0x51
78#define AC100_ADC_SRC_BST_CTRL 0x52
79#define AC100_OUT_MXR_DAC_A_CTRL 0x53
80#define AC100_OUT_MXR_SRC 0x54
81#define AC100_OUT_MXR_SRC_BST 0x55
82#define AC100_HPOUT_CTRL 0x56
83#define AC100_ERPOUT_CTRL 0x57
84#define AC100_SPKOUT_CTRL 0x58
85#define AC100_LINEOUT_CTRL 0x59
86
87/* ADC digital audio processing (high pass filter & auto gain control */
88#define AC100_ADC_DAP_L_STA 0x80
89#define AC100_ADC_DAP_R_STA 0x81
90#define AC100_ADC_DAP_L_CTRL 0x82
91#define AC100_ADC_DAP_R_CTRL 0x83
92#define AC100_ADC_DAP_L_T_L 0x84 /* Left Target Level */
93#define AC100_ADC_DAP_R_T_L 0x85 /* Right Target Level */
94#define AC100_ADC_DAP_L_H_A_C 0x86 /* Left High Avg. Coef */
95#define AC100_ADC_DAP_L_L_A_C 0x87 /* Left Low Avg. Coef */
96#define AC100_ADC_DAP_R_H_A_C 0x88 /* Right High Avg. Coef */
97#define AC100_ADC_DAP_R_L_A_C 0x89 /* Right Low Avg. Coef */
98#define AC100_ADC_DAP_L_D_T 0x8a /* Left Decay Time */
99#define AC100_ADC_DAP_L_A_T 0x8b /* Left Attack Time */
100#define AC100_ADC_DAP_R_D_T 0x8c /* Right Decay Time */
101#define AC100_ADC_DAP_R_A_T 0x8d /* Right Attack Time */
102#define AC100_ADC_DAP_N_TH 0x8e /* Noise Threshold */
103#define AC100_ADC_DAP_L_H_N_A_C 0x8f /* Left High Noise Avg. Coef */
104#define AC100_ADC_DAP_L_L_N_A_C 0x90 /* Left Low Noise Avg. Coef */
105#define AC100_ADC_DAP_R_H_N_A_C 0x91 /* Right High Noise Avg. Coef */
106#define AC100_ADC_DAP_R_L_N_A_C 0x92 /* Right Low Noise Avg. Coef */
107#define AC100_ADC_DAP_H_HPF_C 0x93 /* High High-Pass-Filter Coef */
108#define AC100_ADC_DAP_L_HPF_C 0x94 /* Low High-Pass-Filter Coef */
109#define AC100_ADC_DAP_OPT 0x95 /* AGC Optimum */
110
111/* DAC digital audio processing (high pass filter & dynamic range control) */
112#define AC100_DAC_DAP_CTRL 0xa0
113#define AC100_DAC_DAP_H_HPF_C 0xa1 /* High High-Pass-Filter Coef */
114#define AC100_DAC_DAP_L_HPF_C 0xa2 /* Low High-Pass-Filter Coef */
115#define AC100_DAC_DAP_L_H_E_A_C 0xa3 /* Left High Energy Avg Coef */
116#define AC100_DAC_DAP_L_L_E_A_C 0xa4 /* Left Low Energy Avg Coef */
117#define AC100_DAC_DAP_R_H_E_A_C 0xa5 /* Right High Energy Avg Coef */
118#define AC100_DAC_DAP_R_L_E_A_C 0xa6 /* Right Low Energy Avg Coef */
119#define AC100_DAC_DAP_H_G_D_T_C 0xa7 /* High Gain Delay Time Coef */
120#define AC100_DAC_DAP_L_G_D_T_C 0xa8 /* Low Gain Delay Time Coef */
121#define AC100_DAC_DAP_H_G_A_T_C 0xa9 /* High Gain Attack Time Coef */
122#define AC100_DAC_DAP_L_G_A_T_C 0xaa /* Low Gain Attack Time Coef */
123#define AC100_DAC_DAP_H_E_TH 0xab /* High Energy Threshold */
124#define AC100_DAC_DAP_L_E_TH 0xac /* Low Energy Threshold */
125#define AC100_DAC_DAP_H_G_K 0xad /* High Gain K parameter */
126#define AC100_DAC_DAP_L_G_K 0xae /* Low Gain K parameter */
127#define AC100_DAC_DAP_H_G_OFF 0xaf /* High Gain offset */
128#define AC100_DAC_DAP_L_G_OFF 0xb0 /* Low Gain offset */
129#define AC100_DAC_DAP_OPT 0xb1 /* DRC optimum */
130
131/* Digital audio processing enable */
132#define AC100_ADC_DAP_ENA 0xb4
133#define AC100_DAC_DAP_ENA 0xb5
134
135/* SRC control */
136#define AC100_SRC1_CTRL1 0xb8
137#define AC100_SRC1_CTRL2 0xb9
138#define AC100_SRC1_CTRL3 0xba
139#define AC100_SRC1_CTRL4 0xbb
140#define AC100_SRC2_CTRL1 0xbc
141#define AC100_SRC2_CTRL2 0xbd
142#define AC100_SRC2_CTRL3 0xbe
143#define AC100_SRC2_CTRL4 0xbf
144
145/* RTC clk control */
146#define AC100_CLK32K_ANALOG_CTRL 0xc0
147#define AC100_CLKOUT_CTRL1 0xc1
148#define AC100_CLKOUT_CTRL2 0xc2
149#define AC100_CLKOUT_CTRL3 0xc3
150
151/* RTC module */
152#define AC100_RTC_RST 0xc6
153#define AC100_RTC_CTRL 0xc7
154#define AC100_RTC_SEC 0xc8 /* second */
155#define AC100_RTC_MIN 0xc9 /* minute */
156#define AC100_RTC_HOU 0xca /* hour */
157#define AC100_RTC_WEE 0xcb /* weekday */
158#define AC100_RTC_DAY 0xcc /* day */
159#define AC100_RTC_MON 0xcd /* month */
160#define AC100_RTC_YEA 0xce /* year */
161#define AC100_RTC_UPD 0xcf /* update trigger */
162
163/* RTC alarm */
164#define AC100_ALM_INT_ENA 0xd0
165#define AC100_ALM_INT_STA 0xd1
166#define AC100_ALM_SEC 0xd8
167#define AC100_ALM_MIN 0xd9
168#define AC100_ALM_HOU 0xda
169#define AC100_ALM_WEE 0xdb
170#define AC100_ALM_DAY 0xdc
171#define AC100_ALM_MON 0xdd
172#define AC100_ALM_YEA 0xde
173#define AC100_ALM_UPD 0xdf
174
175/* RTC general purpose register 0 ~ 15 */
176#define AC100_RTC_GP(x) (0xe0 + (x))
177
178#endif /* __LINUX_MFD_AC100_H */
diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h
index 58ab4c0fe761..b31b3be7f8c9 100644
--- a/include/linux/mfd/arizona/core.h
+++ b/include/linux/mfd/arizona/core.h
@@ -13,6 +13,7 @@
13#ifndef _WM_ARIZONA_CORE_H 13#ifndef _WM_ARIZONA_CORE_H
14#define _WM_ARIZONA_CORE_H 14#define _WM_ARIZONA_CORE_H
15 15
16#include <linux/clk.h>
16#include <linux/interrupt.h> 17#include <linux/interrupt.h>
17#include <linux/notifier.h> 18#include <linux/notifier.h>
18#include <linux/regmap.h> 19#include <linux/regmap.h>
@@ -21,6 +22,12 @@
21 22
22#define ARIZONA_MAX_CORE_SUPPLIES 2 23#define ARIZONA_MAX_CORE_SUPPLIES 2
23 24
25enum {
26 ARIZONA_MCLK1,
27 ARIZONA_MCLK2,
28 ARIZONA_NUM_MCLK
29};
30
24enum arizona_type { 31enum arizona_type {
25 WM5102 = 1, 32 WM5102 = 1,
26 WM5110 = 2, 33 WM5110 = 2,
@@ -139,6 +146,8 @@ struct arizona {
139 struct mutex clk_lock; 146 struct mutex clk_lock;
140 int clk32k_ref; 147 int clk32k_ref;
141 148
149 struct clk *mclk[ARIZONA_NUM_MCLK];
150
142 bool ctrlif_error; 151 bool ctrlif_error;
143 152
144 struct snd_soc_dapm_context *dapm; 153 struct snd_soc_dapm_context *dapm;
@@ -182,7 +191,4 @@ int cs47l24_patch(struct arizona *arizona);
182int wm8997_patch(struct arizona *arizona); 191int wm8997_patch(struct arizona *arizona);
183int wm8998_patch(struct arizona *arizona); 192int wm8998_patch(struct arizona *arizona);
184 193
185extern int arizona_of_get_named_gpio(struct arizona *arizona, const char *prop,
186 bool mandatory);
187
188#endif 194#endif
diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h
index 0be4982f08fe..fec597fb34cb 100644
--- a/include/linux/mfd/axp20x.h
+++ b/include/linux/mfd/axp20x.h
@@ -20,6 +20,7 @@ enum {
20 AXP221_ID, 20 AXP221_ID,
21 AXP223_ID, 21 AXP223_ID,
22 AXP288_ID, 22 AXP288_ID,
23 AXP806_ID,
23 AXP809_ID, 24 AXP809_ID,
24 NR_AXP20X_VARIANTS, 25 NR_AXP20X_VARIANTS,
25}; 26};
@@ -91,6 +92,30 @@ enum {
91#define AXP22X_ALDO3_V_OUT 0x2a 92#define AXP22X_ALDO3_V_OUT 0x2a
92#define AXP22X_CHRG_CTRL3 0x35 93#define AXP22X_CHRG_CTRL3 0x35
93 94
95#define AXP806_STARTUP_SRC 0x00
96#define AXP806_CHIP_ID 0x03
97#define AXP806_PWR_OUT_CTRL1 0x10
98#define AXP806_PWR_OUT_CTRL2 0x11
99#define AXP806_DCDCA_V_CTRL 0x12
100#define AXP806_DCDCB_V_CTRL 0x13
101#define AXP806_DCDCC_V_CTRL 0x14
102#define AXP806_DCDCD_V_CTRL 0x15
103#define AXP806_DCDCE_V_CTRL 0x16
104#define AXP806_ALDO1_V_CTRL 0x17
105#define AXP806_ALDO2_V_CTRL 0x18
106#define AXP806_ALDO3_V_CTRL 0x19
107#define AXP806_DCDC_MODE_CTRL1 0x1a
108#define AXP806_DCDC_MODE_CTRL2 0x1b
109#define AXP806_DCDC_FREQ_CTRL 0x1c
110#define AXP806_BLDO1_V_CTRL 0x20
111#define AXP806_BLDO2_V_CTRL 0x21
112#define AXP806_BLDO3_V_CTRL 0x22
113#define AXP806_BLDO4_V_CTRL 0x23
114#define AXP806_CLDO1_V_CTRL 0x24
115#define AXP806_CLDO2_V_CTRL 0x25
116#define AXP806_CLDO3_V_CTRL 0x26
117#define AXP806_VREF_TEMP_WARN_L 0xf3
118
94/* Interrupt */ 119/* Interrupt */
95#define AXP152_IRQ1_EN 0x40 120#define AXP152_IRQ1_EN 0x40
96#define AXP152_IRQ2_EN 0x41 121#define AXP152_IRQ2_EN 0x41
@@ -266,6 +291,26 @@ enum {
266}; 291};
267 292
268enum { 293enum {
294 AXP806_DCDCA = 0,
295 AXP806_DCDCB,
296 AXP806_DCDCC,
297 AXP806_DCDCD,
298 AXP806_DCDCE,
299 AXP806_ALDO1,
300 AXP806_ALDO2,
301 AXP806_ALDO3,
302 AXP806_BLDO1,
303 AXP806_BLDO2,
304 AXP806_BLDO3,
305 AXP806_BLDO4,
306 AXP806_CLDO1,
307 AXP806_CLDO2,
308 AXP806_CLDO3,
309 AXP806_SW,
310 AXP806_REG_ID_MAX,
311};
312
313enum {
269 AXP809_DCDC1 = 0, 314 AXP809_DCDC1 = 0,
270 AXP809_DCDC2, 315 AXP809_DCDC2,
271 AXP809_DCDC3, 316 AXP809_DCDC3,
@@ -414,6 +459,21 @@ enum axp288_irqs {
414 AXP288_IRQ_BC_USB_CHNG, 459 AXP288_IRQ_BC_USB_CHNG,
415}; 460};
416 461
462enum axp806_irqs {
463 AXP806_IRQ_DIE_TEMP_HIGH_LV1,
464 AXP806_IRQ_DIE_TEMP_HIGH_LV2,
465 AXP806_IRQ_DCDCA_V_LOW,
466 AXP806_IRQ_DCDCB_V_LOW,
467 AXP806_IRQ_DCDCC_V_LOW,
468 AXP806_IRQ_DCDCD_V_LOW,
469 AXP806_IRQ_DCDCE_V_LOW,
470 AXP806_IRQ_PWROK_LONG,
471 AXP806_IRQ_PWROK_SHORT,
472 AXP806_IRQ_WAKEUP,
473 AXP806_IRQ_PWROK_FALL,
474 AXP806_IRQ_PWROK_RISE,
475};
476
417enum axp809_irqs { 477enum axp809_irqs {
418 AXP809_IRQ_ACIN_OVER_V = 1, 478 AXP809_IRQ_ACIN_OVER_V = 1,
419 AXP809_IRQ_ACIN_PLUGIN, 479 AXP809_IRQ_ACIN_PLUGIN,
diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h
index d641a18abacb..76f7ef4d3a0d 100644
--- a/include/linux/mfd/cros_ec.h
+++ b/include/linux/mfd/cros_ec.h
@@ -109,6 +109,10 @@ struct cros_ec_command {
109 * should check msg.result for the EC's result code. 109 * should check msg.result for the EC's result code.
110 * @pkt_xfer: send packet to EC and get response 110 * @pkt_xfer: send packet to EC and get response
111 * @lock: one transaction at a time 111 * @lock: one transaction at a time
112 * @mkbp_event_supported: true if this EC supports the MKBP event protocol.
113 * @event_notifier: interrupt event notifier for transport devices.
114 * @event_data: raw payload transferred with the MKBP event.
115 * @event_size: size in bytes of the event data.
112 */ 116 */
113struct cros_ec_device { 117struct cros_ec_device {
114 118
@@ -137,6 +141,11 @@ struct cros_ec_device {
137 int (*pkt_xfer)(struct cros_ec_device *ec, 141 int (*pkt_xfer)(struct cros_ec_device *ec,
138 struct cros_ec_command *msg); 142 struct cros_ec_command *msg);
139 struct mutex lock; 143 struct mutex lock;
144 bool mkbp_event_supported;
145 struct blocking_notifier_head event_notifier;
146
147 struct ec_response_get_next_event event_data;
148 int event_size;
140}; 149};
141 150
142/* struct cros_ec_platform - ChromeOS EC platform information 151/* struct cros_ec_platform - ChromeOS EC platform information
@@ -269,6 +278,15 @@ int cros_ec_register(struct cros_ec_device *ec_dev);
269 */ 278 */
270int cros_ec_query_all(struct cros_ec_device *ec_dev); 279int cros_ec_query_all(struct cros_ec_device *ec_dev);
271 280
281/**
282 * cros_ec_get_next_event - Fetch next event from the ChromeOS EC
283 *
284 * @ec_dev: Device to fetch event from
285 *
286 * Returns: 0 on success, Linux error number on failure
287 */
288int cros_ec_get_next_event(struct cros_ec_device *ec_dev);
289
272/* sysfs stuff */ 290/* sysfs stuff */
273extern struct attribute_group cros_ec_attr_group; 291extern struct attribute_group cros_ec_attr_group;
274extern struct attribute_group cros_ec_lightbar_attr_group; 292extern struct attribute_group cros_ec_lightbar_attr_group;
diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h
index 7e7a8d4b4551..76728ff37d01 100644
--- a/include/linux/mfd/cros_ec_commands.h
+++ b/include/linux/mfd/cros_ec_commands.h
@@ -1793,6 +1793,40 @@ struct ec_result_keyscan_seq_ctrl {
1793 }; 1793 };
1794} __packed; 1794} __packed;
1795 1795
1796/*
1797 * Command for retrieving the next pending MKBP event from the EC device
1798 *
1799 * The device replies with UNAVAILABLE if there aren't any pending events.
1800 */
1801#define EC_CMD_GET_NEXT_EVENT 0x67
1802
1803enum ec_mkbp_event {
1804 /* Keyboard matrix changed. The event data is the new matrix state. */
1805 EC_MKBP_EVENT_KEY_MATRIX = 0,
1806
1807 /* New host event. The event data is 4 bytes of host event flags. */
1808 EC_MKBP_EVENT_HOST_EVENT = 1,
1809
1810 /* New Sensor FIFO data. The event data is fifo_info structure. */
1811 EC_MKBP_EVENT_SENSOR_FIFO = 2,
1812
1813 /* Number of MKBP events */
1814 EC_MKBP_EVENT_COUNT,
1815};
1816
1817union ec_response_get_next_data {
1818 uint8_t key_matrix[13];
1819
1820 /* Unaligned */
1821 uint32_t host_event;
1822} __packed;
1823
1824struct ec_response_get_next_event {
1825 uint8_t event_type;
1826 /* Followed by event data if any */
1827 union ec_response_get_next_data data;
1828} __packed;
1829
1796/*****************************************************************************/ 1830/*****************************************************************************/
1797/* Temperature sensor commands */ 1831/* Temperature sensor commands */
1798 1832
diff --git a/include/linux/mfd/da9063/core.h b/include/linux/mfd/da9063/core.h
index 621af82123c6..f3ae65db4c86 100644
--- a/include/linux/mfd/da9063/core.h
+++ b/include/linux/mfd/da9063/core.h
@@ -3,8 +3,8 @@
3 * 3 *
4 * Copyright 2012 Dialog Semiconductor Ltd. 4 * Copyright 2012 Dialog Semiconductor Ltd.
5 * 5 *
6 * Author: Michal Hajduk <michal.hajduk@diasemi.com> 6 * Author: Michal Hajduk, Dialog Semiconductor
7 * Krystian Garbaciak <krystian.garbaciak@diasemi.com> 7 * Author: Krystian Garbaciak, Dialog Semiconductor
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify it 9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the 10 * under the terms of the GNU General Public License as published by the
diff --git a/include/linux/mfd/da9063/pdata.h b/include/linux/mfd/da9063/pdata.h
index 612383bd80ae..8a125701ef7b 100644
--- a/include/linux/mfd/da9063/pdata.h
+++ b/include/linux/mfd/da9063/pdata.h
@@ -3,8 +3,8 @@
3 * 3 *
4 * Copyright 2012 Dialog Semiconductor Ltd. 4 * Copyright 2012 Dialog Semiconductor Ltd.
5 * 5 *
6 * Author: Michal Hajduk <michal.hajduk@diasemi.com> 6 * Author: Michal Hajduk, Dialog Semiconductor
7 * Author: Krystian Garbaciak <krystian.garbaciak@diasemi.com> 7 * Author: Krystian Garbaciak, Dialog Semiconductor
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify it 9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the 10 * under the terms of the GNU General Public License as published by the
diff --git a/include/linux/mfd/da9063/registers.h b/include/linux/mfd/da9063/registers.h
index 2e0ba6d5fbc3..5d42859cb441 100644
--- a/include/linux/mfd/da9063/registers.h
+++ b/include/linux/mfd/da9063/registers.h
@@ -3,8 +3,8 @@
3 * 3 *
4 * Copyright 2012 Dialog Semiconductor Ltd. 4 * Copyright 2012 Dialog Semiconductor Ltd.
5 * 5 *
6 * Author: Michal Hajduk <michal.hajduk@diasemi.com> 6 * Author: Michal Hajduk, Dialog Semiconductor
7 * Krystian Garbaciak <krystian.garbaciak@diasemi.com> 7 * Author: Krystian Garbaciak, Dialog Semiconductor
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify it 9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the 10 * under the terms of the GNU General Public License as published by the
diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
index 0bd69446bb05..7ba67b55b312 100644
--- a/include/linux/mfd/db8500-prcmu.h
+++ b/include/linux/mfd/db8500-prcmu.h
@@ -538,7 +538,6 @@ int db8500_prcmu_get_arm_opp(void);
538int db8500_prcmu_set_ape_opp(u8 opp); 538int db8500_prcmu_set_ape_opp(u8 opp);
539int db8500_prcmu_get_ape_opp(void); 539int db8500_prcmu_get_ape_opp(void);
540int db8500_prcmu_request_ape_opp_100_voltage(bool enable); 540int db8500_prcmu_request_ape_opp_100_voltage(bool enable);
541int db8500_prcmu_set_ddr_opp(u8 opp);
542int db8500_prcmu_get_ddr_opp(void); 541int db8500_prcmu_get_ddr_opp(void);
543 542
544u32 db8500_prcmu_read(unsigned int reg); 543u32 db8500_prcmu_read(unsigned int reg);
@@ -594,11 +593,6 @@ static inline int prcmu_release_usb_wakeup_state(void)
594 return 0; 593 return 0;
595} 594}
596 595
597static inline int db8500_prcmu_set_ddr_opp(u8 opp)
598{
599 return 0;
600}
601
602static inline int db8500_prcmu_get_ddr_opp(void) 596static inline int db8500_prcmu_get_ddr_opp(void)
603{ 597{
604 return DDR_100_OPP; 598 return DDR_100_OPP;
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
index 5d374601404c..2e2c6a63a065 100644
--- a/include/linux/mfd/dbx500-prcmu.h
+++ b/include/linux/mfd/dbx500-prcmu.h
@@ -269,10 +269,6 @@ unsigned long prcmu_clock_rate(u8 clock);
269long prcmu_round_clock_rate(u8 clock, unsigned long rate); 269long prcmu_round_clock_rate(u8 clock, unsigned long rate);
270int prcmu_set_clock_rate(u8 clock, unsigned long rate); 270int prcmu_set_clock_rate(u8 clock, unsigned long rate);
271 271
272static inline int prcmu_set_ddr_opp(u8 opp)
273{
274 return db8500_prcmu_set_ddr_opp(opp);
275}
276static inline int prcmu_get_ddr_opp(void) 272static inline int prcmu_get_ddr_opp(void)
277{ 273{
278 return db8500_prcmu_get_ddr_opp(); 274 return db8500_prcmu_get_ddr_opp();
@@ -489,11 +485,6 @@ static inline int prcmu_get_arm_opp(void)
489 return ARM_100_OPP; 485 return ARM_100_OPP;
490} 486}
491 487
492static inline int prcmu_set_ddr_opp(u8 opp)
493{
494 return 0;
495}
496
497static inline int prcmu_get_ddr_opp(void) 488static inline int prcmu_get_ddr_opp(void)
498{ 489{
499 return DDR_100_OPP; 490 return DDR_100_OPP;
diff --git a/include/linux/mfd/lp873x.h b/include/linux/mfd/lp873x.h
index 83b1bd7588be..edbec8350a49 100644
--- a/include/linux/mfd/lp873x.h
+++ b/include/linux/mfd/lp873x.h
@@ -263,7 +263,6 @@ enum lp873x_regulator_id {
263struct lp873x { 263struct lp873x {
264 struct device *dev; 264 struct device *dev;
265 u8 rev; 265 u8 rev;
266 struct mutex lock; /* lock guarding the data structure */
267 struct regmap *regmap; 266 struct regmap *regmap;
268}; 267};
269#endif /* __LINUX_MFD_LP873X_H */ 268#endif /* __LINUX_MFD_LP873X_H */
diff --git a/include/linux/mfd/max14577-private.h b/include/linux/mfd/max14577-private.h
index f01c1fae4d84..df75234f979d 100644
--- a/include/linux/mfd/max14577-private.h
+++ b/include/linux/mfd/max14577-private.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 2014 Samsung Electrnoics 4 * Copyright (C) 2014 Samsung Electrnoics
5 * Chanwoo Choi <cw00.choi@samsung.com> 5 * Chanwoo Choi <cw00.choi@samsung.com>
6 * Krzysztof Kozlowski <k.kozlowski@samsung.com> 6 * Krzysztof Kozlowski <krzk@kernel.org>
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
diff --git a/include/linux/mfd/max14577.h b/include/linux/mfd/max14577.h
index ccfaf952c31b..d81b52bb8bee 100644
--- a/include/linux/mfd/max14577.h
+++ b/include/linux/mfd/max14577.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 2014 Samsung Electrnoics 4 * Copyright (C) 2014 Samsung Electrnoics
5 * Chanwoo Choi <cw00.choi@samsung.com> 5 * Chanwoo Choi <cw00.choi@samsung.com>
6 * Krzysztof Kozlowski <k.kozlowski@samsung.com> 6 * Krzysztof Kozlowski <krzk@kernel.org>
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
diff --git a/include/linux/mfd/rk808.h b/include/linux/mfd/rk808.h
index 441b6ee72691..6d435a3c06bc 100644
--- a/include/linux/mfd/rk808.h
+++ b/include/linux/mfd/rk808.h
@@ -1,11 +1,15 @@
1/* 1/*
2 * rk808.h for Rockchip RK808 2 * Register definitions for Rockchip's RK808/RK818 PMIC
3 * 3 *
4 * Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd 4 * Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd
5 * 5 *
6 * Author: Chris Zhong <zyw@rock-chips.com> 6 * Author: Chris Zhong <zyw@rock-chips.com>
7 * Author: Zhang Qing <zhangqing@rock-chips.com> 7 * Author: Zhang Qing <zhangqing@rock-chips.com>
8 * 8 *
9 * Copyright (C) 2016 PHYTEC Messtechnik GmbH
10 *
11 * Author: Wadim Egorov <w.egorov@phytec.de>
12 *
9 * This program is free software; you can redistribute it and/or modify it 13 * This program is free software; you can redistribute it and/or modify it
10 * under the terms and conditions of the GNU General Public License, 14 * under the terms and conditions of the GNU General Public License,
11 * version 2, as published by the Free Software Foundation. 15 * version 2, as published by the Free Software Foundation.
@@ -16,8 +20,8 @@
16 * more details. 20 * more details.
17 */ 21 */
18 22
19#ifndef __LINUX_REGULATOR_rk808_H 23#ifndef __LINUX_REGULATOR_RK808_H
20#define __LINUX_REGULATOR_rk808_H 24#define __LINUX_REGULATOR_RK808_H
21 25
22#include <linux/regulator/machine.h> 26#include <linux/regulator/machine.h>
23#include <linux/regmap.h> 27#include <linux/regmap.h>
@@ -28,7 +32,7 @@
28 32
29#define RK808_DCDC1 0 /* (0+RK808_START) */ 33#define RK808_DCDC1 0 /* (0+RK808_START) */
30#define RK808_LDO1 4 /* (4+RK808_START) */ 34#define RK808_LDO1 4 /* (4+RK808_START) */
31#define RK808_NUM_REGULATORS 14 35#define RK808_NUM_REGULATORS 14
32 36
33enum rk808_reg { 37enum rk808_reg {
34 RK808_ID_DCDC1, 38 RK808_ID_DCDC1,
@@ -65,6 +69,8 @@ enum rk808_reg {
65#define RK808_RTC_INT_REG 0x12 69#define RK808_RTC_INT_REG 0x12
66#define RK808_RTC_COMP_LSB_REG 0x13 70#define RK808_RTC_COMP_LSB_REG 0x13
67#define RK808_RTC_COMP_MSB_REG 0x14 71#define RK808_RTC_COMP_MSB_REG 0x14
72#define RK808_ID_MSB 0x17
73#define RK808_ID_LSB 0x18
68#define RK808_CLK32OUT_REG 0x20 74#define RK808_CLK32OUT_REG 0x20
69#define RK808_VB_MON_REG 0x21 75#define RK808_VB_MON_REG 0x21
70#define RK808_THERMAL_REG 0x22 76#define RK808_THERMAL_REG 0x22
@@ -115,7 +121,92 @@ enum rk808_reg {
115#define RK808_INT_STS_MSK_REG2 0x4f 121#define RK808_INT_STS_MSK_REG2 0x4f
116#define RK808_IO_POL_REG 0x50 122#define RK808_IO_POL_REG 0x50
117 123
118/* IRQ Definitions */ 124/* RK818 */
125#define RK818_DCDC1 0
126#define RK818_LDO1 4
127#define RK818_NUM_REGULATORS 17
128
129enum rk818_reg {
130 RK818_ID_DCDC1,
131 RK818_ID_DCDC2,
132 RK818_ID_DCDC3,
133 RK818_ID_DCDC4,
134 RK818_ID_BOOST,
135 RK818_ID_LDO1,
136 RK818_ID_LDO2,
137 RK818_ID_LDO3,
138 RK818_ID_LDO4,
139 RK818_ID_LDO5,
140 RK818_ID_LDO6,
141 RK818_ID_LDO7,
142 RK818_ID_LDO8,
143 RK818_ID_LDO9,
144 RK818_ID_SWITCH,
145 RK818_ID_HDMI_SWITCH,
146 RK818_ID_OTG_SWITCH,
147};
148
149#define RK818_DCDC_EN_REG 0x23
150#define RK818_LDO_EN_REG 0x24
151#define RK818_SLEEP_SET_OFF_REG1 0x25
152#define RK818_SLEEP_SET_OFF_REG2 0x26
153#define RK818_DCDC_UV_STS_REG 0x27
154#define RK818_DCDC_UV_ACT_REG 0x28
155#define RK818_LDO_UV_STS_REG 0x29
156#define RK818_LDO_UV_ACT_REG 0x2a
157#define RK818_DCDC_PG_REG 0x2b
158#define RK818_LDO_PG_REG 0x2c
159#define RK818_VOUT_MON_TDB_REG 0x2d
160#define RK818_BUCK1_CONFIG_REG 0x2e
161#define RK818_BUCK1_ON_VSEL_REG 0x2f
162#define RK818_BUCK1_SLP_VSEL_REG 0x30
163#define RK818_BUCK2_CONFIG_REG 0x32
164#define RK818_BUCK2_ON_VSEL_REG 0x33
165#define RK818_BUCK2_SLP_VSEL_REG 0x34
166#define RK818_BUCK3_CONFIG_REG 0x36
167#define RK818_BUCK4_CONFIG_REG 0x37
168#define RK818_BUCK4_ON_VSEL_REG 0x38
169#define RK818_BUCK4_SLP_VSEL_REG 0x39
170#define RK818_BOOST_CONFIG_REG 0x3a
171#define RK818_LDO1_ON_VSEL_REG 0x3b
172#define RK818_LDO1_SLP_VSEL_REG 0x3c
173#define RK818_LDO2_ON_VSEL_REG 0x3d
174#define RK818_LDO2_SLP_VSEL_REG 0x3e
175#define RK818_LDO3_ON_VSEL_REG 0x3f
176#define RK818_LDO3_SLP_VSEL_REG 0x40
177#define RK818_LDO4_ON_VSEL_REG 0x41
178#define RK818_LDO4_SLP_VSEL_REG 0x42
179#define RK818_LDO5_ON_VSEL_REG 0x43
180#define RK818_LDO5_SLP_VSEL_REG 0x44
181#define RK818_LDO6_ON_VSEL_REG 0x45
182#define RK818_LDO6_SLP_VSEL_REG 0x46
183#define RK818_LDO7_ON_VSEL_REG 0x47
184#define RK818_LDO7_SLP_VSEL_REG 0x48
185#define RK818_LDO8_ON_VSEL_REG 0x49
186#define RK818_LDO8_SLP_VSEL_REG 0x4a
187#define RK818_BOOST_LDO9_ON_VSEL_REG 0x54
188#define RK818_BOOST_LDO9_SLP_VSEL_REG 0x55
189#define RK818_DEVCTRL_REG 0x4b
190#define RK818_INT_STS_REG1 0X4c
191#define RK818_INT_STS_MSK_REG1 0x4d
192#define RK818_INT_STS_REG2 0x4e
193#define RK818_INT_STS_MSK_REG2 0x4f
194#define RK818_IO_POL_REG 0x50
195#define RK818_H5V_EN_REG 0x52
196#define RK818_SLEEP_SET_OFF_REG3 0x53
197#define RK818_BOOST_LDO9_ON_VSEL_REG 0x54
198#define RK818_BOOST_LDO9_SLP_VSEL_REG 0x55
199#define RK818_BOOST_CTRL_REG 0x56
200#define RK818_DCDC_ILMAX 0x90
201#define RK818_USB_CTRL_REG 0xa1
202
203#define RK818_H5V_EN BIT(0)
204#define RK818_REF_RDY_CTRL BIT(1)
205#define RK818_USB_ILIM_SEL_MASK 0xf
206#define RK818_USB_ILMIN_2000MA 0x7
207#define RK818_USB_CHG_SD_VSEL_MASK 0x70
208
209/* RK808 IRQ Definitions */
119#define RK808_IRQ_VOUT_LO 0 210#define RK808_IRQ_VOUT_LO 0
120#define RK808_IRQ_VB_LO 1 211#define RK808_IRQ_VB_LO 1
121#define RK808_IRQ_PWRON 2 212#define RK808_IRQ_PWRON 2
@@ -137,6 +228,43 @@ enum rk808_reg {
137#define RK808_IRQ_PLUG_IN_INT_MSK BIT(0) 228#define RK808_IRQ_PLUG_IN_INT_MSK BIT(0)
138#define RK808_IRQ_PLUG_OUT_INT_MSK BIT(1) 229#define RK808_IRQ_PLUG_OUT_INT_MSK BIT(1)
139 230
231/* RK818 IRQ Definitions */
232#define RK818_IRQ_VOUT_LO 0
233#define RK818_IRQ_VB_LO 1
234#define RK818_IRQ_PWRON 2
235#define RK818_IRQ_PWRON_LP 3
236#define RK818_IRQ_HOTDIE 4
237#define RK818_IRQ_RTC_ALARM 5
238#define RK818_IRQ_RTC_PERIOD 6
239#define RK818_IRQ_USB_OV 7
240#define RK818_IRQ_PLUG_IN 8
241#define RK818_IRQ_PLUG_OUT 9
242#define RK818_IRQ_CHG_OK 10
243#define RK818_IRQ_CHG_TE 11
244#define RK818_IRQ_CHG_TS1 12
245#define RK818_IRQ_TS2 13
246#define RK818_IRQ_CHG_CVTLIM 14
247#define RK818_IRQ_DISCHG_ILIM 15
248
249#define RK818_IRQ_VOUT_LO_MSK BIT(0)
250#define RK818_IRQ_VB_LO_MSK BIT(1)
251#define RK818_IRQ_PWRON_MSK BIT(2)
252#define RK818_IRQ_PWRON_LP_MSK BIT(3)
253#define RK818_IRQ_HOTDIE_MSK BIT(4)
254#define RK818_IRQ_RTC_ALARM_MSK BIT(5)
255#define RK818_IRQ_RTC_PERIOD_MSK BIT(6)
256#define RK818_IRQ_USB_OV_MSK BIT(7)
257#define RK818_IRQ_PLUG_IN_MSK BIT(0)
258#define RK818_IRQ_PLUG_OUT_MSK BIT(1)
259#define RK818_IRQ_CHG_OK_MSK BIT(2)
260#define RK818_IRQ_CHG_TE_MSK BIT(3)
261#define RK818_IRQ_CHG_TS1_MSK BIT(4)
262#define RK818_IRQ_TS2_MSK BIT(5)
263#define RK818_IRQ_CHG_CVTLIM_MSK BIT(6)
264#define RK818_IRQ_DISCHG_ILIM_MSK BIT(7)
265
266#define RK818_NUM_IRQ 16
267
140#define RK808_VBAT_LOW_2V8 0x00 268#define RK808_VBAT_LOW_2V8 0x00
141#define RK808_VBAT_LOW_2V9 0x01 269#define RK808_VBAT_LOW_2V9 0x01
142#define RK808_VBAT_LOW_3V0 0x02 270#define RK808_VBAT_LOW_3V0 0x02
@@ -191,9 +319,17 @@ enum {
191 BOOST_ILMIN_250MA, 319 BOOST_ILMIN_250MA,
192}; 320};
193 321
322enum {
323 RK808_ID = 0x0000,
324 RK818_ID = 0x8181,
325};
326
194struct rk808 { 327struct rk808 {
195 struct i2c_client *i2c; 328 struct i2c_client *i2c;
196 struct regmap_irq_chip_data *irq_data; 329 struct regmap_irq_chip_data *irq_data;
197 struct regmap *regmap; 330 struct regmap *regmap;
331 long variant;
332 const struct regmap_config *regmap_cfg;
333 const struct regmap_irq_chip *regmap_irq_chip;
198}; 334};
199#endif /* __LINUX_REGULATOR_rk808_H */ 335#endif /* __LINUX_REGULATOR_RK808_H */
diff --git a/include/linux/mfd/syscon/exynos5-pmu.h b/include/linux/mfd/syscon/exynos5-pmu.h
index 76f30f940c70..c28ff21ca4d2 100644
--- a/include/linux/mfd/syscon/exynos5-pmu.h
+++ b/include/linux/mfd/syscon/exynos5-pmu.h
@@ -43,8 +43,10 @@
43#define EXYNOS5433_MIPI_PHY2_CONTROL (0x718) 43#define EXYNOS5433_MIPI_PHY2_CONTROL (0x718)
44 44
45#define EXYNOS5_PHY_ENABLE BIT(0) 45#define EXYNOS5_PHY_ENABLE BIT(0)
46
47#define EXYNOS5_MIPI_PHY_S_RESETN BIT(1) 46#define EXYNOS5_MIPI_PHY_S_RESETN BIT(1)
48#define EXYNOS5_MIPI_PHY_M_RESETN BIT(2) 47#define EXYNOS5_MIPI_PHY_M_RESETN BIT(2)
49 48
49#define EXYNOS5433_PAD_RETENTION_AUD_OPTION (0x3028)
50#define EXYNOS5433_PAD_INITIATE_WAKEUP_FROM_LOWPWR BIT(28)
51
50#endif /* _LINUX_MFD_SYSCON_PMU_EXYNOS5_H_ */ 52#endif /* _LINUX_MFD_SYSCON_PMU_EXYNOS5_H_ */
diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h
index 1c88231496d3..4ccda8969639 100644
--- a/include/linux/mfd/tps65217.h
+++ b/include/linux/mfd/tps65217.h
@@ -73,6 +73,7 @@
73#define TPS65217_PPATH_AC_CURRENT_MASK 0x0C 73#define TPS65217_PPATH_AC_CURRENT_MASK 0x0C
74#define TPS65217_PPATH_USB_CURRENT_MASK 0x03 74#define TPS65217_PPATH_USB_CURRENT_MASK 0x03
75 75
76#define TPS65217_INT_RESERVEDM BIT(7)
76#define TPS65217_INT_PBM BIT(6) 77#define TPS65217_INT_PBM BIT(6)
77#define TPS65217_INT_ACM BIT(5) 78#define TPS65217_INT_ACM BIT(5)
78#define TPS65217_INT_USBM BIT(4) 79#define TPS65217_INT_USBM BIT(4)
@@ -233,6 +234,13 @@ struct tps65217_bl_pdata {
233 int dft_brightness; 234 int dft_brightness;
234}; 235};
235 236
237enum tps65217_irq_type {
238 TPS65217_IRQ_PB,
239 TPS65217_IRQ_AC,
240 TPS65217_IRQ_USB,
241 TPS65217_NUM_IRQ
242};
243
236/** 244/**
237 * struct tps65217_board - packages regulator init data 245 * struct tps65217_board - packages regulator init data
238 * @tps65217_regulator_data: regulator initialization values 246 * @tps65217_regulator_data: regulator initialization values
@@ -258,6 +266,10 @@ struct tps65217 {
258 struct regulator_desc desc[TPS65217_NUM_REGULATOR]; 266 struct regulator_desc desc[TPS65217_NUM_REGULATOR];
259 struct regmap *regmap; 267 struct regmap *regmap;
260 u8 *strobes; 268 u8 *strobes;
269 struct irq_domain *irq_domain;
270 struct mutex irq_lock;
271 u8 irq_mask;
272 int irq;
261}; 273};
262 274
263static inline struct tps65217 *dev_to_tps65217(struct device *dev) 275static inline struct tps65217 *dev_to_tps65217(struct device *dev)
diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h
index 36795a1be479..a2e88761c09f 100644
--- a/include/linux/mfd/twl6040.h
+++ b/include/linux/mfd/twl6040.h
@@ -168,7 +168,7 @@
168#define TWL6040_VIBROCDET 0x20 168#define TWL6040_VIBROCDET 0x20
169#define TWL6040_TSHUTDET 0x40 169#define TWL6040_TSHUTDET 0x40
170 170
171#define TWL6040_CELLS 3 171#define TWL6040_CELLS 4
172 172
173#define TWL6040_REV_ES1_0 0x00 173#define TWL6040_REV_ES1_0 0x00
174#define TWL6040_REV_ES1_1 0x01 /* Rev ES1.1 and ES1.2 */ 174#define TWL6040_REV_ES1_1 0x01 /* Rev ES1.1 and ES1.2 */