diff options
Diffstat (limited to 'include/linux/mfd')
-rw-r--r-- | include/linux/mfd/abx500/ab8500-gpio.h | 33 | ||||
-rw-r--r-- | include/linux/mfd/abx500/ab8500.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/arizona/registers.h | 198 | ||||
-rw-r--r-- | include/linux/mfd/as3722.h | 5 | ||||
-rw-r--r-- | include/linux/mfd/lp3943.h | 114 | ||||
-rw-r--r-- | include/linux/mfd/max14577-private.h | 330 | ||||
-rw-r--r-- | include/linux/mfd/max14577.h | 69 | ||||
-rw-r--r-- | include/linux/mfd/max77686-private.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/max8997-private.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/max8998-private.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/mc13xxx.h | 39 | ||||
-rw-r--r-- | include/linux/mfd/samsung/core.h | 6 | ||||
-rw-r--r-- | include/linux/mfd/samsung/s5m8767.h | 18 | ||||
-rw-r--r-- | include/linux/mfd/syscon/imx6q-iomuxc-gpr.h | 1 | ||||
-rw-r--r-- | include/linux/mfd/ti_am335x_tscadc.h | 8 | ||||
-rw-r--r-- | include/linux/mfd/tmio.h | 8 | ||||
-rw-r--r-- | include/linux/mfd/tps6586x.h | 7 | ||||
-rw-r--r-- | include/linux/mfd/tps65910.h | 5 |
18 files changed, 788 insertions, 61 deletions
diff --git a/include/linux/mfd/abx500/ab8500-gpio.h b/include/linux/mfd/abx500/ab8500-gpio.h deleted file mode 100644 index 172b2f201ae0..000000000000 --- a/include/linux/mfd/abx500/ab8500-gpio.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright ST-Ericsson 2010. | ||
3 | * | ||
4 | * Author: Bibek Basu <bibek.basu@stericsson.com> | ||
5 | * Licensed under GPLv2. | ||
6 | */ | ||
7 | |||
8 | #ifndef _AB8500_GPIO_H | ||
9 | #define _AB8500_GPIO_H | ||
10 | |||
11 | /* | ||
12 | * Platform data to register a block: only the initial gpio/irq number. | ||
13 | * Array sizes are large enough to contain all AB8500 and AB9540 GPIO | ||
14 | * registers. | ||
15 | */ | ||
16 | |||
17 | struct abx500_gpio_platform_data { | ||
18 | int gpio_base; | ||
19 | }; | ||
20 | |||
21 | enum abx500_gpio_pull_updown { | ||
22 | ABX500_GPIO_PULL_DOWN = 0x0, | ||
23 | ABX500_GPIO_PULL_NONE = 0x1, | ||
24 | ABX500_GPIO_PULL_UP = 0x3, | ||
25 | }; | ||
26 | |||
27 | enum abx500_gpio_vinsel { | ||
28 | ABX500_GPIO_VINSEL_VBAT = 0x0, | ||
29 | ABX500_GPIO_VINSEL_VIN_1V8 = 0x1, | ||
30 | ABX500_GPIO_VINSEL_VDD_BIF = 0x2, | ||
31 | }; | ||
32 | |||
33 | #endif /* _AB8500_GPIO_H */ | ||
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index f4acd898dac9..a86ca1406fb8 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h | |||
@@ -368,7 +368,6 @@ struct ab8500 { | |||
368 | }; | 368 | }; |
369 | 369 | ||
370 | struct ab8500_regulator_platform_data; | 370 | struct ab8500_regulator_platform_data; |
371 | struct ab8500_gpio_platform_data; | ||
372 | struct ab8500_codec_platform_data; | 371 | struct ab8500_codec_platform_data; |
373 | struct ab8500_sysctrl_platform_data; | 372 | struct ab8500_sysctrl_platform_data; |
374 | 373 | ||
@@ -382,7 +381,6 @@ struct ab8500_platform_data { | |||
382 | int irq_base; | 381 | int irq_base; |
383 | void (*init) (struct ab8500 *); | 382 | void (*init) (struct ab8500 *); |
384 | struct ab8500_regulator_platform_data *regulator; | 383 | struct ab8500_regulator_platform_data *regulator; |
385 | struct abx500_gpio_platform_data *gpio; | ||
386 | struct ab8500_codec_platform_data *codec; | 384 | struct ab8500_codec_platform_data *codec; |
387 | struct ab8500_sysctrl_platform_data *sysctrl; | 385 | struct ab8500_sysctrl_platform_data *sysctrl; |
388 | }; | 386 | }; |
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h index cb49417f8ba9..fdf3aa376eb2 100644 --- a/include/linux/mfd/arizona/registers.h +++ b/include/linux/mfd/arizona/registers.h | |||
@@ -139,6 +139,7 @@ | |||
139 | #define ARIZONA_INPUT_ENABLES_STATUS 0x301 | 139 | #define ARIZONA_INPUT_ENABLES_STATUS 0x301 |
140 | #define ARIZONA_INPUT_RATE 0x308 | 140 | #define ARIZONA_INPUT_RATE 0x308 |
141 | #define ARIZONA_INPUT_VOLUME_RAMP 0x309 | 141 | #define ARIZONA_INPUT_VOLUME_RAMP 0x309 |
142 | #define ARIZONA_HPF_CONTROL 0x30C | ||
142 | #define ARIZONA_IN1L_CONTROL 0x310 | 143 | #define ARIZONA_IN1L_CONTROL 0x310 |
143 | #define ARIZONA_ADC_DIGITAL_VOLUME_1L 0x311 | 144 | #define ARIZONA_ADC_DIGITAL_VOLUME_1L 0x311 |
144 | #define ARIZONA_DMIC1L_CONTROL 0x312 | 145 | #define ARIZONA_DMIC1L_CONTROL 0x312 |
@@ -160,6 +161,7 @@ | |||
160 | #define ARIZONA_IN4L_CONTROL 0x328 | 161 | #define ARIZONA_IN4L_CONTROL 0x328 |
161 | #define ARIZONA_ADC_DIGITAL_VOLUME_4L 0x329 | 162 | #define ARIZONA_ADC_DIGITAL_VOLUME_4L 0x329 |
162 | #define ARIZONA_DMIC4L_CONTROL 0x32A | 163 | #define ARIZONA_DMIC4L_CONTROL 0x32A |
164 | #define ARIZONA_IN4R_CONTROL 0x32C | ||
163 | #define ARIZONA_ADC_DIGITAL_VOLUME_4R 0x32D | 165 | #define ARIZONA_ADC_DIGITAL_VOLUME_4R 0x32D |
164 | #define ARIZONA_DMIC4R_CONTROL 0x32E | 166 | #define ARIZONA_DMIC4R_CONTROL 0x32E |
165 | #define ARIZONA_OUTPUT_ENABLES_1 0x400 | 167 | #define ARIZONA_OUTPUT_ENABLES_1 0x400 |
@@ -224,6 +226,9 @@ | |||
224 | #define ARIZONA_PDM_SPK1_CTRL_2 0x491 | 226 | #define ARIZONA_PDM_SPK1_CTRL_2 0x491 |
225 | #define ARIZONA_PDM_SPK2_CTRL_1 0x492 | 227 | #define ARIZONA_PDM_SPK2_CTRL_1 0x492 |
226 | #define ARIZONA_PDM_SPK2_CTRL_2 0x493 | 228 | #define ARIZONA_PDM_SPK2_CTRL_2 0x493 |
229 | #define ARIZONA_HP1_SHORT_CIRCUIT_CTRL 0x4A0 | ||
230 | #define ARIZONA_HP2_SHORT_CIRCUIT_CTRL 0x4A1 | ||
231 | #define ARIZONA_HP3_SHORT_CIRCUIT_CTRL 0x4A2 | ||
227 | #define ARIZONA_SPK_CTRL_2 0x4B5 | 232 | #define ARIZONA_SPK_CTRL_2 0x4B5 |
228 | #define ARIZONA_SPK_CTRL_3 0x4B6 | 233 | #define ARIZONA_SPK_CTRL_3 0x4B6 |
229 | #define ARIZONA_DAC_COMP_1 0x4DC | 234 | #define ARIZONA_DAC_COMP_1 0x4DC |
@@ -511,6 +516,38 @@ | |||
511 | #define ARIZONA_AIF2TX2MIX_INPUT_3_VOLUME 0x74D | 516 | #define ARIZONA_AIF2TX2MIX_INPUT_3_VOLUME 0x74D |
512 | #define ARIZONA_AIF2TX2MIX_INPUT_4_SOURCE 0x74E | 517 | #define ARIZONA_AIF2TX2MIX_INPUT_4_SOURCE 0x74E |
513 | #define ARIZONA_AIF2TX2MIX_INPUT_4_VOLUME 0x74F | 518 | #define ARIZONA_AIF2TX2MIX_INPUT_4_VOLUME 0x74F |
519 | #define ARIZONA_AIF2TX3MIX_INPUT_1_SOURCE 0x750 | ||
520 | #define ARIZONA_AIF2TX3MIX_INPUT_1_VOLUME 0x751 | ||
521 | #define ARIZONA_AIF2TX3MIX_INPUT_2_SOURCE 0x752 | ||
522 | #define ARIZONA_AIF2TX3MIX_INPUT_2_VOLUME 0x753 | ||
523 | #define ARIZONA_AIF2TX3MIX_INPUT_3_SOURCE 0x754 | ||
524 | #define ARIZONA_AIF2TX3MIX_INPUT_3_VOLUME 0x755 | ||
525 | #define ARIZONA_AIF2TX3MIX_INPUT_4_SOURCE 0x756 | ||
526 | #define ARIZONA_AIF2TX3MIX_INPUT_4_VOLUME 0x757 | ||
527 | #define ARIZONA_AIF2TX4MIX_INPUT_1_SOURCE 0x758 | ||
528 | #define ARIZONA_AIF2TX4MIX_INPUT_1_VOLUME 0x759 | ||
529 | #define ARIZONA_AIF2TX4MIX_INPUT_2_SOURCE 0x75A | ||
530 | #define ARIZONA_AIF2TX4MIX_INPUT_2_VOLUME 0x75B | ||
531 | #define ARIZONA_AIF2TX4MIX_INPUT_3_SOURCE 0x75C | ||
532 | #define ARIZONA_AIF2TX4MIX_INPUT_3_VOLUME 0x75D | ||
533 | #define ARIZONA_AIF2TX4MIX_INPUT_4_SOURCE 0x75E | ||
534 | #define ARIZONA_AIF2TX4MIX_INPUT_4_VOLUME 0x75F | ||
535 | #define ARIZONA_AIF2TX5MIX_INPUT_1_SOURCE 0x760 | ||
536 | #define ARIZONA_AIF2TX5MIX_INPUT_1_VOLUME 0x761 | ||
537 | #define ARIZONA_AIF2TX5MIX_INPUT_2_SOURCE 0x762 | ||
538 | #define ARIZONA_AIF2TX5MIX_INPUT_2_VOLUME 0x763 | ||
539 | #define ARIZONA_AIF2TX5MIX_INPUT_3_SOURCE 0x764 | ||
540 | #define ARIZONA_AIF2TX5MIX_INPUT_3_VOLUME 0x765 | ||
541 | #define ARIZONA_AIF2TX5MIX_INPUT_4_SOURCE 0x766 | ||
542 | #define ARIZONA_AIF2TX5MIX_INPUT_4_VOLUME 0x767 | ||
543 | #define ARIZONA_AIF2TX6MIX_INPUT_1_SOURCE 0x768 | ||
544 | #define ARIZONA_AIF2TX6MIX_INPUT_1_VOLUME 0x769 | ||
545 | #define ARIZONA_AIF2TX6MIX_INPUT_2_SOURCE 0x76A | ||
546 | #define ARIZONA_AIF2TX6MIX_INPUT_2_VOLUME 0x76B | ||
547 | #define ARIZONA_AIF2TX6MIX_INPUT_3_SOURCE 0x76C | ||
548 | #define ARIZONA_AIF2TX6MIX_INPUT_3_VOLUME 0x76D | ||
549 | #define ARIZONA_AIF2TX6MIX_INPUT_4_SOURCE 0x76E | ||
550 | #define ARIZONA_AIF2TX6MIX_INPUT_4_VOLUME 0x76F | ||
514 | #define ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE 0x780 | 551 | #define ARIZONA_AIF3TX1MIX_INPUT_1_SOURCE 0x780 |
515 | #define ARIZONA_AIF3TX1MIX_INPUT_1_VOLUME 0x781 | 552 | #define ARIZONA_AIF3TX1MIX_INPUT_1_VOLUME 0x781 |
516 | #define ARIZONA_AIF3TX1MIX_INPUT_2_SOURCE 0x782 | 553 | #define ARIZONA_AIF3TX1MIX_INPUT_2_SOURCE 0x782 |
@@ -2196,6 +2233,15 @@ | |||
2196 | /* | 2233 | /* |
2197 | * R677 (0x2A5) - Mic Detect 3 | 2234 | * R677 (0x2A5) - Mic Detect 3 |
2198 | */ | 2235 | */ |
2236 | #define ARIZONA_MICD_LVL_0 0x0004 /* MICD_LVL - [2] */ | ||
2237 | #define ARIZONA_MICD_LVL_1 0x0008 /* MICD_LVL - [3] */ | ||
2238 | #define ARIZONA_MICD_LVL_2 0x0010 /* MICD_LVL - [4] */ | ||
2239 | #define ARIZONA_MICD_LVL_3 0x0020 /* MICD_LVL - [5] */ | ||
2240 | #define ARIZONA_MICD_LVL_4 0x0040 /* MICD_LVL - [6] */ | ||
2241 | #define ARIZONA_MICD_LVL_5 0x0080 /* MICD_LVL - [7] */ | ||
2242 | #define ARIZONA_MICD_LVL_6 0x0100 /* MICD_LVL - [8] */ | ||
2243 | #define ARIZONA_MICD_LVL_7 0x0200 /* MICD_LVL - [9] */ | ||
2244 | #define ARIZONA_MICD_LVL_8 0x0400 /* MICD_LVL - [10] */ | ||
2199 | #define ARIZONA_MICD_LVL_MASK 0x07FC /* MICD_LVL - [10:2] */ | 2245 | #define ARIZONA_MICD_LVL_MASK 0x07FC /* MICD_LVL - [10:2] */ |
2200 | #define ARIZONA_MICD_LVL_SHIFT 2 /* MICD_LVL - [10:2] */ | 2246 | #define ARIZONA_MICD_LVL_SHIFT 2 /* MICD_LVL - [10:2] */ |
2201 | #define ARIZONA_MICD_LVL_WIDTH 9 /* MICD_LVL - [10:2] */ | 2247 | #define ARIZONA_MICD_LVL_WIDTH 9 /* MICD_LVL - [10:2] */ |
@@ -2293,8 +2339,18 @@ | |||
2293 | #define ARIZONA_IN_VI_RAMP_WIDTH 3 /* IN_VI_RAMP - [2:0] */ | 2339 | #define ARIZONA_IN_VI_RAMP_WIDTH 3 /* IN_VI_RAMP - [2:0] */ |
2294 | 2340 | ||
2295 | /* | 2341 | /* |
2342 | * R780 (0x30C) - HPF Control | ||
2343 | */ | ||
2344 | #define ARIZONA_IN_HPF_CUT_MASK 0x0007 /* IN_HPF_CUT [2:0] */ | ||
2345 | #define ARIZONA_IN_HPF_CUT_SHIFT 0 /* IN_HPF_CUT [2:0] */ | ||
2346 | #define ARIZONA_IN_HPF_CUT_WIDTH 3 /* IN_HPF_CUT [2:0] */ | ||
2347 | |||
2348 | /* | ||
2296 | * R784 (0x310) - IN1L Control | 2349 | * R784 (0x310) - IN1L Control |
2297 | */ | 2350 | */ |
2351 | #define ARIZONA_IN1L_HPF_MASK 0x8000 /* IN1L_HPF - [15] */ | ||
2352 | #define ARIZONA_IN1L_HPF_SHIFT 15 /* IN1L_HPF - [15] */ | ||
2353 | #define ARIZONA_IN1L_HPF_WIDTH 1 /* IN1L_HPF - [15] */ | ||
2298 | #define ARIZONA_IN1_OSR_MASK 0x6000 /* IN1_OSR - [14:13] */ | 2354 | #define ARIZONA_IN1_OSR_MASK 0x6000 /* IN1_OSR - [14:13] */ |
2299 | #define ARIZONA_IN1_OSR_SHIFT 13 /* IN1_OSR - [14:13] */ | 2355 | #define ARIZONA_IN1_OSR_SHIFT 13 /* IN1_OSR - [14:13] */ |
2300 | #define ARIZONA_IN1_OSR_WIDTH 2 /* IN1_OSR - [14:13] */ | 2356 | #define ARIZONA_IN1_OSR_WIDTH 2 /* IN1_OSR - [14:13] */ |
@@ -2333,6 +2389,9 @@ | |||
2333 | /* | 2389 | /* |
2334 | * R788 (0x314) - IN1R Control | 2390 | * R788 (0x314) - IN1R Control |
2335 | */ | 2391 | */ |
2392 | #define ARIZONA_IN1R_HPF_MASK 0x8000 /* IN1R_HPF - [15] */ | ||
2393 | #define ARIZONA_IN1R_HPF_SHIFT 15 /* IN1R_HPF - [15] */ | ||
2394 | #define ARIZONA_IN1R_HPF_WIDTH 1 /* IN1R_HPF - [15] */ | ||
2336 | #define ARIZONA_IN1R_PGA_VOL_MASK 0x00FE /* IN1R_PGA_VOL - [7:1] */ | 2395 | #define ARIZONA_IN1R_PGA_VOL_MASK 0x00FE /* IN1R_PGA_VOL - [7:1] */ |
2337 | #define ARIZONA_IN1R_PGA_VOL_SHIFT 1 /* IN1R_PGA_VOL - [7:1] */ | 2396 | #define ARIZONA_IN1R_PGA_VOL_SHIFT 1 /* IN1R_PGA_VOL - [7:1] */ |
2338 | #define ARIZONA_IN1R_PGA_VOL_WIDTH 7 /* IN1R_PGA_VOL - [7:1] */ | 2397 | #define ARIZONA_IN1R_PGA_VOL_WIDTH 7 /* IN1R_PGA_VOL - [7:1] */ |
@@ -2362,6 +2421,9 @@ | |||
2362 | /* | 2421 | /* |
2363 | * R792 (0x318) - IN2L Control | 2422 | * R792 (0x318) - IN2L Control |
2364 | */ | 2423 | */ |
2424 | #define ARIZONA_IN2L_HPF_MASK 0x8000 /* IN2L_HPF - [15] */ | ||
2425 | #define ARIZONA_IN2L_HPF_SHIFT 15 /* IN2L_HPF - [15] */ | ||
2426 | #define ARIZONA_IN2L_HPF_WIDTH 1 /* IN2L_HPF - [15] */ | ||
2365 | #define ARIZONA_IN2_OSR_MASK 0x6000 /* IN2_OSR - [14:13] */ | 2427 | #define ARIZONA_IN2_OSR_MASK 0x6000 /* IN2_OSR - [14:13] */ |
2366 | #define ARIZONA_IN2_OSR_SHIFT 13 /* IN2_OSR - [14:13] */ | 2428 | #define ARIZONA_IN2_OSR_SHIFT 13 /* IN2_OSR - [14:13] */ |
2367 | #define ARIZONA_IN2_OSR_WIDTH 2 /* IN2_OSR - [14:13] */ | 2429 | #define ARIZONA_IN2_OSR_WIDTH 2 /* IN2_OSR - [14:13] */ |
@@ -2400,6 +2462,9 @@ | |||
2400 | /* | 2462 | /* |
2401 | * R796 (0x31C) - IN2R Control | 2463 | * R796 (0x31C) - IN2R Control |
2402 | */ | 2464 | */ |
2465 | #define ARIZONA_IN2R_HPF_MASK 0x8000 /* IN2R_HPF - [15] */ | ||
2466 | #define ARIZONA_IN2R_HPF_SHIFT 15 /* IN2R_HPF - [15] */ | ||
2467 | #define ARIZONA_IN2R_HPF_WIDTH 1 /* IN2R_HPF - [15] */ | ||
2403 | #define ARIZONA_IN2R_PGA_VOL_MASK 0x00FE /* IN2R_PGA_VOL - [7:1] */ | 2468 | #define ARIZONA_IN2R_PGA_VOL_MASK 0x00FE /* IN2R_PGA_VOL - [7:1] */ |
2404 | #define ARIZONA_IN2R_PGA_VOL_SHIFT 1 /* IN2R_PGA_VOL - [7:1] */ | 2469 | #define ARIZONA_IN2R_PGA_VOL_SHIFT 1 /* IN2R_PGA_VOL - [7:1] */ |
2405 | #define ARIZONA_IN2R_PGA_VOL_WIDTH 7 /* IN2R_PGA_VOL - [7:1] */ | 2470 | #define ARIZONA_IN2R_PGA_VOL_WIDTH 7 /* IN2R_PGA_VOL - [7:1] */ |
@@ -2429,6 +2494,9 @@ | |||
2429 | /* | 2494 | /* |
2430 | * R800 (0x320) - IN3L Control | 2495 | * R800 (0x320) - IN3L Control |
2431 | */ | 2496 | */ |
2497 | #define ARIZONA_IN3L_HPF_MASK 0x8000 /* IN3L_HPF - [15] */ | ||
2498 | #define ARIZONA_IN3L_HPF_SHIFT 15 /* IN3L_HPF - [15] */ | ||
2499 | #define ARIZONA_IN3L_HPF_WIDTH 1 /* IN3L_HPF - [15] */ | ||
2432 | #define ARIZONA_IN3_OSR_MASK 0x6000 /* IN3_OSR - [14:13] */ | 2500 | #define ARIZONA_IN3_OSR_MASK 0x6000 /* IN3_OSR - [14:13] */ |
2433 | #define ARIZONA_IN3_OSR_SHIFT 13 /* IN3_OSR - [14:13] */ | 2501 | #define ARIZONA_IN3_OSR_SHIFT 13 /* IN3_OSR - [14:13] */ |
2434 | #define ARIZONA_IN3_OSR_WIDTH 2 /* IN3_OSR - [14:13] */ | 2502 | #define ARIZONA_IN3_OSR_WIDTH 2 /* IN3_OSR - [14:13] */ |
@@ -2467,6 +2535,9 @@ | |||
2467 | /* | 2535 | /* |
2468 | * R804 (0x324) - IN3R Control | 2536 | * R804 (0x324) - IN3R Control |
2469 | */ | 2537 | */ |
2538 | #define ARIZONA_IN3R_HPF_MASK 0x8000 /* IN3R_HPF - [15] */ | ||
2539 | #define ARIZONA_IN3R_HPF_SHIFT 15 /* IN3R_HPF - [15] */ | ||
2540 | #define ARIZONA_IN3R_HPF_WIDTH 1 /* IN3R_HPF - [15] */ | ||
2470 | #define ARIZONA_IN3R_PGA_VOL_MASK 0x00FE /* IN3R_PGA_VOL - [7:1] */ | 2541 | #define ARIZONA_IN3R_PGA_VOL_MASK 0x00FE /* IN3R_PGA_VOL - [7:1] */ |
2471 | #define ARIZONA_IN3R_PGA_VOL_SHIFT 1 /* IN3R_PGA_VOL - [7:1] */ | 2542 | #define ARIZONA_IN3R_PGA_VOL_SHIFT 1 /* IN3R_PGA_VOL - [7:1] */ |
2472 | #define ARIZONA_IN3R_PGA_VOL_WIDTH 7 /* IN3R_PGA_VOL - [7:1] */ | 2543 | #define ARIZONA_IN3R_PGA_VOL_WIDTH 7 /* IN3R_PGA_VOL - [7:1] */ |
@@ -2496,6 +2567,9 @@ | |||
2496 | /* | 2567 | /* |
2497 | * R808 (0x328) - IN4 Control | 2568 | * R808 (0x328) - IN4 Control |
2498 | */ | 2569 | */ |
2570 | #define ARIZONA_IN4L_HPF_MASK 0x8000 /* IN4L_HPF - [15] */ | ||
2571 | #define ARIZONA_IN4L_HPF_SHIFT 15 /* IN4L_HPF - [15] */ | ||
2572 | #define ARIZONA_IN4L_HPF_WIDTH 1 /* IN4L_HPF - [15] */ | ||
2499 | #define ARIZONA_IN4_OSR_MASK 0x6000 /* IN4_OSR - [14:13] */ | 2573 | #define ARIZONA_IN4_OSR_MASK 0x6000 /* IN4_OSR - [14:13] */ |
2500 | #define ARIZONA_IN4_OSR_SHIFT 13 /* IN4_OSR - [14:13] */ | 2574 | #define ARIZONA_IN4_OSR_SHIFT 13 /* IN4_OSR - [14:13] */ |
2501 | #define ARIZONA_IN4_OSR_WIDTH 2 /* IN4_OSR - [14:13] */ | 2575 | #define ARIZONA_IN4_OSR_WIDTH 2 /* IN4_OSR - [14:13] */ |
@@ -2526,6 +2600,13 @@ | |||
2526 | #define ARIZONA_IN4L_DMIC_DLY_WIDTH 6 /* IN4L_DMIC_DLY - [5:0] */ | 2600 | #define ARIZONA_IN4L_DMIC_DLY_WIDTH 6 /* IN4L_DMIC_DLY - [5:0] */ |
2527 | 2601 | ||
2528 | /* | 2602 | /* |
2603 | * R812 (0x32C) - IN4R Control | ||
2604 | */ | ||
2605 | #define ARIZONA_IN4R_HPF_MASK 0x8000 /* IN4R_HPF - [15] */ | ||
2606 | #define ARIZONA_IN4R_HPF_SHIFT 15 /* IN4R_HPF - [15] */ | ||
2607 | #define ARIZONA_IN4R_HPF_WIDTH 1 /* IN4R_HPF - [15] */ | ||
2608 | |||
2609 | /* | ||
2529 | * R813 (0x32D) - ADC Digital Volume 4R | 2610 | * R813 (0x32D) - ADC Digital Volume 4R |
2530 | */ | 2611 | */ |
2531 | #define ARIZONA_IN_VU 0x0200 /* IN_VU */ | 2612 | #define ARIZONA_IN_VU 0x0200 /* IN_VU */ |
@@ -3138,6 +3219,10 @@ | |||
3138 | /* | 3219 | /* |
3139 | * R1088 (0x440) - DRE Enable | 3220 | * R1088 (0x440) - DRE Enable |
3140 | */ | 3221 | */ |
3222 | #define ARIZONA_DRE3R_ENA 0x0020 /* DRE3R_ENA */ | ||
3223 | #define ARIZONA_DRE3R_ENA_MASK 0x0020 /* DRE3R_ENA */ | ||
3224 | #define ARIZONA_DRE3R_ENA_SHIFT 5 /* DRE3R_ENA */ | ||
3225 | #define ARIZONA_DRE3R_ENA_WIDTH 1 /* DRE3R_ENA */ | ||
3141 | #define ARIZONA_DRE3L_ENA 0x0010 /* DRE3L_ENA */ | 3226 | #define ARIZONA_DRE3L_ENA 0x0010 /* DRE3L_ENA */ |
3142 | #define ARIZONA_DRE3L_ENA_MASK 0x0010 /* DRE3L_ENA */ | 3227 | #define ARIZONA_DRE3L_ENA_MASK 0x0010 /* DRE3L_ENA */ |
3143 | #define ARIZONA_DRE3L_ENA_SHIFT 4 /* DRE3L_ENA */ | 3228 | #define ARIZONA_DRE3L_ENA_SHIFT 4 /* DRE3L_ENA */ |
@@ -3260,6 +3345,30 @@ | |||
3260 | #define ARIZONA_SPK2_FMT_WIDTH 1 /* SPK2_FMT */ | 3345 | #define ARIZONA_SPK2_FMT_WIDTH 1 /* SPK2_FMT */ |
3261 | 3346 | ||
3262 | /* | 3347 | /* |
3348 | * R1184 (0x4A0) - HP1 Short Circuit Ctrl | ||
3349 | */ | ||
3350 | #define ARIZONA_HP1_SC_ENA 0x1000 /* HP1_SC_ENA */ | ||
3351 | #define ARIZONA_HP1_SC_ENA_MASK 0x1000 /* HP1_SC_ENA */ | ||
3352 | #define ARIZONA_HP1_SC_ENA_SHIFT 12 /* HP1_SC_ENA */ | ||
3353 | #define ARIZONA_HP1_SC_ENA_WIDTH 1 /* HP1_SC_ENA */ | ||
3354 | |||
3355 | /* | ||
3356 | * R1185 (0x4A1) - HP2 Short Circuit Ctrl | ||
3357 | */ | ||
3358 | #define ARIZONA_HP2_SC_ENA 0x1000 /* HP2_SC_ENA */ | ||
3359 | #define ARIZONA_HP2_SC_ENA_MASK 0x1000 /* HP2_SC_ENA */ | ||
3360 | #define ARIZONA_HP2_SC_ENA_SHIFT 12 /* HP2_SC_ENA */ | ||
3361 | #define ARIZONA_HP2_SC_ENA_WIDTH 1 /* HP2_SC_ENA */ | ||
3362 | |||
3363 | /* | ||
3364 | * R1186 (0x4A2) - HP3 Short Circuit Ctrl | ||
3365 | */ | ||
3366 | #define ARIZONA_HP3_SC_ENA 0x1000 /* HP3_SC_ENA */ | ||
3367 | #define ARIZONA_HP3_SC_ENA_MASK 0x1000 /* HP3_SC_ENA */ | ||
3368 | #define ARIZONA_HP3_SC_ENA_SHIFT 12 /* HP3_SC_ENA */ | ||
3369 | #define ARIZONA_HP3_SC_ENA_WIDTH 1 /* HP3_SC_ENA */ | ||
3370 | |||
3371 | /* | ||
3263 | * R1244 (0x4DC) - DAC comp 1 | 3372 | * R1244 (0x4DC) - DAC comp 1 |
3264 | */ | 3373 | */ |
3265 | #define ARIZONA_OUT_COMP_COEFF_MASK 0xFFFF /* OUT_COMP_COEFF - [15:0] */ | 3374 | #define ARIZONA_OUT_COMP_COEFF_MASK 0xFFFF /* OUT_COMP_COEFF - [15:0] */ |
@@ -3726,6 +3835,35 @@ | |||
3726 | #define ARIZONA_AIF2TX2_SLOT_WIDTH 6 /* AIF2TX2_SLOT - [5:0] */ | 3835 | #define ARIZONA_AIF2TX2_SLOT_WIDTH 6 /* AIF2TX2_SLOT - [5:0] */ |
3727 | 3836 | ||
3728 | /* | 3837 | /* |
3838 | * R1355 (0x54B) - AIF2 Frame Ctrl 5 | ||
3839 | */ | ||
3840 | #define ARIZONA_AIF2TX3_SLOT_MASK 0x003F /* AIF2TX3_SLOT - [5:0] */ | ||
3841 | #define ARIZONA_AIF2TX3_SLOT_SHIFT 0 /* AIF2TX3_SLOT - [5:0] */ | ||
3842 | #define ARIZONA_AIF2TX3_SLOT_WIDTH 6 /* AIF2TX3_SLOT - [5:0] */ | ||
3843 | |||
3844 | /* | ||
3845 | * R1356 (0x54C) - AIF2 Frame Ctrl 6 | ||
3846 | */ | ||
3847 | #define ARIZONA_AIF2TX4_SLOT_MASK 0x003F /* AIF2TX4_SLOT - [5:0] */ | ||
3848 | #define ARIZONA_AIF2TX4_SLOT_SHIFT 0 /* AIF2TX4_SLOT - [5:0] */ | ||
3849 | #define ARIZONA_AIF2TX4_SLOT_WIDTH 6 /* AIF2TX4_SLOT - [5:0] */ | ||
3850 | |||
3851 | |||
3852 | /* | ||
3853 | * R1357 (0x54D) - AIF2 Frame Ctrl 7 | ||
3854 | */ | ||
3855 | #define ARIZONA_AIF2TX5_SLOT_MASK 0x003F /* AIF2TX5_SLOT - [5:0] */ | ||
3856 | #define ARIZONA_AIF2TX5_SLOT_SHIFT 0 /* AIF2TX5_SLOT - [5:0] */ | ||
3857 | #define ARIZONA_AIF2TX5_SLOT_WIDTH 6 /* AIF2TX5_SLOT - [5:0] */ | ||
3858 | |||
3859 | /* | ||
3860 | * R1358 (0x54E) - AIF2 Frame Ctrl 8 | ||
3861 | */ | ||
3862 | #define ARIZONA_AIF2TX6_SLOT_MASK 0x003F /* AIF2TX6_SLOT - [5:0] */ | ||
3863 | #define ARIZONA_AIF2TX6_SLOT_SHIFT 0 /* AIF2TX6_SLOT - [5:0] */ | ||
3864 | #define ARIZONA_AIF2TX6_SLOT_WIDTH 6 /* AIF2TX6_SLOT - [5:0] */ | ||
3865 | |||
3866 | /* | ||
3729 | * R1361 (0x551) - AIF2 Frame Ctrl 11 | 3867 | * R1361 (0x551) - AIF2 Frame Ctrl 11 |
3730 | */ | 3868 | */ |
3731 | #define ARIZONA_AIF2RX1_SLOT_MASK 0x003F /* AIF2RX1_SLOT - [5:0] */ | 3869 | #define ARIZONA_AIF2RX1_SLOT_MASK 0x003F /* AIF2RX1_SLOT - [5:0] */ |
@@ -3740,8 +3878,52 @@ | |||
3740 | #define ARIZONA_AIF2RX2_SLOT_WIDTH 6 /* AIF2RX2_SLOT - [5:0] */ | 3878 | #define ARIZONA_AIF2RX2_SLOT_WIDTH 6 /* AIF2RX2_SLOT - [5:0] */ |
3741 | 3879 | ||
3742 | /* | 3880 | /* |
3881 | * R1363 (0x553) - AIF2 Frame Ctrl 13 | ||
3882 | */ | ||
3883 | #define ARIZONA_AIF2RX3_SLOT_MASK 0x003F /* AIF2RX3_SLOT - [5:0] */ | ||
3884 | #define ARIZONA_AIF2RX3_SLOT_SHIFT 0 /* AIF2RX3_SLOT - [5:0] */ | ||
3885 | #define ARIZONA_AIF2RX3_SLOT_WIDTH 6 /* AIF2RX3_SLOT - [5:0] */ | ||
3886 | |||
3887 | /* | ||
3888 | * R1364 (0x554) - AIF2 Frame Ctrl 14 | ||
3889 | */ | ||
3890 | #define ARIZONA_AIF2RX4_SLOT_MASK 0x003F /* AIF2RX4_SLOT - [5:0] */ | ||
3891 | #define ARIZONA_AIF2RX4_SLOT_SHIFT 0 /* AIF2RX4_SLOT - [5:0] */ | ||
3892 | #define ARIZONA_AIF2RX4_SLOT_WIDTH 6 /* AIF2RX4_SLOT - [5:0] */ | ||
3893 | |||
3894 | /* | ||
3895 | * R1365 (0x555) - AIF2 Frame Ctrl 15 | ||
3896 | */ | ||
3897 | #define ARIZONA_AIF2RX5_SLOT_MASK 0x003F /* AIF2RX5_SLOT - [5:0] */ | ||
3898 | #define ARIZONA_AIF2RX5_SLOT_SHIFT 0 /* AIF2RX5_SLOT - [5:0] */ | ||
3899 | #define ARIZONA_AIF2RX5_SLOT_WIDTH 6 /* AIF2RX5_SLOT - [5:0] */ | ||
3900 | |||
3901 | /* | ||
3902 | * R1366 (0x556) - AIF2 Frame Ctrl 16 | ||
3903 | */ | ||
3904 | #define ARIZONA_AIF2RX6_SLOT_MASK 0x003F /* AIF2RX6_SLOT - [5:0] */ | ||
3905 | #define ARIZONA_AIF2RX6_SLOT_SHIFT 0 /* AIF2RX6_SLOT - [5:0] */ | ||
3906 | #define ARIZONA_AIF2RX6_SLOT_WIDTH 6 /* AIF2RX6_SLOT - [5:0] */ | ||
3907 | |||
3908 | /* | ||
3743 | * R1369 (0x559) - AIF2 Tx Enables | 3909 | * R1369 (0x559) - AIF2 Tx Enables |
3744 | */ | 3910 | */ |
3911 | #define ARIZONA_AIF2TX6_ENA 0x0020 /* AIF2TX6_ENA */ | ||
3912 | #define ARIZONA_AIF2TX6_ENA_MASK 0x0020 /* AIF2TX6_ENA */ | ||
3913 | #define ARIZONA_AIF2TX6_ENA_SHIFT 5 /* AIF2TX6_ENA */ | ||
3914 | #define ARIZONA_AIF2TX6_ENA_WIDTH 1 /* AIF2TX6_ENA */ | ||
3915 | #define ARIZONA_AIF2TX5_ENA 0x0010 /* AIF2TX5_ENA */ | ||
3916 | #define ARIZONA_AIF2TX5_ENA_MASK 0x0010 /* AIF2TX5_ENA */ | ||
3917 | #define ARIZONA_AIF2TX5_ENA_SHIFT 4 /* AIF2TX5_ENA */ | ||
3918 | #define ARIZONA_AIF2TX5_ENA_WIDTH 1 /* AIF2TX5_ENA */ | ||
3919 | #define ARIZONA_AIF2TX4_ENA 0x0008 /* AIF2TX4_ENA */ | ||
3920 | #define ARIZONA_AIF2TX4_ENA_MASK 0x0008 /* AIF2TX4_ENA */ | ||
3921 | #define ARIZONA_AIF2TX4_ENA_SHIFT 3 /* AIF2TX4_ENA */ | ||
3922 | #define ARIZONA_AIF2TX4_ENA_WIDTH 1 /* AIF2TX4_ENA */ | ||
3923 | #define ARIZONA_AIF2TX3_ENA 0x0004 /* AIF2TX3_ENA */ | ||
3924 | #define ARIZONA_AIF2TX3_ENA_MASK 0x0004 /* AIF2TX3_ENA */ | ||
3925 | #define ARIZONA_AIF2TX3_ENA_SHIFT 2 /* AIF2TX3_ENA */ | ||
3926 | #define ARIZONA_AIF2TX3_ENA_WIDTH 1 /* AIF2TX3_ENA */ | ||
3745 | #define ARIZONA_AIF2TX2_ENA 0x0002 /* AIF2TX2_ENA */ | 3927 | #define ARIZONA_AIF2TX2_ENA 0x0002 /* AIF2TX2_ENA */ |
3746 | #define ARIZONA_AIF2TX2_ENA_MASK 0x0002 /* AIF2TX2_ENA */ | 3928 | #define ARIZONA_AIF2TX2_ENA_MASK 0x0002 /* AIF2TX2_ENA */ |
3747 | #define ARIZONA_AIF2TX2_ENA_SHIFT 1 /* AIF2TX2_ENA */ | 3929 | #define ARIZONA_AIF2TX2_ENA_SHIFT 1 /* AIF2TX2_ENA */ |
@@ -3754,6 +3936,22 @@ | |||
3754 | /* | 3936 | /* |
3755 | * R1370 (0x55A) - AIF2 Rx Enables | 3937 | * R1370 (0x55A) - AIF2 Rx Enables |
3756 | */ | 3938 | */ |
3939 | #define ARIZONA_AIF2RX6_ENA 0x0020 /* AIF2RX6_ENA */ | ||
3940 | #define ARIZONA_AIF2RX6_ENA_MASK 0x0020 /* AIF2RX6_ENA */ | ||
3941 | #define ARIZONA_AIF2RX6_ENA_SHIFT 5 /* AIF2RX6_ENA */ | ||
3942 | #define ARIZONA_AIF2RX6_ENA_WIDTH 1 /* AIF2RX6_ENA */ | ||
3943 | #define ARIZONA_AIF2RX5_ENA 0x0010 /* AIF2RX5_ENA */ | ||
3944 | #define ARIZONA_AIF2RX5_ENA_MASK 0x0010 /* AIF2RX5_ENA */ | ||
3945 | #define ARIZONA_AIF2RX5_ENA_SHIFT 4 /* AIF2RX5_ENA */ | ||
3946 | #define ARIZONA_AIF2RX5_ENA_WIDTH 1 /* AIF2RX5_ENA */ | ||
3947 | #define ARIZONA_AIF2RX4_ENA 0x0008 /* AIF2RX4_ENA */ | ||
3948 | #define ARIZONA_AIF2RX4_ENA_MASK 0x0008 /* AIF2RX4_ENA */ | ||
3949 | #define ARIZONA_AIF2RX4_ENA_SHIFT 3 /* AIF2RX4_ENA */ | ||
3950 | #define ARIZONA_AIF2RX4_ENA_WIDTH 1 /* AIF2RX4_ENA */ | ||
3951 | #define ARIZONA_AIF2RX3_ENA 0x0004 /* AIF2RX3_ENA */ | ||
3952 | #define ARIZONA_AIF2RX3_ENA_MASK 0x0004 /* AIF2RX3_ENA */ | ||
3953 | #define ARIZONA_AIF2RX3_ENA_SHIFT 2 /* AIF2RX3_ENA */ | ||
3954 | #define ARIZONA_AIF2RX3_ENA_WIDTH 1 /* AIF2RX3_ENA */ | ||
3757 | #define ARIZONA_AIF2RX2_ENA 0x0002 /* AIF2RX2_ENA */ | 3955 | #define ARIZONA_AIF2RX2_ENA 0x0002 /* AIF2RX2_ENA */ |
3758 | #define ARIZONA_AIF2RX2_ENA_MASK 0x0002 /* AIF2RX2_ENA */ | 3956 | #define ARIZONA_AIF2RX2_ENA_MASK 0x0002 /* AIF2RX2_ENA */ |
3759 | #define ARIZONA_AIF2RX2_ENA_SHIFT 1 /* AIF2RX2_ENA */ | 3957 | #define ARIZONA_AIF2RX2_ENA_SHIFT 1 /* AIF2RX2_ENA */ |
diff --git a/include/linux/mfd/as3722.h b/include/linux/mfd/as3722.h index 16bf8a0dcd97..8d43e9f2a842 100644 --- a/include/linux/mfd/as3722.h +++ b/include/linux/mfd/as3722.h | |||
@@ -151,6 +151,7 @@ | |||
151 | #define AS3722_ASIC_ID1_REG 0x90 | 151 | #define AS3722_ASIC_ID1_REG 0x90 |
152 | #define AS3722_ASIC_ID2_REG 0x91 | 152 | #define AS3722_ASIC_ID2_REG 0x91 |
153 | #define AS3722_LOCK_REG 0x9E | 153 | #define AS3722_LOCK_REG 0x9E |
154 | #define AS3722_FUSE7_REG 0xA7 | ||
154 | #define AS3722_MAX_REGISTER 0xF4 | 155 | #define AS3722_MAX_REGISTER 0xF4 |
155 | 156 | ||
156 | #define AS3722_SD0_EXT_ENABLE_MASK 0x03 | 157 | #define AS3722_SD0_EXT_ENABLE_MASK 0x03 |
@@ -224,6 +225,7 @@ | |||
224 | #define AS3722_SD_VSEL_MASK 0x7F | 225 | #define AS3722_SD_VSEL_MASK 0x7F |
225 | #define AS3722_SD0_VSEL_MIN 0x01 | 226 | #define AS3722_SD0_VSEL_MIN 0x01 |
226 | #define AS3722_SD0_VSEL_MAX 0x5A | 227 | #define AS3722_SD0_VSEL_MAX 0x5A |
228 | #define AS3722_SD0_VSEL_LOW_VOL_MAX 0x6E | ||
227 | #define AS3722_SD2_VSEL_MIN 0x01 | 229 | #define AS3722_SD2_VSEL_MIN 0x01 |
228 | #define AS3722_SD2_VSEL_MAX 0x7F | 230 | #define AS3722_SD2_VSEL_MAX 0x7F |
229 | 231 | ||
@@ -314,6 +316,7 @@ | |||
314 | #define AS3722_GPIO_IOSF_GPIO_INTERRUPT_IN AS3722_GPIO_IOSF_VAL(3) | 316 | #define AS3722_GPIO_IOSF_GPIO_INTERRUPT_IN AS3722_GPIO_IOSF_VAL(3) |
315 | #define AS3722_GPIO_IOSF_ISINK_PWM_IN AS3722_GPIO_IOSF_VAL(4) | 317 | #define AS3722_GPIO_IOSF_ISINK_PWM_IN AS3722_GPIO_IOSF_VAL(4) |
316 | #define AS3722_GPIO_IOSF_VOLTAGE_STBY AS3722_GPIO_IOSF_VAL(5) | 318 | #define AS3722_GPIO_IOSF_VOLTAGE_STBY AS3722_GPIO_IOSF_VAL(5) |
319 | #define AS3722_GPIO_IOSF_SD0_OUT AS3722_GPIO_IOSF_VAL(6) | ||
317 | #define AS3722_GPIO_IOSF_PWR_GOOD_OUT AS3722_GPIO_IOSF_VAL(7) | 320 | #define AS3722_GPIO_IOSF_PWR_GOOD_OUT AS3722_GPIO_IOSF_VAL(7) |
318 | #define AS3722_GPIO_IOSF_Q32K_OUT AS3722_GPIO_IOSF_VAL(8) | 321 | #define AS3722_GPIO_IOSF_Q32K_OUT AS3722_GPIO_IOSF_VAL(8) |
319 | #define AS3722_GPIO_IOSF_WATCHDOG_IN AS3722_GPIO_IOSF_VAL(9) | 322 | #define AS3722_GPIO_IOSF_WATCHDOG_IN AS3722_GPIO_IOSF_VAL(9) |
@@ -341,6 +344,8 @@ | |||
341 | #define AS3722_EXT_CONTROL_ENABLE2 0x2 | 344 | #define AS3722_EXT_CONTROL_ENABLE2 0x2 |
342 | #define AS3722_EXT_CONTROL_ENABLE3 0x3 | 345 | #define AS3722_EXT_CONTROL_ENABLE3 0x3 |
343 | 346 | ||
347 | #define AS3722_FUSE7_SD0_LOW_VOLTAGE BIT(4) | ||
348 | |||
344 | /* Interrupt IDs */ | 349 | /* Interrupt IDs */ |
345 | enum as3722_irq { | 350 | enum as3722_irq { |
346 | AS3722_IRQ_LID, | 351 | AS3722_IRQ_LID, |
diff --git a/include/linux/mfd/lp3943.h b/include/linux/mfd/lp3943.h new file mode 100644 index 000000000000..3490db782988 --- /dev/null +++ b/include/linux/mfd/lp3943.h | |||
@@ -0,0 +1,114 @@ | |||
1 | /* | ||
2 | * TI/National Semiconductor LP3943 Device | ||
3 | * | ||
4 | * Copyright 2013 Texas Instruments | ||
5 | * | ||
6 | * Author: Milo Kim <milo.kim@ti.com> | ||
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 | |||
14 | #ifndef __MFD_LP3943_H__ | ||
15 | #define __MFD_LP3943_H__ | ||
16 | |||
17 | #include <linux/gpio.h> | ||
18 | #include <linux/pwm.h> | ||
19 | #include <linux/regmap.h> | ||
20 | |||
21 | /* Registers */ | ||
22 | #define LP3943_REG_GPIO_A 0x00 | ||
23 | #define LP3943_REG_GPIO_B 0x01 | ||
24 | #define LP3943_REG_PRESCALE0 0x02 | ||
25 | #define LP3943_REG_PWM0 0x03 | ||
26 | #define LP3943_REG_PRESCALE1 0x04 | ||
27 | #define LP3943_REG_PWM1 0x05 | ||
28 | #define LP3943_REG_MUX0 0x06 | ||
29 | #define LP3943_REG_MUX1 0x07 | ||
30 | #define LP3943_REG_MUX2 0x08 | ||
31 | #define LP3943_REG_MUX3 0x09 | ||
32 | |||
33 | /* Bit description for LP3943_REG_MUX0 ~ 3 */ | ||
34 | #define LP3943_GPIO_IN 0x00 | ||
35 | #define LP3943_GPIO_OUT_HIGH 0x00 | ||
36 | #define LP3943_GPIO_OUT_LOW 0x01 | ||
37 | #define LP3943_DIM_PWM0 0x02 | ||
38 | #define LP3943_DIM_PWM1 0x03 | ||
39 | |||
40 | #define LP3943_NUM_PWMS 2 | ||
41 | |||
42 | enum lp3943_pwm_output { | ||
43 | LP3943_PWM_OUT0, | ||
44 | LP3943_PWM_OUT1, | ||
45 | LP3943_PWM_OUT2, | ||
46 | LP3943_PWM_OUT3, | ||
47 | LP3943_PWM_OUT4, | ||
48 | LP3943_PWM_OUT5, | ||
49 | LP3943_PWM_OUT6, | ||
50 | LP3943_PWM_OUT7, | ||
51 | LP3943_PWM_OUT8, | ||
52 | LP3943_PWM_OUT9, | ||
53 | LP3943_PWM_OUT10, | ||
54 | LP3943_PWM_OUT11, | ||
55 | LP3943_PWM_OUT12, | ||
56 | LP3943_PWM_OUT13, | ||
57 | LP3943_PWM_OUT14, | ||
58 | LP3943_PWM_OUT15, | ||
59 | }; | ||
60 | |||
61 | /* | ||
62 | * struct lp3943_pwm_map | ||
63 | * @output: Output pins which are mapped to each PWM channel | ||
64 | * @num_outputs: Number of outputs | ||
65 | */ | ||
66 | struct lp3943_pwm_map { | ||
67 | enum lp3943_pwm_output *output; | ||
68 | int num_outputs; | ||
69 | }; | ||
70 | |||
71 | /* | ||
72 | * struct lp3943_platform_data | ||
73 | * @pwms: Output channel definitions for PWM channel 0 and 1 | ||
74 | */ | ||
75 | struct lp3943_platform_data { | ||
76 | struct lp3943_pwm_map *pwms[LP3943_NUM_PWMS]; | ||
77 | }; | ||
78 | |||
79 | /* | ||
80 | * struct lp3943_reg_cfg | ||
81 | * @reg: Register address | ||
82 | * @mask: Register bit mask to be updated | ||
83 | * @shift: Register bit shift | ||
84 | */ | ||
85 | struct lp3943_reg_cfg { | ||
86 | u8 reg; | ||
87 | u8 mask; | ||
88 | u8 shift; | ||
89 | }; | ||
90 | |||
91 | /* | ||
92 | * struct lp3943 | ||
93 | * @dev: Parent device pointer | ||
94 | * @regmap: Used for I2C communication on accessing registers | ||
95 | * @pdata: LP3943 platform specific data | ||
96 | * @mux_cfg: Register configuration for pin MUX | ||
97 | * @pin_used: Bit mask for output pin used. | ||
98 | * This bitmask is used for pin assignment management. | ||
99 | * 1 = pin used, 0 = available. | ||
100 | * Only LSB 16 bits are used, but it is unsigned long type | ||
101 | * for atomic bitwise operations. | ||
102 | */ | ||
103 | struct lp3943 { | ||
104 | struct device *dev; | ||
105 | struct regmap *regmap; | ||
106 | struct lp3943_platform_data *pdata; | ||
107 | const struct lp3943_reg_cfg *mux_cfg; | ||
108 | unsigned long pin_used; | ||
109 | }; | ||
110 | |||
111 | int lp3943_read_byte(struct lp3943 *lp3943, u8 reg, u8 *read); | ||
112 | int lp3943_write_byte(struct lp3943 *lp3943, u8 reg, u8 data); | ||
113 | int lp3943_update_bits(struct lp3943 *lp3943, u8 reg, u8 mask, u8 data); | ||
114 | #endif | ||
diff --git a/include/linux/mfd/max14577-private.h b/include/linux/mfd/max14577-private.h new file mode 100644 index 000000000000..a3d0185196d3 --- /dev/null +++ b/include/linux/mfd/max14577-private.h | |||
@@ -0,0 +1,330 @@ | |||
1 | /* | ||
2 | * max14577-private.h - Common API for the Maxim 14577 internal sub chip | ||
3 | * | ||
4 | * Copyright (C) 2013 Samsung Electrnoics | ||
5 | * Chanwoo Choi <cw00.choi@samsung.com> | ||
6 | * Krzysztof Kozlowski <k.kozlowski@samsung.com> | ||
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 as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #ifndef __MAX14577_PRIVATE_H__ | ||
20 | #define __MAX14577_PRIVATE_H__ | ||
21 | |||
22 | #include <linux/i2c.h> | ||
23 | #include <linux/regmap.h> | ||
24 | |||
25 | #define MAX14577_REG_INVALID (0xff) | ||
26 | |||
27 | /* Slave addr = 0x4A: Interrupt */ | ||
28 | enum max14577_reg { | ||
29 | MAX14577_REG_DEVICEID = 0x00, | ||
30 | MAX14577_REG_INT1 = 0x01, | ||
31 | MAX14577_REG_INT2 = 0x02, | ||
32 | MAX14577_REG_INT3 = 0x03, | ||
33 | MAX14577_REG_STATUS1 = 0x04, | ||
34 | MAX14577_REG_STATUS2 = 0x05, | ||
35 | MAX14577_REG_STATUS3 = 0x06, | ||
36 | MAX14577_REG_INTMASK1 = 0x07, | ||
37 | MAX14577_REG_INTMASK2 = 0x08, | ||
38 | MAX14577_REG_INTMASK3 = 0x09, | ||
39 | MAX14577_REG_CDETCTRL1 = 0x0A, | ||
40 | MAX14577_REG_RFU = 0x0B, | ||
41 | MAX14577_REG_CONTROL1 = 0x0C, | ||
42 | MAX14577_REG_CONTROL2 = 0x0D, | ||
43 | MAX14577_REG_CONTROL3 = 0x0E, | ||
44 | MAX14577_REG_CHGCTRL1 = 0x0F, | ||
45 | MAX14577_REG_CHGCTRL2 = 0x10, | ||
46 | MAX14577_REG_CHGCTRL3 = 0x11, | ||
47 | MAX14577_REG_CHGCTRL4 = 0x12, | ||
48 | MAX14577_REG_CHGCTRL5 = 0x13, | ||
49 | MAX14577_REG_CHGCTRL6 = 0x14, | ||
50 | MAX14577_REG_CHGCTRL7 = 0x15, | ||
51 | |||
52 | MAX14577_REG_END, | ||
53 | }; | ||
54 | |||
55 | /* Slave addr = 0x4A: MUIC */ | ||
56 | enum max14577_muic_reg { | ||
57 | MAX14577_MUIC_REG_STATUS1 = 0x04, | ||
58 | MAX14577_MUIC_REG_STATUS2 = 0x05, | ||
59 | MAX14577_MUIC_REG_CONTROL1 = 0x0C, | ||
60 | MAX14577_MUIC_REG_CONTROL3 = 0x0E, | ||
61 | |||
62 | MAX14577_MUIC_REG_END, | ||
63 | }; | ||
64 | |||
65 | enum max14577_muic_charger_type { | ||
66 | MAX14577_CHARGER_TYPE_NONE = 0, | ||
67 | MAX14577_CHARGER_TYPE_USB, | ||
68 | MAX14577_CHARGER_TYPE_DOWNSTREAM_PORT, | ||
69 | MAX14577_CHARGER_TYPE_DEDICATED_CHG, | ||
70 | MAX14577_CHARGER_TYPE_SPECIAL_500MA, | ||
71 | MAX14577_CHARGER_TYPE_SPECIAL_1A, | ||
72 | MAX14577_CHARGER_TYPE_RESERVED, | ||
73 | MAX14577_CHARGER_TYPE_DEAD_BATTERY = 7, | ||
74 | }; | ||
75 | |||
76 | /* MAX14577 interrupts */ | ||
77 | #define INT1_ADC_MASK (0x1 << 0) | ||
78 | #define INT1_ADCLOW_MASK (0x1 << 1) | ||
79 | #define INT1_ADCERR_MASK (0x1 << 2) | ||
80 | |||
81 | #define INT2_CHGTYP_MASK (0x1 << 0) | ||
82 | #define INT2_CHGDETRUN_MASK (0x1 << 1) | ||
83 | #define INT2_DCDTMR_MASK (0x1 << 2) | ||
84 | #define INT2_DBCHG_MASK (0x1 << 3) | ||
85 | #define INT2_VBVOLT_MASK (0x1 << 4) | ||
86 | |||
87 | #define INT3_EOC_MASK (0x1 << 0) | ||
88 | #define INT3_CGMBC_MASK (0x1 << 1) | ||
89 | #define INT3_OVP_MASK (0x1 << 2) | ||
90 | #define INT3_MBCCHGERR_MASK (0x1 << 3) | ||
91 | |||
92 | /* MAX14577 DEVICE ID register */ | ||
93 | #define DEVID_VENDORID_SHIFT 0 | ||
94 | #define DEVID_DEVICEID_SHIFT 3 | ||
95 | #define DEVID_VENDORID_MASK (0x07 << DEVID_VENDORID_SHIFT) | ||
96 | #define DEVID_DEVICEID_MASK (0x1f << DEVID_DEVICEID_SHIFT) | ||
97 | |||
98 | /* MAX14577 STATUS1 register */ | ||
99 | #define STATUS1_ADC_SHIFT 0 | ||
100 | #define STATUS1_ADCLOW_SHIFT 5 | ||
101 | #define STATUS1_ADCERR_SHIFT 6 | ||
102 | #define STATUS1_ADC_MASK (0x1f << STATUS1_ADC_SHIFT) | ||
103 | #define STATUS1_ADCLOW_MASK (0x1 << STATUS1_ADCLOW_SHIFT) | ||
104 | #define STATUS1_ADCERR_MASK (0x1 << STATUS1_ADCERR_SHIFT) | ||
105 | |||
106 | /* MAX14577 STATUS2 register */ | ||
107 | #define STATUS2_CHGTYP_SHIFT 0 | ||
108 | #define STATUS2_CHGDETRUN_SHIFT 3 | ||
109 | #define STATUS2_DCDTMR_SHIFT 4 | ||
110 | #define STATUS2_DBCHG_SHIFT 5 | ||
111 | #define STATUS2_VBVOLT_SHIFT 6 | ||
112 | #define STATUS2_CHGTYP_MASK (0x7 << STATUS2_CHGTYP_SHIFT) | ||
113 | #define STATUS2_CHGDETRUN_MASK (0x1 << STATUS2_CHGDETRUN_SHIFT) | ||
114 | #define STATUS2_DCDTMR_MASK (0x1 << STATUS2_DCDTMR_SHIFT) | ||
115 | #define STATUS2_DBCHG_MASK (0x1 << STATUS2_DBCHG_SHIFT) | ||
116 | #define STATUS2_VBVOLT_MASK (0x1 << STATUS2_VBVOLT_SHIFT) | ||
117 | |||
118 | /* MAX14577 CONTROL1 register */ | ||
119 | #define COMN1SW_SHIFT 0 | ||
120 | #define COMP2SW_SHIFT 3 | ||
121 | #define MICEN_SHIFT 6 | ||
122 | #define IDBEN_SHIFT 7 | ||
123 | #define COMN1SW_MASK (0x7 << COMN1SW_SHIFT) | ||
124 | #define COMP2SW_MASK (0x7 << COMP2SW_SHIFT) | ||
125 | #define MICEN_MASK (0x1 << MICEN_SHIFT) | ||
126 | #define IDBEN_MASK (0x1 << IDBEN_SHIFT) | ||
127 | #define CLEAR_IDBEN_MICEN_MASK (COMN1SW_MASK | COMP2SW_MASK) | ||
128 | #define CTRL1_SW_USB ((1 << COMP2SW_SHIFT) \ | ||
129 | | (1 << COMN1SW_SHIFT)) | ||
130 | #define CTRL1_SW_AUDIO ((2 << COMP2SW_SHIFT) \ | ||
131 | | (2 << COMN1SW_SHIFT)) | ||
132 | #define CTRL1_SW_UART ((3 << COMP2SW_SHIFT) \ | ||
133 | | (3 << COMN1SW_SHIFT)) | ||
134 | #define CTRL1_SW_OPEN ((0 << COMP2SW_SHIFT) \ | ||
135 | | (0 << COMN1SW_SHIFT)) | ||
136 | |||
137 | /* MAX14577 CONTROL2 register */ | ||
138 | #define CTRL2_LOWPWR_SHIFT (0) | ||
139 | #define CTRL2_ADCEN_SHIFT (1) | ||
140 | #define CTRL2_CPEN_SHIFT (2) | ||
141 | #define CTRL2_SFOUTASRT_SHIFT (3) | ||
142 | #define CTRL2_SFOUTORD_SHIFT (4) | ||
143 | #define CTRL2_ACCDET_SHIFT (5) | ||
144 | #define CTRL2_USBCPINT_SHIFT (6) | ||
145 | #define CTRL2_RCPS_SHIFT (7) | ||
146 | #define CTRL2_LOWPWR_MASK (0x1 << CTRL2_LOWPWR_SHIFT) | ||
147 | #define CTRL2_ADCEN_MASK (0x1 << CTRL2_ADCEN_SHIFT) | ||
148 | #define CTRL2_CPEN_MASK (0x1 << CTRL2_CPEN_SHIFT) | ||
149 | #define CTRL2_SFOUTASRT_MASK (0x1 << CTRL2_SFOUTASRT_SHIFT) | ||
150 | #define CTRL2_SFOUTORD_MASK (0x1 << CTRL2_SFOUTORD_SHIFT) | ||
151 | #define CTRL2_ACCDET_MASK (0x1 << CTRL2_ACCDET_SHIFT) | ||
152 | #define CTRL2_USBCPINT_MASK (0x1 << CTRL2_USBCPINT_SHIFT) | ||
153 | #define CTRL2_RCPS_MASK (0x1 << CTR2_RCPS_SHIFT) | ||
154 | |||
155 | #define CTRL2_CPEN1_LOWPWR0 ((1 << CTRL2_CPEN_SHIFT) | \ | ||
156 | (0 << CTRL2_LOWPWR_SHIFT)) | ||
157 | #define CTRL2_CPEN0_LOWPWR1 ((0 << CTRL2_CPEN_SHIFT) | \ | ||
158 | (1 << CTRL2_LOWPWR_SHIFT)) | ||
159 | |||
160 | /* MAX14577 CONTROL3 register */ | ||
161 | #define CTRL3_JIGSET_SHIFT 0 | ||
162 | #define CTRL3_BOOTSET_SHIFT 2 | ||
163 | #define CTRL3_ADCDBSET_SHIFT 4 | ||
164 | #define CTRL3_JIGSET_MASK (0x3 << CTRL3_JIGSET_SHIFT) | ||
165 | #define CTRL3_BOOTSET_MASK (0x3 << CTRL3_BOOTSET_SHIFT) | ||
166 | #define CTRL3_ADCDBSET_MASK (0x3 << CTRL3_ADCDBSET_SHIFT) | ||
167 | |||
168 | /* Slave addr = 0x4A: Charger */ | ||
169 | enum max14577_charger_reg { | ||
170 | MAX14577_CHG_REG_STATUS3 = 0x06, | ||
171 | MAX14577_CHG_REG_CHG_CTRL1 = 0x0F, | ||
172 | MAX14577_CHG_REG_CHG_CTRL2 = 0x10, | ||
173 | MAX14577_CHG_REG_CHG_CTRL3 = 0x11, | ||
174 | MAX14577_CHG_REG_CHG_CTRL4 = 0x12, | ||
175 | MAX14577_CHG_REG_CHG_CTRL5 = 0x13, | ||
176 | MAX14577_CHG_REG_CHG_CTRL6 = 0x14, | ||
177 | MAX14577_CHG_REG_CHG_CTRL7 = 0x15, | ||
178 | |||
179 | MAX14577_CHG_REG_END, | ||
180 | }; | ||
181 | |||
182 | /* MAX14577 STATUS3 register */ | ||
183 | #define STATUS3_EOC_SHIFT 0 | ||
184 | #define STATUS3_CGMBC_SHIFT 1 | ||
185 | #define STATUS3_OVP_SHIFT 2 | ||
186 | #define STATUS3_MBCCHGERR_SHIFT 3 | ||
187 | #define STATUS3_EOC_MASK (0x1 << STATUS3_EOC_SHIFT) | ||
188 | #define STATUS3_CGMBC_MASK (0x1 << STATUS3_CGMBC_SHIFT) | ||
189 | #define STATUS3_OVP_MASK (0x1 << STATUS3_OVP_SHIFT) | ||
190 | #define STATUS3_MBCCHGERR_MASK (0x1 << STATUS3_MBCCHGERR_SHIFT) | ||
191 | |||
192 | /* MAX14577 CDETCTRL1 register */ | ||
193 | #define CDETCTRL1_CHGDETEN_SHIFT 0 | ||
194 | #define CDETCTRL1_CHGTYPMAN_SHIFT 1 | ||
195 | #define CDETCTRL1_DCDEN_SHIFT 2 | ||
196 | #define CDETCTRL1_DCD2SCT_SHIFT 3 | ||
197 | #define CDETCTRL1_DCHKTM_SHIFT 4 | ||
198 | #define CDETCTRL1_DBEXIT_SHIFT 5 | ||
199 | #define CDETCTRL1_DBIDLE_SHIFT 6 | ||
200 | #define CDETCTRL1_CDPDET_SHIFT 7 | ||
201 | #define CDETCTRL1_CHGDETEN_MASK (0x1 << CDETCTRL1_CHGDETEN_SHIFT) | ||
202 | #define CDETCTRL1_CHGTYPMAN_MASK (0x1 << CDETCTRL1_CHGTYPMAN_SHIFT) | ||
203 | #define CDETCTRL1_DCDEN_MASK (0x1 << CDETCTRL1_DCDEN_SHIFT) | ||
204 | #define CDETCTRL1_DCD2SCT_MASK (0x1 << CDETCTRL1_DCD2SCT_SHIFT) | ||
205 | #define CDETCTRL1_DCHKTM_MASK (0x1 << CDETCTRL1_DCHKTM_SHIFT) | ||
206 | #define CDETCTRL1_DBEXIT_MASK (0x1 << CDETCTRL1_DBEXIT_SHIFT) | ||
207 | #define CDETCTRL1_DBIDLE_MASK (0x1 << CDETCTRL1_DBIDLE_SHIFT) | ||
208 | #define CDETCTRL1_CDPDET_MASK (0x1 << CDETCTRL1_CDPDET_SHIFT) | ||
209 | |||
210 | /* MAX14577 CHGCTRL1 register */ | ||
211 | #define CHGCTRL1_TCHW_SHIFT 4 | ||
212 | #define CHGCTRL1_TCHW_MASK (0x7 << CHGCTRL1_TCHW_SHIFT) | ||
213 | |||
214 | /* MAX14577 CHGCTRL2 register */ | ||
215 | #define CHGCTRL2_MBCHOSTEN_SHIFT 6 | ||
216 | #define CHGCTRL2_MBCHOSTEN_MASK (0x1 << CHGCTRL2_MBCHOSTEN_SHIFT) | ||
217 | #define CHGCTRL2_VCHGR_RC_SHIFT 7 | ||
218 | #define CHGCTRL2_VCHGR_RC_MASK (0x1 << CHGCTRL2_VCHGR_RC_SHIFT) | ||
219 | |||
220 | /* MAX14577 CHGCTRL3 register */ | ||
221 | #define CHGCTRL3_MBCCVWRC_SHIFT 0 | ||
222 | #define CHGCTRL3_MBCCVWRC_MASK (0xf << CHGCTRL3_MBCCVWRC_SHIFT) | ||
223 | |||
224 | /* MAX14577 CHGCTRL4 register */ | ||
225 | #define CHGCTRL4_MBCICHWRCH_SHIFT 0 | ||
226 | #define CHGCTRL4_MBCICHWRCH_MASK (0xf << CHGCTRL4_MBCICHWRCH_SHIFT) | ||
227 | #define CHGCTRL4_MBCICHWRCL_SHIFT 4 | ||
228 | #define CHGCTRL4_MBCICHWRCL_MASK (0x1 << CHGCTRL4_MBCICHWRCL_SHIFT) | ||
229 | |||
230 | /* MAX14577 CHGCTRL5 register */ | ||
231 | #define CHGCTRL5_EOCS_SHIFT 0 | ||
232 | #define CHGCTRL5_EOCS_MASK (0xf << CHGCTRL5_EOCS_SHIFT) | ||
233 | |||
234 | /* MAX14577 CHGCTRL6 register */ | ||
235 | #define CHGCTRL6_AUTOSTOP_SHIFT 5 | ||
236 | #define CHGCTRL6_AUTOSTOP_MASK (0x1 << CHGCTRL6_AUTOSTOP_SHIFT) | ||
237 | |||
238 | /* MAX14577 CHGCTRL7 register */ | ||
239 | #define CHGCTRL7_OTPCGHCVS_SHIFT 0 | ||
240 | #define CHGCTRL7_OTPCGHCVS_MASK (0x3 << CHGCTRL7_OTPCGHCVS_SHIFT) | ||
241 | |||
242 | /* MAX14577 regulator current limits (as in CHGCTRL4 register), uA */ | ||
243 | #define MAX14577_REGULATOR_CURRENT_LIMIT_MIN 90000 | ||
244 | #define MAX14577_REGULATOR_CURRENT_LIMIT_HIGH_START 200000 | ||
245 | #define MAX14577_REGULATOR_CURRENT_LIMIT_HIGH_STEP 50000 | ||
246 | #define MAX14577_REGULATOR_CURRENT_LIMIT_MAX 950000 | ||
247 | |||
248 | /* MAX14577 regulator SFOUT LDO voltage, fixed, uV */ | ||
249 | #define MAX14577_REGULATOR_SAFEOUT_VOLTAGE 4900000 | ||
250 | |||
251 | enum max14577_irq_source { | ||
252 | MAX14577_IRQ_INT1 = 0, | ||
253 | MAX14577_IRQ_INT2, | ||
254 | MAX14577_IRQ_INT3, | ||
255 | |||
256 | MAX14577_IRQ_REGS_NUM, | ||
257 | }; | ||
258 | |||
259 | enum max14577_irq { | ||
260 | /* INT1 */ | ||
261 | MAX14577_IRQ_INT1_ADC, | ||
262 | MAX14577_IRQ_INT1_ADCLOW, | ||
263 | MAX14577_IRQ_INT1_ADCERR, | ||
264 | |||
265 | /* INT2 */ | ||
266 | MAX14577_IRQ_INT2_CHGTYP, | ||
267 | MAX14577_IRQ_INT2_CHGDETRUN, | ||
268 | MAX14577_IRQ_INT2_DCDTMR, | ||
269 | MAX14577_IRQ_INT2_DBCHG, | ||
270 | MAX14577_IRQ_INT2_VBVOLT, | ||
271 | |||
272 | /* INT3 */ | ||
273 | MAX14577_IRQ_INT3_EOC, | ||
274 | MAX14577_IRQ_INT3_CGMBC, | ||
275 | MAX14577_IRQ_INT3_OVP, | ||
276 | MAX14577_IRQ_INT3_MBCCHGERR, | ||
277 | |||
278 | MAX14577_IRQ_NUM, | ||
279 | }; | ||
280 | |||
281 | struct max14577 { | ||
282 | struct device *dev; | ||
283 | struct i2c_client *i2c; /* Slave addr = 0x4A */ | ||
284 | |||
285 | struct regmap *regmap; | ||
286 | |||
287 | struct regmap_irq_chip_data *irq_data; | ||
288 | int irq; | ||
289 | |||
290 | /* Device ID */ | ||
291 | u8 vendor_id; /* Vendor Identification */ | ||
292 | u8 device_id; /* Chip Version */ | ||
293 | }; | ||
294 | |||
295 | /* MAX14577 shared regmap API function */ | ||
296 | static inline int max14577_read_reg(struct regmap *map, u8 reg, u8 *dest) | ||
297 | { | ||
298 | unsigned int val; | ||
299 | int ret; | ||
300 | |||
301 | ret = regmap_read(map, reg, &val); | ||
302 | *dest = val; | ||
303 | |||
304 | return ret; | ||
305 | } | ||
306 | |||
307 | static inline int max14577_bulk_read(struct regmap *map, u8 reg, u8 *buf, | ||
308 | int count) | ||
309 | { | ||
310 | return regmap_bulk_read(map, reg, buf, count); | ||
311 | } | ||
312 | |||
313 | static inline int max14577_write_reg(struct regmap *map, u8 reg, u8 value) | ||
314 | { | ||
315 | return regmap_write(map, reg, value); | ||
316 | } | ||
317 | |||
318 | static inline int max14577_bulk_write(struct regmap *map, u8 reg, u8 *buf, | ||
319 | int count) | ||
320 | { | ||
321 | return regmap_bulk_write(map, reg, buf, count); | ||
322 | } | ||
323 | |||
324 | static inline int max14577_update_reg(struct regmap *map, u8 reg, u8 mask, | ||
325 | u8 val) | ||
326 | { | ||
327 | return regmap_update_bits(map, reg, mask, val); | ||
328 | } | ||
329 | |||
330 | #endif /* __MAX14577_PRIVATE_H__ */ | ||
diff --git a/include/linux/mfd/max14577.h b/include/linux/mfd/max14577.h new file mode 100644 index 000000000000..247b021dfaaf --- /dev/null +++ b/include/linux/mfd/max14577.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * max14577.h - Driver for the Maxim 14577 | ||
3 | * | ||
4 | * Copyright (C) 2013 Samsung Electrnoics | ||
5 | * Chanwoo Choi <cw00.choi@samsung.com> | ||
6 | * Krzysztof Kozlowski <k.kozlowski@samsung.com> | ||
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 as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * This driver is based on max8997.h | ||
19 | * | ||
20 | * MAX14577 has MUIC, Charger devices. | ||
21 | * The devices share the same I2C bus and interrupt line | ||
22 | * included in this mfd driver. | ||
23 | */ | ||
24 | |||
25 | #ifndef __MAX14577_H__ | ||
26 | #define __MAX14577_H__ | ||
27 | |||
28 | #include <linux/mfd/max14577-private.h> | ||
29 | #include <linux/regulator/consumer.h> | ||
30 | |||
31 | /* | ||
32 | * MAX14577 Regulator | ||
33 | */ | ||
34 | |||
35 | /* MAX14577 regulator IDs */ | ||
36 | enum max14577_regulators { | ||
37 | MAX14577_SAFEOUT = 0, | ||
38 | MAX14577_CHARGER, | ||
39 | |||
40 | MAX14577_REG_MAX, | ||
41 | }; | ||
42 | |||
43 | struct max14577_regulator_platform_data { | ||
44 | int id; | ||
45 | struct regulator_init_data *initdata; | ||
46 | struct device_node *of_node; | ||
47 | }; | ||
48 | |||
49 | /* | ||
50 | * MAX14577 MFD platform data | ||
51 | */ | ||
52 | struct max14577_platform_data { | ||
53 | /* IRQ */ | ||
54 | int irq_base; | ||
55 | |||
56 | /* current control GPIOs */ | ||
57 | int gpio_pogo_vbatt_en; | ||
58 | int gpio_pogo_vbus_en; | ||
59 | |||
60 | /* current control GPIO control function */ | ||
61 | int (*set_gpio_pogo_vbatt_en) (int gpio_val); | ||
62 | int (*set_gpio_pogo_vbus_en) (int gpio_val); | ||
63 | |||
64 | int (*set_gpio_pogo_cb) (int new_dev); | ||
65 | |||
66 | struct max14577_regulator_platform_data *regulators; | ||
67 | }; | ||
68 | |||
69 | #endif /* __MAX14577_H__ */ | ||
diff --git a/include/linux/mfd/max77686-private.h b/include/linux/mfd/max77686-private.h index d327d4971e4f..8c75a9c8dfab 100644 --- a/include/linux/mfd/max77686-private.h +++ b/include/linux/mfd/max77686-private.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * max77686.h - Voltage regulator driver for the Maxim 77686 | 2 | * max77686-private.h - Voltage regulator driver for the Maxim 77686 |
3 | * | 3 | * |
4 | * Copyright (C) 2012 Samsung Electrnoics | 4 | * Copyright (C) 2012 Samsung Electrnoics |
5 | * Chiwoong Byun <woong.byun@samsung.com> | 5 | * Chiwoong Byun <woong.byun@samsung.com> |
diff --git a/include/linux/mfd/max8997-private.h b/include/linux/mfd/max8997-private.h index fb465dfbb59e..ad1ae7f345ad 100644 --- a/include/linux/mfd/max8997-private.h +++ b/include/linux/mfd/max8997-private.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * max8997.h - Voltage regulator driver for the Maxim 8997 | 2 | * max8997-private.h - Voltage regulator driver for the Maxim 8997 |
3 | * | 3 | * |
4 | * Copyright (C) 2010 Samsung Electrnoics | 4 | * Copyright (C) 2010 Samsung Electrnoics |
5 | * MyungJoo Ham <myungjoo.ham@samsung.com> | 5 | * MyungJoo Ham <myungjoo.ham@samsung.com> |
diff --git a/include/linux/mfd/max8998-private.h b/include/linux/mfd/max8998-private.h index 84844e0a5704..4ecb24b4b863 100644 --- a/include/linux/mfd/max8998-private.h +++ b/include/linux/mfd/max8998-private.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * max8998.h - Voltage regulator driver for the Maxim 8998 | 2 | * max8998-private.h - Voltage regulator driver for the Maxim 8998 |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2010 Samsung Electrnoics | 4 | * Copyright (C) 2009-2010 Samsung Electrnoics |
5 | * Kyungmin Park <kyungmin.park@samsung.com> | 5 | * Kyungmin Park <kyungmin.park@samsung.com> |
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h index 67c17b5a6f44..ac39d910e70b 100644 --- a/include/linux/mfd/mc13xxx.h +++ b/include/linux/mfd/mc13xxx.h | |||
@@ -21,8 +21,6 @@ int mc13xxx_reg_write(struct mc13xxx *mc13xxx, unsigned int offset, u32 val); | |||
21 | int mc13xxx_reg_rmw(struct mc13xxx *mc13xxx, unsigned int offset, | 21 | int mc13xxx_reg_rmw(struct mc13xxx *mc13xxx, unsigned int offset, |
22 | u32 mask, u32 val); | 22 | u32 mask, u32 val); |
23 | 23 | ||
24 | int mc13xxx_get_flags(struct mc13xxx *mc13xxx); | ||
25 | |||
26 | int mc13xxx_irq_request(struct mc13xxx *mc13xxx, int irq, | 24 | int mc13xxx_irq_request(struct mc13xxx *mc13xxx, int irq, |
27 | irq_handler_t handler, const char *name, void *dev); | 25 | irq_handler_t handler, const char *name, void *dev); |
28 | int mc13xxx_irq_request_nounmask(struct mc13xxx *mc13xxx, int irq, | 26 | int mc13xxx_irq_request_nounmask(struct mc13xxx *mc13xxx, int irq, |
@@ -112,9 +110,6 @@ struct mc13xxx_led_platform_data { | |||
112 | int id; | 110 | int id; |
113 | const char *name; | 111 | const char *name; |
114 | const char *default_trigger; | 112 | const char *default_trigger; |
115 | |||
116 | /* Three or two bits current selection depending on the led */ | ||
117 | char max_current; | ||
118 | }; | 113 | }; |
119 | 114 | ||
120 | #define MAX_LED_CONTROL_REGS 6 | 115 | #define MAX_LED_CONTROL_REGS 6 |
@@ -123,7 +118,7 @@ struct mc13xxx_leds_platform_data { | |||
123 | struct mc13xxx_led_platform_data *led; | 118 | struct mc13xxx_led_platform_data *led; |
124 | int num_leds; | 119 | int num_leds; |
125 | 120 | ||
126 | /* LED Control 0 */ | 121 | /* MC13783 LED Control 0 */ |
127 | #define MC13783_LED_C0_ENABLE (1 << 0) | 122 | #define MC13783_LED_C0_ENABLE (1 << 0) |
128 | #define MC13783_LED_C0_TRIODE_MD (1 << 7) | 123 | #define MC13783_LED_C0_TRIODE_MD (1 << 7) |
129 | #define MC13783_LED_C0_TRIODE_AD (1 << 8) | 124 | #define MC13783_LED_C0_TRIODE_AD (1 << 8) |
@@ -131,21 +126,43 @@ struct mc13xxx_leds_platform_data { | |||
131 | #define MC13783_LED_C0_BOOST (1 << 10) | 126 | #define MC13783_LED_C0_BOOST (1 << 10) |
132 | #define MC13783_LED_C0_ABMODE(x) (((x) & 0x7) << 11) | 127 | #define MC13783_LED_C0_ABMODE(x) (((x) & 0x7) << 11) |
133 | #define MC13783_LED_C0_ABREF(x) (((x) & 0x3) << 14) | 128 | #define MC13783_LED_C0_ABREF(x) (((x) & 0x3) << 14) |
134 | /* LED Control 1 */ | 129 | /* MC13783 LED Control 1 */ |
135 | #define MC13783_LED_C1_TC1HALF (1 << 18) | 130 | #define MC13783_LED_C1_TC1HALF (1 << 18) |
136 | #define MC13783_LED_C1_SLEWLIM (1 << 23) | 131 | #define MC13783_LED_C1_SLEWLIM (1 << 23) |
137 | /* LED Control 2 */ | 132 | /* MC13783 LED Control 2 */ |
133 | #define MC13783_LED_C2_CURRENT_MD(x) (((x) & 0x7) << 0) | ||
134 | #define MC13783_LED_C2_CURRENT_AD(x) (((x) & 0x7) << 3) | ||
135 | #define MC13783_LED_C2_CURRENT_KP(x) (((x) & 0x7) << 6) | ||
138 | #define MC13783_LED_C2_PERIOD(x) (((x) & 0x3) << 21) | 136 | #define MC13783_LED_C2_PERIOD(x) (((x) & 0x3) << 21) |
139 | #define MC13783_LED_C2_SLEWLIM (1 << 23) | 137 | #define MC13783_LED_C2_SLEWLIM (1 << 23) |
140 | /* LED Control 3 */ | 138 | /* MC13783 LED Control 3 */ |
139 | #define MC13783_LED_C3_CURRENT_R1(x) (((x) & 0x3) << 0) | ||
140 | #define MC13783_LED_C3_CURRENT_G1(x) (((x) & 0x3) << 2) | ||
141 | #define MC13783_LED_C3_CURRENT_B1(x) (((x) & 0x3) << 4) | ||
141 | #define MC13783_LED_C3_PERIOD(x) (((x) & 0x3) << 21) | 142 | #define MC13783_LED_C3_PERIOD(x) (((x) & 0x3) << 21) |
142 | #define MC13783_LED_C3_TRIODE_TC1 (1 << 23) | 143 | #define MC13783_LED_C3_TRIODE_TC1 (1 << 23) |
143 | /* LED Control 4 */ | 144 | /* MC13783 LED Control 4 */ |
145 | #define MC13783_LED_C4_CURRENT_R2(x) (((x) & 0x3) << 0) | ||
146 | #define MC13783_LED_C4_CURRENT_G2(x) (((x) & 0x3) << 2) | ||
147 | #define MC13783_LED_C4_CURRENT_B2(x) (((x) & 0x3) << 4) | ||
144 | #define MC13783_LED_C4_PERIOD(x) (((x) & 0x3) << 21) | 148 | #define MC13783_LED_C4_PERIOD(x) (((x) & 0x3) << 21) |
145 | #define MC13783_LED_C4_TRIODE_TC2 (1 << 23) | 149 | #define MC13783_LED_C4_TRIODE_TC2 (1 << 23) |
146 | /* LED Control 5 */ | 150 | /* MC13783 LED Control 5 */ |
151 | #define MC13783_LED_C5_CURRENT_R3(x) (((x) & 0x3) << 0) | ||
152 | #define MC13783_LED_C5_CURRENT_G3(x) (((x) & 0x3) << 2) | ||
153 | #define MC13783_LED_C5_CURRENT_B3(x) (((x) & 0x3) << 4) | ||
147 | #define MC13783_LED_C5_PERIOD(x) (((x) & 0x3) << 21) | 154 | #define MC13783_LED_C5_PERIOD(x) (((x) & 0x3) << 21) |
148 | #define MC13783_LED_C5_TRIODE_TC3 (1 << 23) | 155 | #define MC13783_LED_C5_TRIODE_TC3 (1 << 23) |
156 | /* MC13892 LED Control 0 */ | ||
157 | #define MC13892_LED_C0_CURRENT_MD(x) (((x) & 0x7) << 9) | ||
158 | #define MC13892_LED_C0_CURRENT_AD(x) (((x) & 0x7) << 21) | ||
159 | /* MC13892 LED Control 1 */ | ||
160 | #define MC13892_LED_C1_CURRENT_KP(x) (((x) & 0x7) << 9) | ||
161 | /* MC13892 LED Control 2 */ | ||
162 | #define MC13892_LED_C2_CURRENT_R(x) (((x) & 0x7) << 9) | ||
163 | #define MC13892_LED_C2_CURRENT_G(x) (((x) & 0x7) << 21) | ||
164 | /* MC13892 LED Control 3 */ | ||
165 | #define MC13892_LED_C3_CURRENT_B(x) (((x) & 0x7) << 9) | ||
149 | u32 led_control[MAX_LED_CONTROL_REGS]; | 166 | u32 led_control[MAX_LED_CONTROL_REGS]; |
150 | }; | 167 | }; |
151 | 168 | ||
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index cab2dd279076..41c9bde410c5 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h | |||
@@ -59,12 +59,6 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic); | |||
59 | void sec_irq_exit(struct sec_pmic_dev *sec_pmic); | 59 | void sec_irq_exit(struct sec_pmic_dev *sec_pmic); |
60 | int sec_irq_resume(struct sec_pmic_dev *sec_pmic); | 60 | int sec_irq_resume(struct sec_pmic_dev *sec_pmic); |
61 | 61 | ||
62 | extern int sec_reg_read(struct sec_pmic_dev *sec_pmic, u8 reg, void *dest); | ||
63 | extern int sec_bulk_read(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf); | ||
64 | extern int sec_reg_write(struct sec_pmic_dev *sec_pmic, u8 reg, u8 value); | ||
65 | extern int sec_bulk_write(struct sec_pmic_dev *sec_pmic, u8 reg, int count, u8 *buf); | ||
66 | extern int sec_reg_update(struct sec_pmic_dev *sec_pmic, u8 reg, u8 val, u8 mask); | ||
67 | |||
68 | struct sec_platform_data { | 62 | struct sec_platform_data { |
69 | struct sec_regulator_data *regulators; | 63 | struct sec_regulator_data *regulators; |
70 | struct sec_opmode_data *opmode; | 64 | struct sec_opmode_data *opmode; |
diff --git a/include/linux/mfd/samsung/s5m8767.h b/include/linux/mfd/samsung/s5m8767.h index 306a95fc558c..2ab0b0f03641 100644 --- a/include/linux/mfd/samsung/s5m8767.h +++ b/include/linux/mfd/samsung/s5m8767.h | |||
@@ -183,6 +183,22 @@ enum s5m8767_regulators { | |||
183 | S5M8767_REG_MAX, | 183 | S5M8767_REG_MAX, |
184 | }; | 184 | }; |
185 | 185 | ||
186 | #define S5M8767_ENCTRL_SHIFT 6 | 186 | #define S5M8767_ENCTRL_SHIFT 6 |
187 | #define S5M8767_ENCTRL_MASK (0x3 << S5M8767_ENCTRL_SHIFT) | ||
188 | |||
189 | /* | ||
190 | * Values for BUCK_RAMP field in DVS_RAMP register, matching raw values | ||
191 | * in mV/us. | ||
192 | */ | ||
193 | enum s5m8767_dvs_buck_ramp_values { | ||
194 | S5M8767_DVS_BUCK_RAMP_5 = 0x4, | ||
195 | S5M8767_DVS_BUCK_RAMP_10 = 0x9, | ||
196 | S5M8767_DVS_BUCK_RAMP_12_5 = 0xb, | ||
197 | S5M8767_DVS_BUCK_RAMP_25 = 0xd, | ||
198 | S5M8767_DVS_BUCK_RAMP_50 = 0xe, | ||
199 | S5M8767_DVS_BUCK_RAMP_100 = 0xf, | ||
200 | }; | ||
201 | #define S5M8767_DVS_BUCK_RAMP_SHIFT 4 | ||
202 | #define S5M8767_DVS_BUCK_RAMP_MASK (0xf << S5M8767_DVS_BUCK_RAMP_SHIFT) | ||
187 | 203 | ||
188 | #endif /* __LINUX_MFD_S5M8767_H */ | 204 | #endif /* __LINUX_MFD_S5M8767_H */ |
diff --git a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h index b6d36b38b99c..866e355fa409 100644 --- a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h +++ b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h | |||
@@ -212,6 +212,7 @@ | |||
212 | #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU1_DI1 (0x1 << 4) | 212 | #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU1_DI1 (0x1 << 4) |
213 | #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU2_DI0 (0x2 << 4) | 213 | #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU2_DI0 (0x2 << 4) |
214 | #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU2_DI1 (0x3 << 4) | 214 | #define IMX6Q_GPR3_MIPI_MUX_CTL_IPU2_DI1 (0x3 << 4) |
215 | #define IMX6Q_GPR3_HDMI_MUX_CTL_SHIFT 2 | ||
215 | #define IMX6Q_GPR3_HDMI_MUX_CTL_MASK (0x3 << 2) | 216 | #define IMX6Q_GPR3_HDMI_MUX_CTL_MASK (0x3 << 2) |
216 | #define IMX6Q_GPR3_HDMI_MUX_CTL_IPU1_DI0 (0x0 << 2) | 217 | #define IMX6Q_GPR3_HDMI_MUX_CTL_IPU1_DI0 (0x0 << 2) |
217 | #define IMX6Q_GPR3_HDMI_MUX_CTL_IPU1_DI1 (0x1 << 2) | 218 | #define IMX6Q_GPR3_HDMI_MUX_CTL_IPU1_DI1 (0x1 << 2) |
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h index d498d98f0c2c..fb96c84dada5 100644 --- a/include/linux/mfd/ti_am335x_tscadc.h +++ b/include/linux/mfd/ti_am335x_tscadc.h | |||
@@ -159,6 +159,9 @@ struct ti_tscadc_dev { | |||
159 | int adc_cell; /* -1 if not used */ | 159 | int adc_cell; /* -1 if not used */ |
160 | struct mfd_cell cells[TSCADC_CELLS]; | 160 | struct mfd_cell cells[TSCADC_CELLS]; |
161 | u32 reg_se_cache; | 161 | u32 reg_se_cache; |
162 | bool adc_waiting; | ||
163 | bool adc_in_use; | ||
164 | wait_queue_head_t reg_se_wait; | ||
162 | spinlock_t reg_lock; | 165 | spinlock_t reg_lock; |
163 | unsigned int clk_div; | 166 | unsigned int clk_div; |
164 | 167 | ||
@@ -176,8 +179,9 @@ static inline struct ti_tscadc_dev *ti_tscadc_dev_get(struct platform_device *p) | |||
176 | return *tscadc_dev; | 179 | return *tscadc_dev; |
177 | } | 180 | } |
178 | 181 | ||
179 | void am335x_tsc_se_update(struct ti_tscadc_dev *tsadc); | 182 | void am335x_tsc_se_set_cache(struct ti_tscadc_dev *tsadc, u32 val); |
180 | void am335x_tsc_se_set(struct ti_tscadc_dev *tsadc, u32 val); | 183 | void am335x_tsc_se_set_once(struct ti_tscadc_dev *tsadc, u32 val); |
181 | void am335x_tsc_se_clr(struct ti_tscadc_dev *tsadc, u32 val); | 184 | void am335x_tsc_se_clr(struct ti_tscadc_dev *tsadc, u32 val); |
185 | void am335x_tsc_se_adc_done(struct ti_tscadc_dev *tsadc); | ||
182 | 186 | ||
183 | #endif | 187 | #endif |
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index b22883d60500..8f6f2e91e7ae 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h | |||
@@ -76,6 +76,13 @@ | |||
76 | */ | 76 | */ |
77 | #define TMIO_MMC_USE_GPIO_CD (1 << 5) | 77 | #define TMIO_MMC_USE_GPIO_CD (1 << 5) |
78 | 78 | ||
79 | /* | ||
80 | * Some controllers doesn't have over 0x100 register. | ||
81 | * it is used to checking accessibility of | ||
82 | * CTL_SD_CARD_CLK_CTL / CTL_CLK_AND_WAIT_CTL | ||
83 | */ | ||
84 | #define TMIO_MMC_HAVE_HIGH_REG (1 << 6) | ||
85 | |||
79 | int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); | 86 | int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); |
80 | int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base); | 87 | int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base); |
81 | void tmio_core_mmc_pwr(void __iomem *cnf, int shift, int state); | 88 | void tmio_core_mmc_pwr(void __iomem *cnf, int shift, int state); |
@@ -102,6 +109,7 @@ struct tmio_mmc_data { | |||
102 | unsigned long capabilities; | 109 | unsigned long capabilities; |
103 | unsigned long capabilities2; | 110 | unsigned long capabilities2; |
104 | unsigned long flags; | 111 | unsigned long flags; |
112 | unsigned long bus_shift; | ||
105 | u32 ocr_mask; /* available voltages */ | 113 | u32 ocr_mask; /* available voltages */ |
106 | struct tmio_mmc_dma *dma; | 114 | struct tmio_mmc_dma *dma; |
107 | struct device *dev; | 115 | struct device *dev; |
diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h index 87994542573b..cbecec2e353a 100644 --- a/include/linux/mfd/tps6586x.h +++ b/include/linux/mfd/tps6586x.h | |||
@@ -13,6 +13,12 @@ | |||
13 | #define TPS6586X_SLEW_RATE_SET 0x08 | 13 | #define TPS6586X_SLEW_RATE_SET 0x08 |
14 | #define TPS6586X_SLEW_RATE_MASK 0x07 | 14 | #define TPS6586X_SLEW_RATE_MASK 0x07 |
15 | 15 | ||
16 | /* VERSION CRC */ | ||
17 | #define TPS658621A 0x15 | ||
18 | #define TPS658621CD 0x2c | ||
19 | #define TPS658623 0x1b | ||
20 | #define TPS658643 0x03 | ||
21 | |||
16 | enum { | 22 | enum { |
17 | TPS6586X_ID_SYS, | 23 | TPS6586X_ID_SYS, |
18 | TPS6586X_ID_SM_0, | 24 | TPS6586X_ID_SM_0, |
@@ -97,5 +103,6 @@ extern int tps6586x_clr_bits(struct device *dev, int reg, uint8_t bit_mask); | |||
97 | extern int tps6586x_update(struct device *dev, int reg, uint8_t val, | 103 | extern int tps6586x_update(struct device *dev, int reg, uint8_t val, |
98 | uint8_t mask); | 104 | uint8_t mask); |
99 | extern int tps6586x_irq_get_virq(struct device *dev, int irq); | 105 | extern int tps6586x_irq_get_virq(struct device *dev, int irq); |
106 | extern int tps6586x_get_version(struct device *dev); | ||
100 | 107 | ||
101 | #endif /*__LINUX_MFD_TPS6586X_H */ | 108 | #endif /*__LINUX_MFD_TPS6586X_H */ |
diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h index 20e433e551e3..16c2335c2856 100644 --- a/include/linux/mfd/tps65910.h +++ b/include/linux/mfd/tps65910.h | |||
@@ -358,8 +358,6 @@ | |||
358 | /*Register BBCH (0x80) register.RegisterDescription */ | 358 | /*Register BBCH (0x80) register.RegisterDescription */ |
359 | #define BBCH_BBSEL_MASK 0x06 | 359 | #define BBCH_BBSEL_MASK 0x06 |
360 | #define BBCH_BBSEL_SHIFT 1 | 360 | #define BBCH_BBSEL_SHIFT 1 |
361 | #define BBCH_BBCHEN_MASK 0x01 | ||
362 | #define BBCH_BBCHEN_SHIFT 0 | ||
363 | 361 | ||
364 | 362 | ||
365 | /*Register DCDCCTRL (0x80) register.RegisterDescription */ | 363 | /*Register DCDCCTRL (0x80) register.RegisterDescription */ |
@@ -833,6 +831,7 @@ | |||
833 | #define TPS65910_REG_VAUX2 10 | 831 | #define TPS65910_REG_VAUX2 10 |
834 | #define TPS65910_REG_VAUX33 11 | 832 | #define TPS65910_REG_VAUX33 11 |
835 | #define TPS65910_REG_VMMC 12 | 833 | #define TPS65910_REG_VMMC 12 |
834 | #define TPS65910_REG_VBB 13 | ||
836 | 835 | ||
837 | #define TPS65911_REG_VDDCTRL 4 | 836 | #define TPS65911_REG_VDDCTRL 4 |
838 | #define TPS65911_REG_LDO1 5 | 837 | #define TPS65911_REG_LDO1 5 |
@@ -845,7 +844,7 @@ | |||
845 | #define TPS65911_REG_LDO8 12 | 844 | #define TPS65911_REG_LDO8 12 |
846 | 845 | ||
847 | /* Max number of TPS65910/11 regulators */ | 846 | /* Max number of TPS65910/11 regulators */ |
848 | #define TPS65910_NUM_REGS 13 | 847 | #define TPS65910_NUM_REGS 14 |
849 | 848 | ||
850 | /* External sleep controls through EN1/EN2/EN3/SLEEP inputs */ | 849 | /* External sleep controls through EN1/EN2/EN3/SLEEP inputs */ |
851 | #define TPS65910_SLEEP_CONTROL_EXT_INPUT_EN1 0x1 | 850 | #define TPS65910_SLEEP_CONTROL_EXT_INPUT_EN1 0x1 |