diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 16:57:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 16:57:13 -0500 |
commit | 7ed214ac2095f561a94335ca672b6c42a1ea40ff (patch) | |
tree | da41901bff1d0d8d61170bf362384fdc61deb3ab /include/linux/mfd/arizona | |
parent | 21eaab6d19ed43e82ed39c8deb7f192134fb4a0e (diff) | |
parent | 29e5507ae4ab34397f538f06b7070c81a4e4a2bf (diff) |
Merge tag 'char-misc-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver patches from Greg Kroah-Hartman:
"Here's the big char/misc driver patches for 3.9-rc1.
Nothing major here, just lots of different driver updates (mei,
hyperv, ipack, extcon, vmci, etc.).
All of these have been in the linux-next tree for a while."
* tag 'char-misc-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (209 commits)
w1: w1_therm: Add force-pullup option for "broken" sensors
w1: ds2482: Added 1-Wire pull-up support to the driver
vme: add missing put_device() after device_register() fails
extcon: max8997: Use workqueue to check cable state after completing boot of platform
extcon: max8997: Set default UART/USB path on probe
extcon: max8997: Consolidate duplicate code for checking ADC/CHG cable type
extcon: max8997: Set default of ADC debounce time during initialization
extcon: max8997: Remove duplicate code related to set H/W line path
extcon: max8997: Move defined constant to header file
extcon: max77693: Make max77693_extcon_cable static
extcon: max8997: Remove unreachable code
extcon: max8997: Make max8997_extcon_cable static
extcon: max77693: Remove unnecessary goto statement to improve readability
extcon: max77693: Convert to devm_input_allocate_device()
extcon: gpio: Rename filename of extcon-gpio.c according to kernel naming style
CREDITS: update email and address of Harald Hoyer
extcon: arizona: Use MICDET for final microphone identification
extcon: arizona: Always take the first HPDET reading as the final one
extcon: arizona: Clear _trig_sts bits after jack detection
extcon: arizona: Don't HPDET magic when headphones are enabled
...
Diffstat (limited to 'include/linux/mfd/arizona')
-rw-r--r-- | include/linux/mfd/arizona/core.h | 4 | ||||
-rw-r--r-- | include/linux/mfd/arizona/pdata.h | 21 | ||||
-rw-r--r-- | include/linux/mfd/arizona/registers.h | 56 |
3 files changed, 80 insertions, 1 deletions
diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h index a580363a7d29..a710255528d7 100644 --- a/include/linux/mfd/arizona/core.h +++ b/include/linux/mfd/arizona/core.h | |||
@@ -75,8 +75,10 @@ enum arizona_type { | |||
75 | #define ARIZONA_IRQ_DCS_HP_DONE 47 | 75 | #define ARIZONA_IRQ_DCS_HP_DONE 47 |
76 | #define ARIZONA_IRQ_FLL2_CLOCK_OK 48 | 76 | #define ARIZONA_IRQ_FLL2_CLOCK_OK 48 |
77 | #define ARIZONA_IRQ_FLL1_CLOCK_OK 49 | 77 | #define ARIZONA_IRQ_FLL1_CLOCK_OK 49 |
78 | #define ARIZONA_IRQ_MICD_CLAMP_RISE 50 | ||
79 | #define ARIZONA_IRQ_MICD_CLAMP_FALL 51 | ||
78 | 80 | ||
79 | #define ARIZONA_NUM_IRQ 50 | 81 | #define ARIZONA_NUM_IRQ 52 |
80 | 82 | ||
81 | struct snd_soc_dapm_context; | 83 | struct snd_soc_dapm_context; |
82 | 84 | ||
diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h index ec3e2a2a6d77..96d64f2b8d78 100644 --- a/include/linux/mfd/arizona/pdata.h +++ b/include/linux/mfd/arizona/pdata.h | |||
@@ -105,9 +105,30 @@ struct arizona_pdata { | |||
105 | */ | 105 | */ |
106 | int max_channels_clocked[ARIZONA_MAX_AIF]; | 106 | int max_channels_clocked[ARIZONA_MAX_AIF]; |
107 | 107 | ||
108 | /** GPIO5 is used for jack detection */ | ||
109 | bool jd_gpio5; | ||
110 | |||
111 | /** Use the headphone detect circuit to identify the accessory */ | ||
112 | bool hpdet_acc_id; | ||
113 | |||
114 | /** GPIO used for mic isolation with HPDET */ | ||
115 | int hpdet_id_gpio; | ||
116 | |||
108 | /** GPIO for mic detection polarity */ | 117 | /** GPIO for mic detection polarity */ |
109 | int micd_pol_gpio; | 118 | int micd_pol_gpio; |
110 | 119 | ||
120 | /** Mic detect ramp rate */ | ||
121 | int micd_bias_start_time; | ||
122 | |||
123 | /** Mic detect sample rate */ | ||
124 | int micd_rate; | ||
125 | |||
126 | /** Mic detect debounce level */ | ||
127 | int micd_dbtime; | ||
128 | |||
129 | /** Force MICBIAS on for mic detect */ | ||
130 | bool micd_force_micbias; | ||
131 | |||
111 | /** Headset polarity configurations */ | 132 | /** Headset polarity configurations */ |
112 | struct arizona_micd_config *micd_configs; | 133 | struct arizona_micd_config *micd_configs; |
113 | int num_micd_configs; | 134 | int num_micd_configs; |
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h index 1f6fe31a4d5c..188d89abd963 100644 --- a/include/linux/mfd/arizona/registers.h +++ b/include/linux/mfd/arizona/registers.h | |||
@@ -119,6 +119,8 @@ | |||
119 | #define ARIZONA_ACCESSORY_DETECT_MODE_1 0x293 | 119 | #define ARIZONA_ACCESSORY_DETECT_MODE_1 0x293 |
120 | #define ARIZONA_HEADPHONE_DETECT_1 0x29B | 120 | #define ARIZONA_HEADPHONE_DETECT_1 0x29B |
121 | #define ARIZONA_HEADPHONE_DETECT_2 0x29C | 121 | #define ARIZONA_HEADPHONE_DETECT_2 0x29C |
122 | #define ARIZONA_HP_DACVAL 0x29F | ||
123 | #define ARIZONA_MICD_CLAMP_CONTROL 0x2A2 | ||
122 | #define ARIZONA_MIC_DETECT_1 0x2A3 | 124 | #define ARIZONA_MIC_DETECT_1 0x2A3 |
123 | #define ARIZONA_MIC_DETECT_2 0x2A4 | 125 | #define ARIZONA_MIC_DETECT_2 0x2A4 |
124 | #define ARIZONA_MIC_DETECT_3 0x2A5 | 126 | #define ARIZONA_MIC_DETECT_3 0x2A5 |
@@ -1194,6 +1196,14 @@ | |||
1194 | /* | 1196 | /* |
1195 | * R64 (0x40) - Wake control | 1197 | * R64 (0x40) - Wake control |
1196 | */ | 1198 | */ |
1199 | #define ARIZONA_WKUP_MICD_CLAMP_FALL 0x0080 /* WKUP_MICD_CLAMP_FALL */ | ||
1200 | #define ARIZONA_WKUP_MICD_CLAMP_FALL_MASK 0x0080 /* WKUP_MICD_CLAMP_FALL */ | ||
1201 | #define ARIZONA_WKUP_MICD_CLAMP_FALL_SHIFT 7 /* WKUP_MICD_CLAMP_FALL */ | ||
1202 | #define ARIZONA_WKUP_MICD_CLAMP_FALL_WIDTH 1 /* WKUP_MICD_CLAMP_FALL */ | ||
1203 | #define ARIZONA_WKUP_MICD_CLAMP_RISE 0x0040 /* WKUP_MICD_CLAMP_RISE */ | ||
1204 | #define ARIZONA_WKUP_MICD_CLAMP_RISE_MASK 0x0040 /* WKUP_MICD_CLAMP_RISE */ | ||
1205 | #define ARIZONA_WKUP_MICD_CLAMP_RISE_SHIFT 6 /* WKUP_MICD_CLAMP_RISE */ | ||
1206 | #define ARIZONA_WKUP_MICD_CLAMP_RISE_WIDTH 1 /* WKUP_MICD_CLAMP_RISE */ | ||
1197 | #define ARIZONA_WKUP_GP5_FALL 0x0020 /* WKUP_GP5_FALL */ | 1207 | #define ARIZONA_WKUP_GP5_FALL 0x0020 /* WKUP_GP5_FALL */ |
1198 | #define ARIZONA_WKUP_GP5_FALL_MASK 0x0020 /* WKUP_GP5_FALL */ | 1208 | #define ARIZONA_WKUP_GP5_FALL_MASK 0x0020 /* WKUP_GP5_FALL */ |
1199 | #define ARIZONA_WKUP_GP5_FALL_SHIFT 5 /* WKUP_GP5_FALL */ | 1209 | #define ARIZONA_WKUP_GP5_FALL_SHIFT 5 /* WKUP_GP5_FALL */ |
@@ -2035,6 +2045,9 @@ | |||
2035 | /* | 2045 | /* |
2036 | * R667 (0x29B) - Headphone Detect 1 | 2046 | * R667 (0x29B) - Headphone Detect 1 |
2037 | */ | 2047 | */ |
2048 | #define ARIZONA_HP_IMPEDANCE_RANGE_MASK 0x0600 /* HP_IMPEDANCE_RANGE - [10:9] */ | ||
2049 | #define ARIZONA_HP_IMPEDANCE_RANGE_SHIFT 9 /* HP_IMPEDANCE_RANGE - [10:9] */ | ||
2050 | #define ARIZONA_HP_IMPEDANCE_RANGE_WIDTH 2 /* HP_IMPEDANCE_RANGE - [10:9] */ | ||
2038 | #define ARIZONA_HP_STEP_SIZE 0x0100 /* HP_STEP_SIZE */ | 2051 | #define ARIZONA_HP_STEP_SIZE 0x0100 /* HP_STEP_SIZE */ |
2039 | #define ARIZONA_HP_STEP_SIZE_MASK 0x0100 /* HP_STEP_SIZE */ | 2052 | #define ARIZONA_HP_STEP_SIZE_MASK 0x0100 /* HP_STEP_SIZE */ |
2040 | #define ARIZONA_HP_STEP_SIZE_SHIFT 8 /* HP_STEP_SIZE */ | 2053 | #define ARIZONA_HP_STEP_SIZE_SHIFT 8 /* HP_STEP_SIZE */ |
@@ -2069,6 +2082,21 @@ | |||
2069 | #define ARIZONA_HP_LVL_SHIFT 0 /* HP_LVL - [6:0] */ | 2082 | #define ARIZONA_HP_LVL_SHIFT 0 /* HP_LVL - [6:0] */ |
2070 | #define ARIZONA_HP_LVL_WIDTH 7 /* HP_LVL - [6:0] */ | 2083 | #define ARIZONA_HP_LVL_WIDTH 7 /* HP_LVL - [6:0] */ |
2071 | 2084 | ||
2085 | #define ARIZONA_HP_DONE_B 0x8000 /* HP_DONE */ | ||
2086 | #define ARIZONA_HP_DONE_B_MASK 0x8000 /* HP_DONE */ | ||
2087 | #define ARIZONA_HP_DONE_B_SHIFT 15 /* HP_DONE */ | ||
2088 | #define ARIZONA_HP_DONE_B_WIDTH 1 /* HP_DONE */ | ||
2089 | #define ARIZONA_HP_LVL_B_MASK 0x7FFF /* HP_LVL - [14:0] */ | ||
2090 | #define ARIZONA_HP_LVL_B_SHIFT 0 /* HP_LVL - [14:0] */ | ||
2091 | #define ARIZONA_HP_LVL_B_WIDTH 15 /* HP_LVL - [14:0] */ | ||
2092 | |||
2093 | /* | ||
2094 | * R674 (0x2A2) - MICD clamp control | ||
2095 | */ | ||
2096 | #define ARIZONA_MICD_CLAMP_MODE_MASK 0x000F /* MICD_CLAMP_MODE - [3:0] */ | ||
2097 | #define ARIZONA_MICD_CLAMP_MODE_SHIFT 0 /* MICD_CLAMP_MODE - [3:0] */ | ||
2098 | #define ARIZONA_MICD_CLAMP_MODE_WIDTH 4 /* MICD_CLAMP_MODE - [3:0] */ | ||
2099 | |||
2072 | /* | 2100 | /* |
2073 | * R675 (0x2A3) - Mic Detect 1 | 2101 | * R675 (0x2A3) - Mic Detect 1 |
2074 | */ | 2102 | */ |
@@ -5239,6 +5267,14 @@ | |||
5239 | /* | 5267 | /* |
5240 | * R3408 (0xD50) - AOD wkup and trig | 5268 | * R3408 (0xD50) - AOD wkup and trig |
5241 | */ | 5269 | */ |
5270 | #define ARIZONA_MICD_CLAMP_FALL_TRIG_STS 0x0080 /* MICD_CLAMP_FALL_TRIG_STS */ | ||
5271 | #define ARIZONA_MICD_CLAMP_FALL_TRIG_STS_MASK 0x0080 /* MICD_CLAMP_FALL_TRIG_STS */ | ||
5272 | #define ARIZONA_MICD_CLAMP_FALL_TRIG_STS_SHIFT 7 /* MICD_CLAMP_FALL_TRIG_STS */ | ||
5273 | #define ARIZONA_MICD_CLAMP_FALL_TRIG_STS_WIDTH 1 /* MICD_CLAMP_FALL_TRIG_STS */ | ||
5274 | #define ARIZONA_MICD_CLAMP_RISE_TRIG_STS 0x0040 /* MICD_CLAMP_RISE_TRIG_STS */ | ||
5275 | #define ARIZONA_MICD_CLAMP_RISE_TRIG_STS_MASK 0x0040 /* MICD_CLAMP_RISE_TRIG_STS */ | ||
5276 | #define ARIZONA_MICD_CLAMP_RISE_TRIG_STS_SHIFT 6 /* MICD_CLAMP_RISE_TRIG_STS */ | ||
5277 | #define ARIZONA_MICD_CLAMP_RISE_TRIG_STS_WIDTH 1 /* MICD_CLAMP_RISE_TRIG_STS */ | ||
5242 | #define ARIZONA_GP5_FALL_TRIG_STS 0x0020 /* GP5_FALL_TRIG_STS */ | 5278 | #define ARIZONA_GP5_FALL_TRIG_STS 0x0020 /* GP5_FALL_TRIG_STS */ |
5243 | #define ARIZONA_GP5_FALL_TRIG_STS_MASK 0x0020 /* GP5_FALL_TRIG_STS */ | 5279 | #define ARIZONA_GP5_FALL_TRIG_STS_MASK 0x0020 /* GP5_FALL_TRIG_STS */ |
5244 | #define ARIZONA_GP5_FALL_TRIG_STS_SHIFT 5 /* GP5_FALL_TRIG_STS */ | 5280 | #define ARIZONA_GP5_FALL_TRIG_STS_SHIFT 5 /* GP5_FALL_TRIG_STS */ |
@@ -5267,6 +5303,12 @@ | |||
5267 | /* | 5303 | /* |
5268 | * R3409 (0xD51) - AOD IRQ1 | 5304 | * R3409 (0xD51) - AOD IRQ1 |
5269 | */ | 5305 | */ |
5306 | #define ARIZONA_MICD_CLAMP_FALL_EINT1 0x0080 /* MICD_CLAMP_FALL_EINT1 */ | ||
5307 | #define ARIZONA_MICD_CLAMP_FALL_EINT1_MASK 0x0080 /* MICD_CLAMP_FALL_EINT1 */ | ||
5308 | #define ARIZONA_MICD_CLAMP_FALL_EINT1_SHIFT 7 /* MICD_CLAMP_FALL_EINT1 */ | ||
5309 | #define ARIZONA_MICD_CLAMP_RISE_EINT1 0x0040 /* MICD_CLAMP_RISE_EINT1 */ | ||
5310 | #define ARIZONA_MICD_CLAMP_RISE_EINT1_MASK 0x0040 /* MICD_CLAMP_RISE_EINT1 */ | ||
5311 | #define ARIZONA_MICD_CLAMP_RISE_EINT1_SHIFT 6 /* MICD_CLAMP_RISE_EINT1 */ | ||
5270 | #define ARIZONA_GP5_FALL_EINT1 0x0020 /* GP5_FALL_EINT1 */ | 5312 | #define ARIZONA_GP5_FALL_EINT1 0x0020 /* GP5_FALL_EINT1 */ |
5271 | #define ARIZONA_GP5_FALL_EINT1_MASK 0x0020 /* GP5_FALL_EINT1 */ | 5313 | #define ARIZONA_GP5_FALL_EINT1_MASK 0x0020 /* GP5_FALL_EINT1 */ |
5272 | #define ARIZONA_GP5_FALL_EINT1_SHIFT 5 /* GP5_FALL_EINT1 */ | 5314 | #define ARIZONA_GP5_FALL_EINT1_SHIFT 5 /* GP5_FALL_EINT1 */ |
@@ -5295,6 +5337,12 @@ | |||
5295 | /* | 5337 | /* |
5296 | * R3410 (0xD52) - AOD IRQ2 | 5338 | * R3410 (0xD52) - AOD IRQ2 |
5297 | */ | 5339 | */ |
5340 | #define ARIZONA_MICD_CLAMP_FALL_EINT2 0x0080 /* MICD_CLAMP_FALL_EINT2 */ | ||
5341 | #define ARIZONA_MICD_CLAMP_FALL_EINT2_MASK 0x0080 /* MICD_CLAMP_FALL_EINT2 */ | ||
5342 | #define ARIZONA_MICD_CLAMP_FALL_EINT2_SHIFT 7 /* MICD_CLAMP_FALL_EINT2 */ | ||
5343 | #define ARIZONA_MICD_CLAMP_RISE_EINT2 0x0040 /* MICD_CLAMP_RISE_EINT2 */ | ||
5344 | #define ARIZONA_MICD_CLAMP_RISE_EINT2_MASK 0x0040 /* MICD_CLAMP_RISE_EINT2 */ | ||
5345 | #define ARIZONA_MICD_CLAMP_RISE_EINT2_SHIFT 6 /* MICD_CLAMP_RISE_EINT2 */ | ||
5298 | #define ARIZONA_GP5_FALL_EINT2 0x0020 /* GP5_FALL_EINT2 */ | 5346 | #define ARIZONA_GP5_FALL_EINT2 0x0020 /* GP5_FALL_EINT2 */ |
5299 | #define ARIZONA_GP5_FALL_EINT2_MASK 0x0020 /* GP5_FALL_EINT2 */ | 5347 | #define ARIZONA_GP5_FALL_EINT2_MASK 0x0020 /* GP5_FALL_EINT2 */ |
5300 | #define ARIZONA_GP5_FALL_EINT2_SHIFT 5 /* GP5_FALL_EINT2 */ | 5348 | #define ARIZONA_GP5_FALL_EINT2_SHIFT 5 /* GP5_FALL_EINT2 */ |
@@ -5379,6 +5427,10 @@ | |||
5379 | /* | 5427 | /* |
5380 | * R3413 (0xD55) - AOD IRQ Raw Status | 5428 | * R3413 (0xD55) - AOD IRQ Raw Status |
5381 | */ | 5429 | */ |
5430 | #define ARIZONA_MICD_CLAMP_STS 0x0008 /* MICD_CLAMP_STS */ | ||
5431 | #define ARIZONA_MICD_CLAMP_STS_MASK 0x0008 /* MICD_CLAMP_STS */ | ||
5432 | #define ARIZONA_MICD_CLAMP_STS_SHIFT 3 /* MICD_CLAMP_STS */ | ||
5433 | #define ARIZONA_MICD_CLAMP_STS_WIDTH 1 /* MICD_CLAMP_STS */ | ||
5382 | #define ARIZONA_GP5_STS 0x0004 /* GP5_STS */ | 5434 | #define ARIZONA_GP5_STS 0x0004 /* GP5_STS */ |
5383 | #define ARIZONA_GP5_STS_MASK 0x0004 /* GP5_STS */ | 5435 | #define ARIZONA_GP5_STS_MASK 0x0004 /* GP5_STS */ |
5384 | #define ARIZONA_GP5_STS_SHIFT 2 /* GP5_STS */ | 5436 | #define ARIZONA_GP5_STS_SHIFT 2 /* GP5_STS */ |
@@ -5395,6 +5447,10 @@ | |||
5395 | /* | 5447 | /* |
5396 | * R3414 (0xD56) - Jack detect debounce | 5448 | * R3414 (0xD56) - Jack detect debounce |
5397 | */ | 5449 | */ |
5450 | #define ARIZONA_MICD_CLAMP_DB 0x0008 /* MICD_CLAMP_DB */ | ||
5451 | #define ARIZONA_MICD_CLAMP_DB_MASK 0x0008 /* MICD_CLAMP_DB */ | ||
5452 | #define ARIZONA_MICD_CLAMP_DB_SHIFT 3 /* MICD_CLAMP_DB */ | ||
5453 | #define ARIZONA_MICD_CLAMP_DB_WIDTH 1 /* MICD_CLAMP_DB */ | ||
5398 | #define ARIZONA_JD2_DB 0x0002 /* JD2_DB */ | 5454 | #define ARIZONA_JD2_DB 0x0002 /* JD2_DB */ |
5399 | #define ARIZONA_JD2_DB_MASK 0x0002 /* JD2_DB */ | 5455 | #define ARIZONA_JD2_DB_MASK 0x0002 /* JD2_DB */ |
5400 | #define ARIZONA_JD2_DB_SHIFT 1 /* JD2_DB */ | 5456 | #define ARIZONA_JD2_DB_SHIFT 1 /* JD2_DB */ |