ASoC: rt5670: Fix GPIO headset detection regression
authorTakashi Iwai <tiwai@suse.de>
Tue, 22 Aug 2017 05:44:52 +0000 (07:44 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 22 Aug 2017 12:48:34 +0000 (13:48 +0100)
commit804e73adf5cf4b3aea3b6ce058f4dc0191143821
treeef7cb29925849f16e51393da300b5d99f6ce4d5e
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877
ASoC: rt5670: Fix GPIO headset detection regression

RT5670 codec driver and its machine driver for Intel CHT assume the
implicit GPIO mapping on the index 0 while BIOS on most devices don't
provide it.  The recent commit f10e4bf6632b ("gpio: acpi: Even more
tighten up ACPI GPIO lookups") restricts such cases and it resulted in
a regression where the headset jack setup fails like:

  rt5670 i2c-10EC5672:00: ASoC: Cannot get gpio at index 0: -2
  rt5670 i2c-10EC5672:00: Adding jack GPIO failed

For fixing this, we need to provide the GPIO mapping explicitly in the
machine driver.  Also this patch corrects the string to be passed to
gpiolib to match with the pre-given mapping, too.

Fixes: f10e4bf6632b ("gpio: acpi: Even more tighten up ACPI GPIO lookups")
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=115531
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5670.c
sound/soc/intel/boards/cht_bsw_rt5672.c