| 
					
				 | 
			
			
				@@ -2594,3 +2594,202 @@ static struct bfin_snd_platform_data bfin_snd_data[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	[x] = { \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		{ \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			.start = SPORT##x##_TCR1, \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			.end = SPORT##x##_TCR1, \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			.flags = IORESOURCE_MEM \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}, \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		{ \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			.start = CH_SPORT##x##_RX, \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			.end = CH_SPORT##x##_RX, \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			.flags = IORESOURCE_DMA, \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}, \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		{ \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			.start = CH_SPORT##x##_TX, \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			.end = CH_SPORT##x##_TX, \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			.flags = IORESOURCE_DMA, \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}, \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		{ \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			.start = IRQ_SPORT##x##_ERROR, \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			.end = IRQ_SPORT##x##_ERROR, \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			.flags = IORESOURCE_IRQ, \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		} \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct resource bfin_snd_resources[][4] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	BFIN_SND_RES(0), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	BFIN_SND_RES(1), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device bfin_i2s_pcm = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "bfin-i2s-pcm-audio", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id = -1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device bfin_tdm_pcm = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "bfin-tdm-pcm-audio", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id = -1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device bfin_ac97_pcm = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "bfin-ac97-pcm-audio", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id = -1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	        || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static const char * const ad1836_link[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	"bfin-tdm.0", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	"spi0.4", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device bfin_ad1836_machine = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "bfin-snd-ad1836", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id = -1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.dev = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.platform_data = (void *)ad1836_link, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static const unsigned ad73311_gpio[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	GPIO_PF4, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device bfin_ad73311_machine = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "bfin-snd-ad73311", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id = 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.dev = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.platform_data = (void *)ad73311_gpio, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device bfin_ad73311_codec_device = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "ad73311", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id = -1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) || \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device bfin_eval_adav801_device = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "bfin-eval-adav801", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id = -1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device bfin_i2s = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "bfin-i2s", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id = CONFIG_SND_BF5XX_SPORT_NUM, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.dev = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_SND_BF5XX_SOC_TDM) || defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device bfin_tdm = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "bfin-tdm", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id = CONFIG_SND_BF5XX_SPORT_NUM, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.dev = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device bfin_ac97 = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "bfin-ac97", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id = CONFIG_SND_BF5XX_SPORT_NUM, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.dev = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define REGULATOR_ADP122	"adp122" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define REGULATOR_ADP122_UV	2500000 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct regulator_consumer_supply adp122_consumers = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.supply = REGULATOR_ADP122, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct regulator_init_data adp_switch_regulator_data = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.constraints = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.name = REGULATOR_ADP122, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.valid_ops_mask = REGULATOR_CHANGE_STATUS, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.min_uV = REGULATOR_ADP122_UV, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.max_uV = REGULATOR_ADP122_UV, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.min_uA = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.max_uA = 300000, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.num_consumer_supplies = 1,	/* only 1 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.consumer_supplies     = &adp122_consumers, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct fixed_voltage_config adp_switch_pdata = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.supply_name = REGULATOR_ADP122, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.microvolts = REGULATOR_ADP122_UV, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.gpio = GPIO_PF2, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.enable_high = 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.enabled_at_boot = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.init_data = &adp_switch_regulator_data, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device adp_switch_device = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "reg-fixed-voltage", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.dev = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.platform_data = &adp_switch_pdata, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct regulator_bulk_data adp122_bulk_data = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.supply = REGULATOR_ADP122, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct regulator_userspace_consumer_data adp122_userspace_comsumer_data = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = REGULATOR_ADP122, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.num_supplies = 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.supplies = &adp122_bulk_data, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device adp122_userspace_consumer_device = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "reg-userspace-consumer", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.dev = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.platform_data = &adp122_userspace_comsumer_data, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_IIO_GPIO_TRIGGER) || \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	defined(CONFIG_IIO_GPIO_TRIGGER_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct resource iio_gpio_trigger_resources[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	[0] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.start  = IRQ_PF5, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.end    = IRQ_PF5, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 |