diff options
-rw-r--r-- | include/sound/soc.h | 2 | ||||
-rw-r--r-- | sound/soc/soc-jack.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index 310a21949a3e..13b117aac5d9 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -332,6 +332,8 @@ struct snd_soc_jack_gpio { | |||
332 | int debounce_time; | 332 | int debounce_time; |
333 | struct snd_soc_jack *jack; | 333 | struct snd_soc_jack *jack; |
334 | struct work_struct work; | 334 | struct work_struct work; |
335 | |||
336 | int (*jack_status_check)(void); | ||
335 | }; | 337 | }; |
336 | #endif | 338 | #endif |
337 | 339 | ||
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 12124149601e..3c07a94c2e30 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c | |||
@@ -163,6 +163,9 @@ static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio) | |||
163 | else | 163 | else |
164 | report = 0; | 164 | report = 0; |
165 | 165 | ||
166 | if (gpio->jack_status_check) | ||
167 | report = gpio->jack_status_check(); | ||
168 | |||
166 | snd_soc_jack_report(jack, report, gpio->report); | 169 | snd_soc_jack_report(jack, report, gpio->report); |
167 | } | 170 | } |
168 | 171 | ||