Title: [9772] trunk/sound/soc/codecs: ASoC: ad74111: clean up style
- Revision
- 9772
- Author
- vapier
- Date
- 2011-03-26 04:28:09 -0400 (Sat, 26 Mar 2011)
Log Message
ASoC: ad74111: clean up style
Modified Paths
Diff
Modified: trunk/sound/soc/codecs/ad74111.c (9771 => 9772)
--- trunk/sound/soc/codecs/ad74111.c 2011-03-26 08:01:59 UTC (rev 9771)
+++ trunk/sound/soc/codecs/ad74111.c 2011-03-26 08:28:09 UTC (rev 9772)
@@ -1,13 +1,9 @@
/*
- * ad74111.c -- ALSA Soc AD74111 codec support
+ * ALSA Soc AD74111 codec support
*
- * Copyright: Analog Device Inc.
- * Author: Cliff Cai <[email protected]>
+ * Copyright 2009-2011 Analog Devices Inc.
*
- * 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.
+ * Licensed under the GPL-2 or later.
*/
#include <linux/init.h>
@@ -21,6 +17,8 @@
#include <sound/initval.h>
#include <sound/soc.h>
+#include "ad74111.h"
+
static struct snd_soc_dai_driver ad74111_dai = {
.name = "ad74111-hifi",
.playback = {
@@ -53,8 +51,8 @@
static struct platform_driver ad74111_codec_driver = {
.driver = {
- .name = "ad74111-codec",
- .owner = THIS_MODULE,
+ .name = "ad74111-codec",
+ .owner = THIS_MODULE,
},
.probe = ad74111_probe,
@@ -73,6 +71,6 @@
}
module_exit(ad74111_exit);
-MODULE_DESCRIPTION("ASoC ad74111 driver");
-MODULE_AUTHOR("Cliff Cai ");
+MODULE_DESCRIPTION("ASoC AD74111 driver");
+MODULE_AUTHOR("Cliff Cai");
MODULE_LICENSE("GPL");
Modified: trunk/sound/soc/codecs/ad74111.h (9771 => 9772)
--- trunk/sound/soc/codecs/ad74111.h 2011-03-26 08:01:59 UTC (rev 9771)
+++ trunk/sound/soc/codecs/ad74111.h 2011-03-26 08:28:09 UTC (rev 9772)
@@ -1,85 +1,63 @@
/*
- * File: sound/soc/codec/ad74111.h
- * Based on:
- * Author: Cliff Cai <[email protected]>
+ * definitions for AD74111 registers
*
- * Created: Thur Sep 25, 2008
- * Description: definitions for AD74111 registers
+ * Copyright 2006-2011 Analog Devices Inc.
*
- *
- * Modified:
- * Copyright 2006 Analog Devices Inc.
- *
- * 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 __AD74111_H__
#define __AD74111_H__
-#define AD_READ 0x0000
-#define AD_WRITE 0x8000
+#define AD_READ 0x0000
+#define AD_WRITE 0x8000
/* Control register A */
-#define CTRL_REG_A (0 << 11)
+#define CTRL_REG_A (0 << 11)
-#define REGA_REFAMP (1 << 2)
-#define REGA_REF (1 << 3)
-#define REGA_DAC (1 << 4)
-#define REGA_ADC (1 << 5)
-#define REGA_ADC_INPAMP (1 << 6)
+#define REGA_REFAMP (1 << 2)
+#define REGA_REF (1 << 3)
+#define REGA_DAC (1 << 4)
+#define REGA_ADC (1 << 5)
+#define REGA_ADC_INPAMP (1 << 6)
/* Control register B */
-#define CTRL_REG_B (1 << 11)
+#define CTRL_REG_B (1 << 11)
-#define REGB_FCLKDIV(x) (x & 0x3)
-#define REGB_SCLKDIV(x) ((x & 0x3) << 2)
-#define REGB_TCLKDIV(x) ((x & 0x3) << 4)
+#define REGB_FCLKDIV(x) ((x) & 0x3)
+#define REGB_SCLKDIV(x) (((x) & 0x3) << 2)
+#define REGB_TCLKDIV(x) (((x) & 0x3) << 4)
/* Control register C */
-#define CTRL_REG_C (2 << 11)
+#define CTRL_REG_C (2 << 11)
-#define REGC_ADC_HP (1 << 0)
-#define REGC_DAC_DEEMPH(x) ((x & 0x3) << 1)
-#define REGC_LG_DELAY (1 << 3)
-#define REGC_WORD_WIDTH(x) ((x & 0x3) << 4)
+#define REGC_ADC_HP (1 << 0)
+#define REGC_DAC_DEEMPH(x) (((x) & 0x3) << 1)
+#define REGC_LG_DELAY (1 << 3)
+#define REGC_WORD_WIDTH(x) (((x) & 0x3) << 4)
/* Control register D */
-#define CTRL_REG_D (3 << 11)
+#define CTRL_REG_D (3 << 11)
-#define REGD_MASTER (1 << 0)
-#define REGD_FDCLK (1 << 1)
-#define REGD_DSP_MODE (1 << 2)
-#define REGD_MIX_MODE (1 << 3)
-#define REGD_MFS (1 << 9)
+#define REGD_MASTER (1 << 0)
+#define REGD_FDCLK (1 << 1)
+#define REGD_DSP_MODE (1 << 2)
+#define REGD_MIX_MODE (1 << 3)
+#define REGD_MFS (1 << 9)
/* Control register E */
-#define CTRL_REG_E (4 << 11)
+#define CTRL_REG_E (4 << 11)
-#define REGE_DAC_MUTE (1 << 0)
-#define REGE_ADC_MUTE (1 << 1)
-#define REGE_ADC_GAIN(x) ((x & 0x7) << 2)
-#define REGE_ADC_PEAKEN (1 << 5)
+#define REGE_DAC_MUTE (1 << 0)
+#define REGE_ADC_MUTE (1 << 1)
+#define REGE_ADC_GAIN(x) (((x) & 0x7) << 2)
+#define REGE_ADC_PEAKEN (1 << 5)
/* Control register F */
-#define CTRL_REG_F (5 << 11)
-#define REGF_DAC_VOL(x) (x & 0x3F)
+#define CTRL_REG_F (5 << 11)
+#define REGF_DAC_VOL(x) ((x) & 0x3F)
/* Control register G */
-#define CTRL_REG_G (6 << 11)
+#define CTRL_REG_G (6 << 11)
#endif
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits