~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-s3c/dev-audio-s3c64xx.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 //
  3 // Copyright 2009 Wolfson Microelectronics
  4 //      Mark Brown <broonie@opensource.wolfsonmicro.com>
  5 
  6 #include <linux/kernel.h>
  7 #include <linux/string.h>
  8 #include <linux/platform_device.h>
  9 #include <linux/dma-mapping.h>
 10 #include <linux/gpio.h>
 11 #include <linux/export.h>
 12 
 13 #include "irqs.h"
 14 #include "map.h"
 15 
 16 #include "devs.h"
 17 #include <linux/platform_data/asoc-s3c.h>
 18 #include "gpio-cfg.h"
 19 #include "gpio-samsung.h"
 20 
 21 static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev)
 22 {
 23         unsigned int base;
 24 
 25         switch (pdev->id) {
 26         case 0:
 27                 base = S3C64XX_GPD(0);
 28                 break;
 29         case 1:
 30                 base = S3C64XX_GPE(0);
 31                 break;
 32         case 2:
 33                 s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C_GPIO_SFN(5));
 34                 s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C_GPIO_SFN(5));
 35                 s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C_GPIO_SFN(5));
 36                 s3c_gpio_cfgpin_range(S3C64XX_GPH(6), 4, S3C_GPIO_SFN(5));
 37                 return 0;
 38         default:
 39                 printk(KERN_DEBUG "Invalid I2S Controller number: %d\n",
 40                         pdev->id);
 41                 return -EINVAL;
 42         }
 43 
 44         s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(3));
 45 
 46         return 0;
 47 }
 48 
 49 static struct resource s3c64xx_iis0_resource[] = {
 50         [0] = DEFINE_RES_MEM(S3C64XX_PA_IIS0, SZ_256),
 51 };
 52 
 53 static struct s3c_audio_pdata i2s0_pdata = {
 54         .cfg_gpio = s3c64xx_i2s_cfg_gpio,
 55 };
 56 
 57 struct platform_device s3c64xx_device_iis0 = {
 58         .name             = "samsung-i2s",
 59         .id               = 0,
 60         .num_resources    = ARRAY_SIZE(s3c64xx_iis0_resource),
 61         .resource         = s3c64xx_iis0_resource,
 62         .dev = {
 63                 .platform_data = &i2s0_pdata,
 64         },
 65 };
 66 EXPORT_SYMBOL(s3c64xx_device_iis0);
 67 
 68 static struct resource s3c64xx_iis1_resource[] = {
 69         [0] = DEFINE_RES_MEM(S3C64XX_PA_IIS1, SZ_256),
 70 };
 71 
 72 static struct s3c_audio_pdata i2s1_pdata = {
 73         .cfg_gpio = s3c64xx_i2s_cfg_gpio,
 74 };
 75 
 76 struct platform_device s3c64xx_device_iis1 = {
 77         .name             = "samsung-i2s",
 78         .id               = 1,
 79         .num_resources    = ARRAY_SIZE(s3c64xx_iis1_resource),
 80         .resource         = s3c64xx_iis1_resource,
 81         .dev = {
 82                 .platform_data = &i2s1_pdata,
 83         },
 84 };
 85 EXPORT_SYMBOL(s3c64xx_device_iis1);
 86 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php