Title: [8245] trunk/sound/soc: clean-up ad193x
Revision
8245
Author
bhsong
Date
2010-01-27 22:13:55 -0500 (Wed, 27 Jan 2010)

Log Message

clean-up ad193x

Modified Paths


Diff

Modified: trunk/sound/soc/blackfin/Kconfig (8244 => 8245)


--- trunk/sound/soc/blackfin/Kconfig	2010-01-28 00:30:42 UTC (rev 8244)
+++ trunk/sound/soc/blackfin/Kconfig	2010-01-28 03:13:55 UTC (rev 8245)
@@ -78,6 +78,7 @@
 	select SND_SOC_AD193X_I2C if I2C
 	help
 	  Say Y if you want to add support for AD193X codec on Blackfin.
+	  This driver supports AD1936, AD1937, AD1938 and AD1939.
 
 config SND_BF5XX_AC97
 	tristate "SoC AC97 Audio for the ADI BF5xx chip"

Modified: trunk/sound/soc/codecs/ad193x-i2c.c (8244 => 8245)


--- trunk/sound/soc/codecs/ad193x-i2c.c	2010-01-28 00:30:42 UTC (rev 8244)
+++ trunk/sound/soc/codecs/ad193x-i2c.c	2010-01-28 03:13:55 UTC (rev 8245)
@@ -10,12 +10,13 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/i2c.h>
+#include <sound/soc.h>
 #include "ad193x.h"
 
 static int __devinit ad193x_i2c_probe(struct i2c_client *client,
 		const struct i2c_device_id *id)
 {
-	return ad193x_bus_probe(&client->dev, client);
+	return ad193x_bus_probe(&client->dev, client, SND_SOC_I2C);
 }
 
 static int __devexit ad193x_i2c_remove(struct i2c_client *client)

Modified: trunk/sound/soc/codecs/ad193x-spi.c (8244 => 8245)


--- trunk/sound/soc/codecs/ad193x-spi.c	2010-01-28 00:30:42 UTC (rev 8244)
+++ trunk/sound/soc/codecs/ad193x-spi.c	2010-01-28 03:13:55 UTC (rev 8245)
@@ -10,11 +10,12 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/spi/spi.h>
+#include <sound/soc.h>
 #include "ad193x.h"
 
 static int __devinit ad193x_spi_probe(struct spi_device *spi)
 {
-	return ad193x_bus_probe(&spi->dev, spi);
+	return ad193x_bus_probe(&spi->dev, spi, SND_SOC_SPI);
 }
 
 static int __devexit ad193x_spi_remove(struct spi_device *spi)

Modified: trunk/sound/soc/codecs/ad193x.c (8244 => 8245)


--- trunk/sound/soc/codecs/ad193x.c	2010-01-28 00:30:42 UTC (rev 8244)
+++ trunk/sound/soc/codecs/ad193x.c	2010-01-28 03:13:55 UTC (rev 8245)
@@ -1,5 +1,5 @@
 /*
- * AD193X Audio Codec driver
+ * AD193X Audio Codec driver supporting AD1936/7/8/9
  *
  * Copyright 2010 Analog Devices Inc.
  *
@@ -32,7 +32,7 @@
 
 static struct snd_soc_codec *ad193x_codec;
 struct snd_soc_codec_device soc_codec_dev_ad193x;
-static int ad193x_register(struct ad193x_priv *ad193x);
+static int ad193x_register(struct ad193x_priv *ad193x, int bus_type);
 static void ad193x_unregister(struct ad193x_priv *ad193x);
 
 /*
@@ -283,7 +283,7 @@
 	return 0;
 }
 
-int ad193x_bus_probe(struct device *dev, void *ctrl_data)
+int ad193x_bus_probe(struct device *dev, void *ctrl_data, int bus_type)
 {
 	struct snd_soc_codec *codec;
 	struct ad193x_priv *ad193x;
@@ -298,7 +298,7 @@
 
 	dev_set_drvdata(dev, ad193x);
 
-	return ad193x_register(ad193x);
+	return ad193x_register(ad193x, bus_type);
 }
 EXPORT_SYMBOL_GPL(ad193x_bus_probe);
 
@@ -341,7 +341,7 @@
 };
 EXPORT_SYMBOL_GPL(ad193x_dai);
 
-static int ad193x_register(struct ad193x_priv *ad193x)
+static int ad193x_register(struct ad193x_priv *ad193x, int bus_type)
 {
 	int ret;
 	struct snd_soc_codec *codec = &ad193x->codec;
@@ -369,7 +369,7 @@
 
 	memcpy(codec->reg_cache, ad193x_reg, AD193X_NUM_REGS);
 
-	ret = snd_soc_codec_set_cache_io(codec, 16, 8, SND_SOC_SPI);
+	ret = snd_soc_codec_set_cache_io(codec, 16, 8, bus_type);
 	if (ret < 0) {
 		dev_err(codec->dev, "failed to set cache I/O: %d\n",
 				ret);

Modified: trunk/sound/soc/codecs/ad193x.h (8244 => 8245)


--- trunk/sound/soc/codecs/ad193x.h	2010-01-28 00:30:42 UTC (rev 8244)
+++ trunk/sound/soc/codecs/ad193x.h	2010-01-28 03:13:55 UTC (rev 8245)
@@ -1,29 +1,9 @@
 /*
- * File:         sound/soc/codecs/ad193x.h
- * Based on:
- * Author:       Barry Song <[email protected]>
+ * AD193X Audio Codec driver
  *
- * Created:      May 25, 2009
- * Description:  definitions for AD193X registers
+ * Copyright 2010 Analog Devices Inc.
  *
- * Modified:
- *
- * Bugs:         Enter bugs at http://blackfin.uclinux.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see the file COPYING, or write
- * to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ * Licensed under the GPL-2 or later.
  */
 
 #ifndef __AD193X_H__
@@ -97,6 +77,6 @@
 
 extern struct snd_soc_dai ad193x_dai;
 extern struct snd_soc_codec_device soc_codec_dev_ad193x;
-extern int ad193x_bus_probe(struct device *dev, void *ctrl_data);
+extern int ad193x_bus_probe(struct device *dev, void *ctrl_data, int bus_type);
 extern int ad193x_bus_remove(struct device *dev);
 #endif
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to