From: Jarkko Nikula Date: Mon, 26 May 2014 11:34:37 +0000 (+0300) Subject: ASoC: jack: Add support for GPIO descriptor defined jack pins X-Git-Tag: omap-for-v3.16/fixes-against-rc1~21^2~24^2~7^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f025d3b9c64e1f7feb75a559d4a12f5f8c6a4a25;p=pandora-kernel.git ASoC: jack: Add support for GPIO descriptor defined jack pins Allow jack GPIO pins be defined also using GPIO descriptor-based interface in addition to legacy GPIO numbers. This is done by adding two new fields to struct snd_soc_jack_gpio: idx and gpiod_dev. Legacy GPIO numbers are used only when GPIO consumer device gpiod_dev is NULL and otherwise idx is the descriptor index within the GPIO consumer device. New function snd_soc_jack_add_gpiods() is added for typical cases where all GPIO descriptor jack pins belong to same GPIO consumer device. For other cases the caller must set the gpiod_dev in struct snd_soc_jack_gpio before calling snd_soc_jack_add_gpios(). Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown --- Reading git-diff-tree failed