Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: peter.ujfalusi@ti.com (Peter Ujfalusi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 5/8] ARM: OMAP: zoom: Audio support via the common omap-twl4030 machine driver
Date: Fri, 18 Jan 2013 15:31:53 +0100	[thread overview]
Message-ID: <1358519516-13165-6-git-send-email-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <1358519516-13165-1-git-send-email-peter.ujfalusi@ti.com>

Use the common omap-twl4030 ASoC machine driver for audio.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 arch/arm/mach-omap2/board-zoom-peripherals.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 03ec6b2..f4ea926 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -20,6 +20,7 @@
 #include <linux/wl12xx.h>
 #include <linux/mmc/host.h>
 #include <linux/platform_data/gpio-omap.h>
+#include <linux/platform_data/omap-twl4030.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -226,6 +227,19 @@ static struct omap2_hsmmc_info mmc[] = {
 	{}      /* Terminator */
 };
 
+static struct omap_tw4030_pdata omap_twl4030_audio_data = {
+	.voice_connected = true,
+	.custom_routing	= true,
+
+	.has_hs		= OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
+	.has_hf		= OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
+
+	.has_mainmic	= true,
+	.has_submic	= true,
+	.has_hsmic	= true,
+	.has_linein	= OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
+};
+
 static int zoom_twl_gpio_setup(struct device *dev,
 		unsigned gpio, unsigned ngpio)
 {
@@ -241,6 +255,10 @@ static int zoom_twl_gpio_setup(struct device *dev,
 		pr_err("Failed to get LCD_PANEL_ENABLE_GPIO (gpio%d).\n",
 				LCD_PANEL_ENABLE_GPIO);
 
+	/* Audio setup */
+	omap_twl4030_audio_data.jack_detect = gpio + 2;
+	omap_twl4030_audio_init("Zoom2", &omap_twl4030_audio_data);
+
 	return ret;
 }
 
-- 
1.8.1

  parent reply	other threads:[~2013-01-18 14:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-18 14:31 [PATCH v2 0/8] ARM: OMAP: Audio support via omap-twl4030 and pwm support Peter Ujfalusi
2013-01-18 14:31 ` [PATCH v2 1/8] ARM: OMAP: 3430sdp: Enable extmute functionality for audio Peter Ujfalusi
2013-01-18 14:31 ` [PATCH v2 2/8] ARM: OMAP: zoom: Zoom2 does not have extmute functionality Peter Ujfalusi
2013-01-18 14:31 ` [PATCH v2 3/8] ARM: OMAP2+: twl-common: Add default twl4030 audio configuration Peter Ujfalusi
2013-01-18 14:31 ` [PATCH v2 4/8] ARM: OMAP2+: twl-common: Allow boards to customize the twl4030 audio setup Peter Ujfalusi
2013-01-18 14:31 ` Peter Ujfalusi [this message]
2013-01-18 14:31 ` [PATCH v2 6/8] ARM: OMAP: sdp3430: Audio support via the common omap-twl4030 machine driver Peter Ujfalusi
2013-01-18 14:31 ` [PATCH v2 7/8] ARM: OMAP: board-4430sdp: Proper support for TWL6030 PWM LED/Backlight Peter Ujfalusi
2013-01-18 14:31 ` [PATCH v2 8/8] ARM: OMAP: omap3beagle: Use the pwm_leds driver to control the PMU_STAT led Peter Ujfalusi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358519516-13165-6-git-send-email-peter.ujfalusi@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox