[Rebase from r2]]audio: sn95031: added GPIO support for jack detection
authorOmair Mohammed Abdullah <omair.m.abdullah@intel.com>
Tue, 27 Dec 2011 06:25:23 +0000 (11:55 +0530)
committerbuildbot <buildbot@intel.com>
Fri, 13 Jan 2012 09:40:03 +0000 (01:40 -0800)
commit932aa03c1092173047d0eec75b3496582e82ba02
treec8ad766a8a0e8082922f16ba6a62f310b4bbfa1b
parenta872989b6f2e4d6580b8108896dc473348b35cb2
[Rebase from r2]]audio: sn95031: added GPIO support for jack detection

BZ: 19775

OLD_BZ:14181
PR3.x devices have a GPIO pin which can be used to detect high impedance
headsets.

Added GPIO support in the codec driver so that whenever an insert interrupt is
received and the micbias value is out of range, it checks the GPIO pin and
reports the jack as a HEADSET if the GPIO pin says that there is a headset.

Since PR2 devices don't have this GPIO pin, they are no longer supported.

Old-Change-Id: I493a8e2a12d6c1144a80d0845bbf73e2482a7fab

Change-Id: I94bc7a73502ce558966ad22423ca6f0f7ed00f2a
Signed-off-by: Omair Mohammed Abdullah <omair.m.abdullah@intel.com>
Reviewed-on: http://android.intel.com:8080/31706
Reviewed-by: M, Arulselvan <arulselvan.m@intel.com>
Tested-by: M, Arulselvan <arulselvan.m@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
sound/soc/codecs/sn95031.c
sound/soc/mid-x86/mfld_machine.c