ASoC: max98095: add jack detection
authorRhyland Klein <rklein@nvidia.com>
Thu, 15 Mar 2012 22:07:47 +0000 (15:07 -0700)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 1 Apr 2012 10:28:24 +0000 (11:28 +0100)
commit9dd90c5db0401061009183e6407feff3724ebc8b
tree462b883850965aba52919f438474e5888f7de6a5
parent5f1cba63a3a65b01a70ac09914176bb3719725d6
ASoC: max98095: add jack detection

This change adds the logic to support using the jack detect mechanism built
in to the codec to detect both when a jack was inserted and what type of
jack is present.

This change also supports the use of an external mechanism for headphone
detection. If this mechanism exists, when the max98095_jack_detect function
is called, the hp_jack is simply passed NULL.

This change supports both simple headphones, powered headphones, microphones
and headsets with both headphones and a mic.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
include/sound/max98095.h
sound/soc/codecs/max98095.c
sound/soc/codecs/max98095.h