Skip to contentSkip to conversation

ASoC: ak4641: Remove unused DAI ID defines

PATCH New Lars-Peter Clausen 1 participant 3 messages Oct 15, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ASoC: ak4641: Remove unused DAI ID defines

The DAI ID defines are back from the time when DAIs were referenced by a numerical ID. These days a string is used for matching instead and the defines are unused. This driver was merged after the change of DAIs are matched was made and the IDs were never used and presumably never will be, so remove them.

---
 sound/soc/codecs/ak4641.h | 6 ------
 1 file changed, 6 deletions(-)
sound/soc/codecs/ak4641.h +0 -6
index 4a26324..38b9e93 100644
@@ -38,10 +38,4 @@
 
 #define AK4641_CACHEREGNUM	0x14
 
-
-
-#define AK4641_DAI_HIFI		0
-#define AK4641_DAI_VOICE	1
-
-
 #endif
Signature · 1 line
2.1.4
#1 lore raw

PATCH 2/3 ASoC: ak4641: Remove unused AK4641_CACHEREGNUM define

The last user was removed in commit 4f534777c130 ("ASoC: ak4641: Convert to direct regmap API usage").

---
 sound/soc/codecs/ak4641.h | 2 --
 1 file changed, 2 deletions(-)
sound/soc/codecs/ak4641.h +0 -2
index 38b9e93..e00af5c 100644
@@ -36,6 +36,4 @@
 #define AK4641_EQHI		0x12
 #define AK4641_BTIF		0x13
 
-#define AK4641_CACHEREGNUM	0x14
-
 #endif
Signature · 1 line
2.1.4
#2 lore raw

PATCH 3/3 ASoC: ak4641: Move register defines to main source

In reply to Lars-Peter Clausen

The ak4641 driver only has a few register defines. As they are only used in the one main driver file there is not really a need to keep them in a separate header.

Moving them to the main source file allows to remove the now empty header file completely.

---
 sound/soc/codecs/ak4641.c | 22 +++++++++++++++++++++-
 sound/soc/codecs/ak4641.h | 39 ---------------------------------------
 sound/soc/pxa/hx4700.c    |  2 --
 3 files changed, 21 insertions(+), 42 deletions(-)
 delete mode 100644 sound/soc/codecs/ak4641.h
sound/soc/codecs/ak4641.c +21 -1
index c91717d..ebdaf56 100644
@@ -27,7 +27,27 @@
 #include <sound/tlv.h>
 #include <sound/ak4641.h>
 
-#include "ak4641.h"
+/* AK4641 register space */
+#define AK4641_PM1		0x00
+#define AK4641_PM2		0x01
+#define AK4641_SIG1		0x02
+#define AK4641_SIG2		0x03
+#define AK4641_MODE1		0x04
+#define AK4641_MODE2		0x05
+#define AK4641_DAC		0x06
+#define AK4641_MIC		0x07
+#define AK4641_TIMER		0x08
+#define AK4641_ALC1		0x09
+#define AK4641_ALC2		0x0a
+#define AK4641_PGA		0x0b
+#define AK4641_LATT		0x0c
+#define AK4641_RATT		0x0d
+#define AK4641_VOL		0x0e
+#define AK4641_STATUS		0x0f
+#define AK4641_EQLO		0x10
+#define AK4641_EQMID		0x11
+#define AK4641_EQHI		0x12
+#define AK4641_BTIF		0x13
 
 /* codec private data */
 struct ak4641_priv {
sound/soc/codecs/ak4641.h deleted +0 -39
deleted file mode 100644
index e00af5c..0000000
@@ -1,39 +0,0 @@
-/*
- * ak4641.h  --  AK4641 SoC Audio driver
- *
- * Copyright 2008 Harald Welte <[email protected]>
- *
- * Based on ak4535.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef _AK4641_H
-#define _AK4641_H
-
-/* AK4641 register space */
-
-#define AK4641_PM1		0x00
-#define AK4641_PM2		0x01
-#define AK4641_SIG1		0x02
-#define AK4641_SIG2		0x03
-#define AK4641_MODE1		0x04
-#define AK4641_MODE2		0x05
-#define AK4641_DAC		0x06
-#define AK4641_MIC		0x07
-#define AK4641_TIMER		0x08
-#define AK4641_ALC1		0x09
-#define AK4641_ALC2		0x0a
-#define AK4641_PGA		0x0b
-#define AK4641_LATT		0x0c
-#define AK4641_RATT		0x0d
-#define AK4641_VOL		0x0e
-#define AK4641_STATUS		0x0f
-#define AK4641_EQLO		0x10
-#define AK4641_EQMID		0x11
-#define AK4641_EQHI		0x12
-#define AK4641_BTIF		0x13
-
-#endif
sound/soc/pxa/hx4700.c +0 -2
index ecbf287..8548304 100644
@@ -27,8 +27,6 @@
 #include <asm/mach-types.h>
 #include "pxa2xx-i2s.h"
 
-#include "../codecs/ak4641.h"
-
 static struct snd_soc_jack hs_jack;
 
 /* Headphones jack detection DAPM pin */
Signature · 1 line
2.1.4