ARM: S5PV310: Add audio platform devices
Subsystems (3)
PATCH 4/4 ARM: S5PV310: Add audio platform devices
From: Jassi Brar <[email protected]>
Define platform devices for all audio devices found on S5PV310
--- arch/arm/mach-s5pv310/Makefile | 1 + arch/arm/mach-s5pv310/dev-audio.c | 356 +++++++++++++++++++++++++++++++++++++ 2 files changed, 357 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s5pv310/dev-audio.c
arch/arm/mach-s5pv310/Makefile +1 -0
@@ -26,5 +26,6 @@ obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o # device support +obj-y += dev-audio.o obj-$(CONFIG_S5PV310_SETUP_I2C1) += setup-i2c1.o obj-$(CONFIG_S5PV310_SETUP_I2C2) += setup-i2c2.o
arch/arm/mach-s5pv310/dev-audio.c new file +356 -0
356 lines not on this page · raw message
Signature · 1 line
1.6.2.5
PATCH 4/4 ARM: S5PV310: Add audio platform devices
Quoted 13 lines · Jassi Brar
From: Jassi Brar <[email protected]>
Define platform devices for all audio devices found on S5PV310
Signed-off-by Jassi Brar <[email protected]>--- arch/arm/mach-s5pv310/Makefile | 1 + arch/arm/mach-s5pv310/dev-audio.c | 356 +++++++++++++++++++++++++++++++++++++ 2 files changed, 357 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s5pv310/dev-audio.c
(snip)
arch/arm/mach-s5pv310/dev-audio.c line 38
Quoted 12 lines
arch/arm/mach-s5pv310/dev-audio.c new file +12
-0+static int s5pv310_cfg_i2s (struct platform_device *pdev) +{ +/* configure GPIO for i2s port */ +switch (pdev->id) { +case 0 : +s3c_gpio_cfgpin (S5PV310_GPZ (0 ),S3C_GPIO_SFN (2 )); +s3c_gpio_cfgpin (S5PV310_GPZ (1 ),S3C_GPIO_SFN (2 )); +s3c_gpio_cfgpin (S5PV310_GPZ (2 ),S3C_GPIO_SFN (2 )); +s3c_gpio_cfgpin (S5PV310_GPZ (3 ),S3C_GPIO_SFN (2 )); +s3c_gpio_cfgpin (S5PV310_GPZ (4 ),S3C_GPIO_SFN (2 )); +s3c_gpio_cfgpin (S5PV310_GPZ (5 ),S3C_GPIO_SFN (2 )); +s3c_gpio_cfgpin (S5PV310_GPZ (6 ),S3C_GPIO_SFN (2 ));
s3c_gpio_cfgpin_range(S5PV310_GPZ(0), 7, S3C_GPIO_SFN(2));
(snip)
arch/arm/mach-s5pv310/dev-audio.c line 75
Quoted 4 lines
arch/arm/mach-s5pv310/dev-audio.c new file +4
-0+ +static struct resource s5pv310_iis0_resource[] = { + [0 ] = { + .start =S5PV310_PA_IIS0 ,
^
arch/arm/mach-s5pv310/dev-audio.c line 76
Quoted 1 line
arch/arm/mach-s5pv310/dev-audio.c new file +1
-0+ .end = S5PV310_PA_IIS0 + 0x100 - 1,
^^^
Review
Quoted 1 line
(quoted diff) +1
-0+ .flags = IORESOURCE_MEM,
^
It would be better if you could use tab above like following.
.start = S5PV310_PA_IIS0, .end = S5PV310_PA_IIS0 + 0x100 - 1, .flags = IORESOURCE_MEM,
(snip)
arch/arm/mach-s5pv310/dev-audio.c line 105
Quoted 11 lines
arch/arm/mach-s5pv310/dev-audio.c new file +11
-0+ +struct platform_device s5pv310_device_iis0 = { + .name ="samsung-i2s" , + .id =0 , + .num_resources =ARRAY_SIZE (s5pv310_iis0_resource), + .resource = s5pv310_iis0_resource, + .dev = { + .platform_data = &i2sv5_pdata, + }, +}; +
I'm thinking about the name of IIS/I2S...Hmm...
(snip)
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 4/4 ARM: S5PV310: Add audio platform devices
Quoted 11 lines · Kukjin Kim
Quoted 10 lines
+ ? ? /* configure GPIO for i2s port */
+ ? ? switch (pdev->id) {
+ ? ? case 0:
+ ? ? ? ? ? ?s3c_gpio_cfgpin(S5PV310_GPZ(0), S3C_GPIO_SFN(2));
+ ? ? ? ? ? ?s3c_gpio_cfgpin(S5PV310_GPZ(1), S3C_GPIO_SFN(2));
+ ? ? ? ? ? ?s3c_gpio_cfgpin(S5PV310_GPZ(2), S3C_GPIO_SFN(2));
+ ? ? ? ? ? ?s3c_gpio_cfgpin(S5PV310_GPZ(3), S3C_GPIO_SFN(2));
+ ? ? ? ? ? ?s3c_gpio_cfgpin(S5PV310_GPZ(4), S3C_GPIO_SFN(2));
+ ? ? ? ? ? ?s3c_gpio_cfgpin(S5PV310_GPZ(5), S3C_GPIO_SFN(2));
+ ? ? ? ? ? ?s3c_gpio_cfgpin(S5PV310_GPZ(6), S3C_GPIO_SFN(2));
Quoted 1 line
s3c_gpio_cfgpin_range(S5PV310_GPZ(0), 7, S3C_GPIO_SFN(2));
OK
Quoted 10 lines
Quoted 3 lines
+static struct resource s5pv310_iis0_resource[] = {
+ ? ? [0] = {
+ ? ? ? ? ? ? .start =S5PV310_PA_IIS0,? ? ? ? ? ? ? ? ? ? ?^
Quoted 1 line
+ ? ? ? ? ? ? .end ? =
S5PV310_PA_IIS0+0x100- 1,? ? ? ? ? ? ? ? ? ?^^^
Quoted 1 line
+ ? ? ? ? ? ? .flags =
IORESOURCE_MEM,? ? ? ? ? ? ? ? ? ? ?^
It would be better if you could use tab above like following.
OK
Quoted 5 lines
Quoted 5 lines
(quoted diff) +5
-0+ +struct platform_device s5pv310_device_iis0 = { + ? ? .name ? ? ? ? ? ? = "samsung-i2s", + ? ? .id ? ? ? ? ? ? ? = 0, + ? ? .num_resources ? ?= ARRAY_SIZE(s5pv310_iis0_resource),
Quoted 8 lines
Review
Quoted 6 lines
+ ? ? .resource ? ? ? ? =
s5pv310_iis0_resource,
+ ? ? .dev = {
+ ? ? ? ? ? ? .platform_data =&i2sv5_pdata,
+ ? ? },(quoted diff) +2
-0+}; +I'm thinking about the name of IIS/I2S...Hmm...
I2S is more popular, but our manuals use both I2S and IIS. IIS is present in code mostly due to historical reason.