extcon: arizona: Updates for v3.10

There's a bunch of different things in this series, I can split them out
 if need be:
 
  - Support for configuring the button detection circuit to reflect the
    accessories supplied with the system.
  - Improvements in the HPDET based detection scheme.
  - Additional robustness against more pathological use cases.
  - A few small standalone fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRWr1qAAoJELSic+t+oim9DUwP/3ur4GgIjk4T3Kix364EeWyw
 CDipdcxw/kEIopXSbFX3nMolWvvA0bEtOVGnu67lTm1K2YQxStn9XnK/SnijZq0x
 DR7cWygKwWVF+STYZrWW3OX/4Lyb3MCCeKqBTmw8LNUBHIrWgEi7YB96G3aO+top
 lsHlPNhXYfG65017NmLyGdWCVsCnzRA21nj4ZPJORf9ij+5wNCJwcCsCLvC1kULX
 ol5apYUoToEUCrkHa5x5vYVEGif3483CwPIteKLUWyHgQ1vIxkNqxAQLxJHdyH+M
 +tJ+qKciavttUjXhIwZ/ZaOY5NiQo8d/1OQFUb2z1ZmOpj7uS7ICS6nBg2pBRK+h
 vRY/q+0zZI89o6gggV5HFHmwJtCiYmcLgsX3YL4KH4oXTX/nQvUkkSKzWf3pXCQb
 NpmcWhRuGsiNr6qq/twdJ+34ddxgesmXwtzozlecZ4Goz/9ooInpT5QYtXWzHFqm
 vbUrfk+WrXY6jpz5Xo2hDf2N7zmZaBiPbggJk5wymCWscHl4gANjkfHYEoRedUnX
 VKC21WHxaR22e0KLKo+Aq+eDdOy8BZjCKbOUbhhWe1L5TCQ6QojptLyNJJIuNQ7c
 NAdu8nQDLUnQBC8HTZrDWlsjo/xIatozvhWyI3NX5Q9VSgkCYnu7fpQ/Q2UYn13p
 MkxOYhqCsBuqH9cPDvB8
 =6SXJ
 -----END PGP SIGNATURE-----

Merge tag 'extcon-arizona-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc into char-misc-next

Mark writes:

	extcon: arizona: Updates for v3.10

	There's a bunch of different things in this series, I can split them out
	if need be:

	 - Support for configuring the button detection circuit to reflect the
	   accessories supplied with the system.
	 - Improvements in the HPDET based detection scheme.
	 - Additional robustness against more pathological use cases.
	 - A few small standalone fixes.
This commit is contained in:
Greg Kroah-Hartman 2013-04-03 11:28:18 -07:00
commit 2638953fcd
4 changed files with 321 additions and 105 deletions

View file

@ -86,6 +86,11 @@ struct arizona_micd_config {
bool gpio;
};
struct arizona_micd_range {
int max; /** Ohms */
int key; /** Key to report to input layer */
};
struct arizona_pdata {
int reset; /** GPIO controlling /RESET, if any */
int ldoena; /** GPIO controlling LODENA, if any */
@ -117,12 +122,21 @@ struct arizona_pdata {
/** GPIO5 is used for jack detection */
bool jd_gpio5;
/** Internal pull on GPIO5 is disabled when used for jack detection */
bool jd_gpio5_nopull;
/** Use the headphone detect circuit to identify the accessory */
bool hpdet_acc_id;
/** Check for line output with HPDET method */
bool hpdet_acc_id_line;
/** GPIO used for mic isolation with HPDET */
int hpdet_id_gpio;
/** Extra debounce timeout used during initial mic detection (ms) */
int micd_detect_debounce;
/** GPIO for mic detection polarity */
int micd_pol_gpio;
@ -135,9 +149,16 @@ struct arizona_pdata {
/** Mic detect debounce level */
int micd_dbtime;
/** Mic detect timeout (ms) */
int micd_timeout;
/** Force MICBIAS on for mic detect */
bool micd_force_micbias;
/** Mic detect level parameters */
const struct arizona_micd_range *micd_ranges;
int num_micd_ranges;
/** Headset polarity configurations */
struct arizona_micd_config *micd_configs;
int num_micd_configs;

View file

@ -124,6 +124,10 @@
#define ARIZONA_MIC_DETECT_1 0x2A3
#define ARIZONA_MIC_DETECT_2 0x2A4
#define ARIZONA_MIC_DETECT_3 0x2A5
#define ARIZONA_MIC_DETECT_LEVEL_1 0x2A6
#define ARIZONA_MIC_DETECT_LEVEL_2 0x2A7
#define ARIZONA_MIC_DETECT_LEVEL_3 0x2A8
#define ARIZONA_MIC_DETECT_LEVEL_4 0x2A9
#define ARIZONA_MIC_NOISE_MIX_CONTROL_1 0x2C3
#define ARIZONA_ISOLATION_CONTROL 0x2CB
#define ARIZONA_JACK_DETECT_ANALOGUE 0x2D3