ASoC: Intel: bytcr_rt5651: Fix using the wrong GPIO for the ext-amp on some boards
authorHans de Goede <hdegoede@redhat.com>
Wed, 18 Jul 2018 20:55:38 +0000 (22:55 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 19 Jul 2018 15:04:13 +0000 (16:04 +0100)
commit0a3badd141f78535315cca9ff5062a7ebf414281
tree3b3dbc28f4ceaf2cafe4d4224f1115cda74968bd
parenteea1662525bd4a158a67ac836b2a1fd9cf77cc81
ASoC: Intel: bytcr_rt5651: Fix using the wrong GPIO for the ext-amp on some boards

Some boards have I2cSerialBusV2, GpioIo, GpioInt as ACPI resources, other
boards may  have I2cSerialBusV2, GpioInt, GpioIo instead. We want the
GpioIo one for the ext-amp-enable-gpio.

So far we've been assuming that the GpioIo one always comes first, this
commit adds code to detect which one comes first and to add the right
gpio-mapping.

This fixes sound not working on the Vios LTH17 laptop.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/bytcr_rt5651.c