summaryrefslogtreecommitdiff
path: root/sound/soc/soc-jack.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-06-08 21:47:53 +0300
committerTakashi Iwai <tiwai@suse.de>2015-06-08 21:47:53 +0300
commit8ffc57093bb1c270050f4229b5afd38ee8cef2bd (patch)
treeba78b568b446b9c119385ef17a0fa5d5d0724be2 /sound/soc/soc-jack.c
parent83b0b677f90a2056a53f1930881bbee2741b048f (diff)
parent11e688862c4c8162119a4ca51c3326555966c8bb (diff)
downloadlinux-8ffc57093bb1c270050f4229b5afd38ee8cef2bd.tar.xz
Merge tag 'asoc-v4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v4.2 The big thing this release has been Liam's addition of topology support to the core. We've also seen quite a bit of driver work and the continuation of Lars' refactoring for component support. - Support for loading ASoC topology maps from firmware, intended to be used to allow self-describing DSP firmware images to be built which can map controls added by the DSP to userspace without the kernel needing to know about individual DSP firmwares. - Lots of refactoring to avoid direct access to snd_soc_codec where it's not needed supporting future refactoring. - Big refactoring and cleanup serieses for the Wolfson ADSP and TI TAS2552 drivers. - Support for TI TAS571x power amplifiers. - Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs. - Support for x86 systems with RT5650 and Qualcomm Storm.
Diffstat (limited to 'sound/soc/soc-jack.c')
-rw-r--r--sound/soc/soc-jack.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 87ca9806f3ee..fbaa1bb41102 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -316,8 +316,11 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
goto undo;
}
- if (gpios[i].gpiod_dev) {
- /* GPIO descriptor */
+ if (gpios[i].desc) {
+ /* Already have a GPIO descriptor. */
+ goto got_gpio;
+ } else if (gpios[i].gpiod_dev) {
+ /* Get a GPIO descriptor */
gpios[i].desc = gpiod_get_index(gpios[i].gpiod_dev,
gpios[i].name,
gpios[i].idx, GPIOD_IN);
@@ -345,7 +348,7 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
gpios[i].desc = gpio_to_desc(gpios[i].gpio);
}
-
+got_gpio:
INIT_DELAYED_WORK(&gpios[i].work, gpio_work);
gpios[i].jack = jack;