linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/7] S3C6410: Use platform data to supply pin configuration for IISv4
Date: Fri, 27 Nov 2009 16:43:58 +0000	[thread overview]
Message-ID: <1259340239-12067-6-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20091127164312.GA11913@rakim.wolfsonmicro.main>

Follow the lead of the PCM controller and make the driver less
directly dependant on the particular CPU configuration.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 arch/arm/plat-s3c64xx/dev-audio.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-s3c64xx/dev-audio.c b/arch/arm/plat-s3c64xx/dev-audio.c
index a21a88f..e49e1eb 100644
--- a/arch/arm/plat-s3c64xx/dev-audio.c
+++ b/arch/arm/plat-s3c64xx/dev-audio.c
@@ -20,8 +20,10 @@
 
 #include <plat/devs.h>
 #include <plat/audio.h>
+#include <plat/gpio-bank-c.h>
 #include <plat/gpio-bank-d.h>
 #include <plat/gpio-bank-e.h>
+#include <plat/gpio-bank-h.h>
 #include <plat/gpio-cfg.h>
 
 static struct resource s3c64xx_iis0_resource[] = {
@@ -56,6 +58,23 @@ struct platform_device s3c64xx_device_iis1 = {
 };
 EXPORT_SYMBOL(s3c64xx_device_iis1);
 
+static int s3c64xx_iisv4_cfg_gpio(struct platform_device *pdev)
+{
+	s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C64XX_GPC4_I2S_V40_DO0);
+	s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C64XX_GPC5_I2S_V40_DO1);
+	s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C64XX_GPC7_I2S_V40_DO2);
+	s3c_gpio_cfgpin(S3C64XX_GPH(6), S3C64XX_GPH6_I2S_V40_BCLK);
+	s3c_gpio_cfgpin(S3C64XX_GPH(7), S3C64XX_GPH7_I2S_V40_CDCLK);
+	s3c_gpio_cfgpin(S3C64XX_GPH(8), S3C64XX_GPH8_I2S_V40_LRCLK);
+	s3c_gpio_cfgpin(S3C64XX_GPH(9), S3C64XX_GPH9_I2S_V40_DI);
+
+	return 0;
+}
+
+static struct s3c_audio_pdata s3c64xx_iisv4_pdata = {
+	.cfg_gpio = s3c64xx_iisv4_cfg_gpio,
+};
+
 static struct resource s3c64xx_iisv4_resource[] = {
 	[0] = {
 		.start = S3C64XX_PA_IISV4,
@@ -69,6 +88,9 @@ struct platform_device s3c64xx_device_iisv4 = {
 	.id		  = -1,
 	.num_resources	  = ARRAY_SIZE(s3c64xx_iisv4_resource),
 	.resource	  = s3c64xx_iisv4_resource,
+	.dev = {
+		.platform_data = &s3c64xx_iisv4_pdata,
+	},
 };
 EXPORT_SYMBOL(s3c64xx_device_iisv4);
 
-- 
1.6.5.3

  parent reply	other threads:[~2009-11-27 16:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-27 16:43 [PATCH 0/7] S3C64XX IISv4 support Mark Brown
2009-11-27 16:43 ` [PATCH 1/7] S3C64XX: Staticise platform data for PCM devices Mark Brown
2009-11-28  1:40   ` jassi brar
2009-12-01 18:08     ` Ben Dooks
2009-12-02  0:22   ` jassi brar
2009-12-03 22:01   ` Ben Dooks
2009-12-03 22:57     ` Mark Brown
2009-11-27 16:43 ` [PATCH 2/7] S3C6410: Correct names of IISv4 data output pin definitions Mark Brown
2009-12-01 18:16   ` Ben Dooks
2009-11-27 16:43 ` [PATCH 3/7] S3C64XX: Add support for CLK_SRC2 configured clocks Mark Brown
2009-11-28  1:46   ` jassi brar
2009-12-01 18:17   ` Ben Dooks
2009-11-27 16:43 ` [PATCH 4/7] S3C64XX: Declare IISv4 PCLK for S3C6410 Mark Brown
2009-12-01 21:42   ` Ben Dooks
2009-12-02  0:50     ` jassi brar
2009-12-02 12:10       ` Mark Brown
2009-12-04 13:17         ` jassi brar
2009-12-02 11:20     ` Mark Brown
2009-11-27 16:43 ` [PATCH 5/7] S3C6410: Define CLK_AUDIO2 for IISv4 block Mark Brown
2009-11-27 16:43 ` Mark Brown [this message]
2009-11-28  1:31   ` [PATCH 6/7] S3C6410: Use platform data to supply pin configuration for IISv4 jassi brar
2009-12-01 18:24   ` Ben Dooks
2009-11-27 16:43 ` [PATCH 7/7] SMDK6410: Register IISv4 device Mark Brown

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=1259340239-12067-6-git-send-email-broonie@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.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;
as well as URLs for NNTP newsgroup(s).