]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
ASoC: Add GPIO support for jack reporting interface
authorLopez Cruz, Misael <x0052729@ti.com>
Tue, 3 Mar 2009 21:25:04 +0000 (15:25 -0600)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 4 Mar 2009 14:47:38 +0000 (14:47 +0000)
commitec67624d33d5639bcc6ee6918cb1fc0bd1bac3a8
tree301f1d4ae2f47cca1c7412ce49e7574de8b0dfd2
parent5f2a9384a9291d898b4bf85c4fbf497eef582977
ASoC: Add GPIO support for jack reporting interface

Add GPIO support to jack reporting framework in ASoC using gpiolib calls.
The gpio support exports two new functions: snd_soc_jack_add_gpios and
snd_soc_jack_free_gpios.

Client drivers using gpio feature must pass an array of jack_gpio pins
belonging to a specific jack to the snd_soc_jack_add_gpios function. The
framework will request the gpios, set the data direction and request irq.
The framework will update power status of related jack_pins when an event on
the gpio pins comes according to the reporting bits defined for each gpio.

All gpio resources allocated when adding jack_gpio pins can be released
using snd_soc_jack_free_gpios function.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
include/sound/soc.h
sound/soc/soc-jack.c