Skip to contentSkip to conversation

Add support for Cirrus Logic CS47L24 and WM1831 codecs

PATCH Superseded Richard Fitzgerald 2 participants 7 messages Oct 19, 2015

Subsystems (8)
Device tree bindings Sound ASoC GPIO +4 more subsystems

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Add support for Cirrus Logic CS47L24 and WM1831 codecs

mfd patch based on Lee Jones's for-next
gpio patch based on Linus Walleij's for-next
ASoC patch based on Mark Brown's for-next

Lee/Mark - can one of you take all three patches (with maintainer acks) so that the patch set is kept together?

Richard Fitzgerald (3):
mfd: arizona: Support Cirrus Logic CS47L24 and WM1831
gpio: arizona: Support Cirrus Logic CS47L24 and WM1831
ASoC: cs47l24: Add driver for Cirrus Logic CS47L24 and WM1831 codecs

 Documentation/devicetree/bindings/mfd/arizona.txt |    4 +-
 drivers/gpio/gpio-arizona.c                       |    4 +
 drivers/mfd/Kconfig                               |   19 +-
 drivers/mfd/Makefile                              |    3 +
 drivers/mfd/arizona-core.c                        |   72 +-
 drivers/mfd/arizona-irq.c                         |   40 +-
 drivers/mfd/arizona-spi.c                         |    7 +
 drivers/mfd/arizona.h                             |    4 +
 drivers/mfd/cs47l24-tables.c                      | 1629 +++++++++++++++++++++
 include/linux/mfd/arizona/core.h                  |    3 +
 sound/soc/codecs/Kconfig                          |    8 +
 sound/soc/codecs/Makefile                         |    2 +
 sound/soc/codecs/cs47l24.c                        | 1147 +++++++++++++++
 sound/soc/codecs/cs47l24.h                        |   23 +
 14 files changed, 2940 insertions(+), 25 deletions(-)
 create mode 100644 drivers/mfd/cs47l24-tables.c
 create mode 100644 sound/soc/codecs/cs47l24.c
 create mode 100644 sound/soc/codecs/cs47l24.h
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/3 mfd: arizona: Support Cirrus Logic CS47L24 and WM1831

This patch adds the regmap configuration tables and core MFD handling for the CS47L24 and WM1831 codecs.

Note that compared to the other Arizona codecs, these devices do not have an LDO1 or micsupp regulators, extcon driver, or the DCVDD isolation control.

---
 Documentation/devicetree/bindings/mfd/arizona.txt |    4 +-
 drivers/mfd/Kconfig                               |   19 +-
 drivers/mfd/Makefile                              |    3 +
 drivers/mfd/arizona-core.c                        |   72 +-
 drivers/mfd/arizona-irq.c                         |   40 +-
 drivers/mfd/arizona-spi.c                         |    7 +
 drivers/mfd/arizona.h                             |    4 +
 drivers/mfd/cs47l24-tables.c                      | 1629 +++++++++++++++++++++
 include/linux/mfd/arizona/core.h                  |    3 +
 9 files changed, 1756 insertions(+), 25 deletions(-)
 create mode 100644 drivers/mfd/cs47l24-tables.c
Documentation/devicetree/bindings/mfd/arizona.txt +3 -1
index a8fee60..73f28fa 100644
@@ -1,4 +1,4 @@
-Wolfson Arizona class audio SoCs
+Cirrus Logic/Wolfson Microelectronics Arizona class audio SoCs
 
 These devices are audio SoCs with extensive digital capabilites and a range
 of analogue I/O.
@@ -12,6 +12,8 @@ Required properties:
         "wlf,wm8997"
         "wlf,wm8998"
         "wlf,wm1814"
+        "wlf,wm1831"
+        "cirrus,cs47l24"
 
   - reg : I2C slave address when connected using I2C, chip select number when
     using SPI.
drivers/mfd/Kconfig +13 -6
index 4d92df6..d25bbb3 100644
@@ -1370,24 +1370,24 @@ config MFD_ARIZONA
 	bool
 
 config MFD_ARIZONA_I2C
-	tristate "Wolfson Microelectronics Arizona platform with I2C"
+	tristate "Cirrus Logic/Wolfson Microelectronics Arizona platform with I2C"
 	select MFD_ARIZONA
 	select MFD_CORE
 	select REGMAP_I2C
 	depends on I2C
 	help
-	  Support for the Wolfson Microelectronics Arizona platform audio SoC
-	  core functionality controlled via I2C.
+	  Support for the Cirrus Logic/Wolfson Microelectronics Arizona platform
+	  audio SoC core functionality controlled via I2C.
 
 config MFD_ARIZONA_SPI
-	tristate "Wolfson Microelectronics Arizona platform with SPI"
+	tristate "Cirrus Logic/Wolfson Microelectronics Arizona platform with SPI"
 	select MFD_ARIZONA
 	select MFD_CORE
 	select REGMAP_SPI
 	depends on SPI_MASTER
 	help
-	  Support for the Wolfson Microelectronics Arizona platform audio SoC
-	  core functionality controlled via I2C.
+	  Support for the Cirrus Logic/Wolfson Microelectronics Arizona platform
+	  audio SoC core functionality controlled via I2C.
 
 config MFD_WM5102
 	bool "Wolfson Microelectronics WM5102"
@@ -1414,6 +1414,13 @@ config MFD_WM8998
 	help
 	  Support for Wolfson Microelectronics WM8998 low power audio SoC
 
+config MFD_CS47L24
+	bool "Cirrus Logic CS47L24 and WM1831"
+	depends on MFD_ARIZONA
+	help
+	  Support for Cirrus Logic CS47L24 and WM1831 low power audio SoC
+
+
 config MFD_WM8400
 	bool "Wolfson Microelectronics WM8400"
 	select MFD_CORE
drivers/mfd/Makefile +3 -0
index a8b76b8..3fa1df4 100644
@@ -51,6 +51,9 @@ endif
 ifeq ($(CONFIG_MFD_WM8998),y)
 obj-$(CONFIG_MFD_ARIZONA)	+= wm8998-tables.o
 endif
+ifeq ($(CONFIG_MFD_CS47L24),y)
+obj-$(CONFIG_MFD_ARIZONA)	+= cs47l24-tables.o
+endif
 obj-$(CONFIG_MFD_WM8400)	+= wm8400-core.o
 wm831x-objs			:= wm831x-core.o wm831x-irq.o wm831x-otp.o
 wm831x-objs			+= wm831x-auxadc.o
drivers/mfd/arizona-core.c +67 -5

120 lines not on this page · raw message

drivers/mfd/arizona-irq.c +27 -13
index 3d425e9..682bc86 100644
@@ -30,11 +30,13 @@ static int arizona_map_irq(struct arizona *arizona, int irq)
 {
 	int ret;
 
-	ret = regmap_irq_get_virq(arizona->aod_irq_chip, irq);
-	if (ret < 0)
-		ret = regmap_irq_get_virq(arizona->irq_chip, irq);
+	if (arizona->aod_irq_chip) {
+		ret = regmap_irq_get_virq(arizona->aod_irq_chip, irq);
+		if (ret >= 0)
+			return ret;
+	}
 
-	return ret;
+	return regmap_irq_get_virq(arizona->irq_chip, irq);
 }
 
 int arizona_request_irq(struct arizona *arizona, int irq, char *name,
@@ -107,8 +109,8 @@ static irqreturn_t arizona_irq_thread(int irq, void *data)
 	do {
 		poll = false;
 
-		/* Always handle the AoD domain */
-		handle_nested_irq(irq_find_mapping(arizona->virq, 0));
+		if (arizona->aod_irq_chip)
+			handle_nested_irq(irq_find_mapping(arizona->virq, 0));
 
 		/*
 		 * Check if one of the main interrupts is asserted and only
@@ -219,6 +221,15 @@ int arizona_irq_init(struct arizona *arizona)
 		arizona->ctrlif_error = false;
 		break;
 #endif
+#ifdef CONFIG_MFD_CS47L24
+	case WM1831:
+	case CS47L24:
+		aod = NULL;
+		irq = &cs47l24_irq;
+
+		arizona->ctrlif_error = false;
+		break;
+#endif
 #ifdef CONFIG_MFD_WM8997
 	case WM8997:
 		aod = &wm8997_aod;
@@ -291,13 +302,16 @@ int arizona_irq_init(struct arizona *arizona)
 		goto err;
 	}
 
-	ret = regmap_add_irq_chip(arizona->regmap,
-				  irq_create_mapping(arizona->virq, 0),
-				  IRQF_ONESHOT, 0, aod,
-				  &arizona->aod_irq_chip);
-	if (ret != 0) {
-		dev_err(arizona->dev, "Failed to add AOD IRQs: %d\n", ret);
-		goto err_domain;
+	if (aod) {
+		ret = regmap_add_irq_chip(arizona->regmap,
+					  irq_create_mapping(arizona->virq, 0),
+					  IRQF_ONESHOT, 0, aod,
+					  &arizona->aod_irq_chip);
+		if (ret != 0) {
+			dev_err(arizona->dev,
+				"Failed to add AOD IRQs: %d\n", ret);
+			goto err_domain;
+		}
 	}
 
 	ret = regmap_add_irq_chip(arizona->regmap,
drivers/mfd/arizona-spi.c +7 -0
index 8cffb1c..b006771 100644
@@ -46,6 +46,11 @@ static int arizona_spi_probe(struct spi_device *spi)
 		if (IS_ENABLED(CONFIG_MFD_WM5110))
 			regmap_config = &wm5110_spi_regmap;
 		break;
+	case WM1831:
+	case CS47L24:
+		if (IS_ENABLED(CONFIG_MFD_CS47L24))
+			regmap_config = &cs47l24_spi_regmap;
+		break;
 	default:
 		dev_err(&spi->dev, "Unknown device type %ld\n", type);
 		return -EINVAL;
@@ -89,6 +94,8 @@ static const struct spi_device_id arizona_spi_ids[] = {
 	{ "wm5102", WM5102 },
 	{ "wm5110", WM5110 },
 	{ "wm8280", WM8280 },
+	{ "wm1831", WM1831 },
+	{ "cs47l24", CS47L24 },
 	{ },
 };
 MODULE_DEVICE_TABLE(spi, arizona_spi_ids);
drivers/mfd/arizona.h +4 -0
index 3af12e9..198e9ce 100644
@@ -25,6 +25,8 @@ extern const struct regmap_config wm5102_spi_regmap;
 extern const struct regmap_config wm5110_i2c_regmap;
 extern const struct regmap_config wm5110_spi_regmap;
 
+extern const struct regmap_config cs47l24_spi_regmap;
+
 extern const struct regmap_config wm8997_i2c_regmap;
 
 extern const struct regmap_config wm8998_i2c_regmap;
@@ -40,6 +42,8 @@ extern const struct regmap_irq_chip wm5110_aod;
 extern const struct regmap_irq_chip wm5110_irq;
 extern const struct regmap_irq_chip wm5110_revd_irq;
 
+extern const struct regmap_irq_chip cs47l24_irq;
+
 extern const struct regmap_irq_chip wm8997_aod;
 extern const struct regmap_irq_chip wm8997_irq;
 
drivers/mfd/cs47l24-tables.c new file +1629 -0

1,629 lines not on this page · raw message

include/linux/mfd/arizona/core.h +3 -0
index 79e607e..d55a422 100644
@@ -27,6 +27,8 @@ enum arizona_type {
 	WM8280 = 4,
 	WM8998 = 5,
 	WM1814 = 6,
+	WM1831 = 7,
+	CS47L24 = 8,
 };
 
 #define ARIZONA_IRQ_GP1                    0
@@ -166,6 +168,7 @@ static inline int wm5102_patch(struct arizona *arizona)
 #endif
 
 int wm5110_patch(struct arizona *arizona);
+int cs47l24_patch(struct arizona *arizona);
 int wm8997_patch(struct arizona *arizona);
 int wm8998_patch(struct arizona *arizona);
 
Signature · 1 line
1.9.1
#2 lore raw

Re: [PATCH 1/3] mfd: arizona: Support Cirrus Logic CS47L24 and WM1831

reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree…

Hi Richard,

[auto build test WARNING on next-20151016 -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url:    https://github.com/0day-ci/linux/commits/Richard-Fitzgerald/Add-support-for-Cirrus-Logic-CS47L24-and-WM1831-codecs/20151019-203503
config: tile-allyesconfig (attached as .config)

reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=tile

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

drivers/mfd/arizona-core.c: In function 'arizona_dev_init':

>> drivers/mfd/arizona-core.c:1282:2: warning: 'type_name' may be used uninitialized in this function [-Wuninitialized]

vim +/type_name +1282 drivers/mfd/arizona-core.c

6887b042 Richard Fitzgerald 2015-07-03  1266  			apply_patch = wm8998_patch;
d9ad0cff Richard Fitzgerald 2015-10-02  1267  			subdevs = wm8998_devs;
d9ad0cff Richard Fitzgerald 2015-10-02  1268  			n_subdevs = ARRAY_SIZE(wm8998_devs);
c9ca1ca2 Richard Fitzgerald 2015-10-02  1269  		}
6887b042 Richard Fitzgerald 2015-07-03  1270  		break;
ca76ceb8 Mark Brown         2013-04-09  1271  	default:
ca76ceb8 Mark Brown         2013-04-09  1272  		dev_err(arizona->dev, "Unknown device ID %x\n", reg);
ca76ceb8 Mark Brown         2013-04-09  1273  		goto err_reset;
ca76ceb8 Mark Brown         2013-04-09  1274  	}
ca76ceb8 Mark Brown         2013-04-09  1275  
c9ca1ca2 Richard Fitzgerald 2015-10-02  1276  	if (!subdevs) {
c9ca1ca2 Richard Fitzgerald 2015-10-02  1277  		dev_err(arizona->dev,
c9ca1ca2 Richard Fitzgerald 2015-10-02  1278  			"No kernel support for device ID %x\n", reg);
c9ca1ca2 Richard Fitzgerald 2015-10-02  1279  		goto err_reset;
c9ca1ca2 Richard Fitzgerald 2015-10-02  1280  	}
c9ca1ca2 Richard Fitzgerald 2015-10-02  1281  
ca76ceb8 Mark Brown         2013-04-09 @1282  	dev_info(dev, "%s revision %c\n", type_name, arizona->rev + 'A');
ca76ceb8 Mark Brown         2013-04-09  1283  
62d62b59 Mark Brown         2012-12-02  1284  	if (apply_patch) {
62d62b59 Mark Brown         2012-12-02  1285  		ret = apply_patch(arizona);
62d62b59 Mark Brown         2012-12-02  1286  		if (ret != 0) {
62d62b59 Mark Brown         2012-12-02  1287  			dev_err(arizona->dev, "Failed to apply patch: %d\n",
62d62b59 Mark Brown         2012-12-02  1288  				ret);
62d62b59 Mark Brown         2012-12-02  1289  			goto err_reset;
62d62b59 Mark Brown         2012-12-02  1290  		}

:::::: The code at line 1282 was first introduced by commit
:::::: ca76ceb8b9ca1466be9b6de5e4c0fb19b37417ee mfd: arizona: Read the device identification information after boot

:::::: TO: Mark Brown <[email protected]> :::::: CC: Mark Brown <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#3 lore raw

Re: [PATCH 1/3] mfd: arizona: Support Cirrus Logic CS47L24 and WM1831

In reply to Richard Fitzgerald
reproduce:

Hi Richard,

[auto build test WARNING on next-20151016 -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url:    https://github.com/0day-ci/linux/commits/Richard-Fitzgerald/Add-support-for-Cirrus-Logic-CS47L24-and-WM1831-codecs/20151019-203503
config: i386-allmodconfig (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

drivers/mfd/cs47l24-tables.c: In function 'cs47l24_patch':

>> drivers/mfd/cs47l24-tables.c:33:10: warning: passing argument 2 of 'regmap_register_patch' from incompatible pointer type [-Wincompatible-pointer-types]
             cs47l24_reva_patch,
             ^
   In file included from include/linux/mfd/arizona/core.h:17:0,
                    from drivers/mfd/cs47l24-tables.c:15:

include/linux/regmap.h:726:5: note: expected 'const struct reg_sequence *' but argument is of type 'const struct reg_default *'
int regmap_register_patch(struct regmap *map, const struct reg_sequence *regs,
^

vim +/regmap_register_patch +33 drivers/mfd/cs47l24-tables.c

    17	#include <linux/device.h>
    18	
    19	#include "arizona.h"
    20	
    21	#define CS47L24_NUM_ISR 5
    22	
    23	static const struct reg_default cs47l24_reva_patch[] = {
    24		{ 0x80,  0x3 },
    25		{ 0x27C, 0x0010 },
    26		{ 0x221, 0x0070 },
    27		{ 0x80,  0x0 },
    28	};
    29	
    30	int cs47l24_patch(struct arizona *arizona)
    31	{
    32		return regmap_register_patch(arizona->regmap,
  > 33					     cs47l24_reva_patch,
    34					     ARRAY_SIZE(cs47l24_reva_patch));
    35	}
    36	EXPORT_SYMBOL_GPL(cs47l24_patch);
    37	
    38	static const struct regmap_irq cs47l24_irqs[ARIZONA_NUM_IRQ] = {
    39		[ARIZONA_IRQ_GP2] = { .reg_offset = 0, .mask = ARIZONA_GP2_EINT1 },
    40		[ARIZONA_IRQ_GP1] = { .reg_offset = 0, .mask = ARIZONA_GP1_EINT1 },
    41	

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#4 lore raw

Re: [PATCH 1/3] mfd: arizona: Support Cirrus Logic CS47L24 and WM1831

In reply to Richard Fitzgerald
url: https://github.com/0day-ci/linux/commits/Richard-Fitzgerald/Add-support-for-Cirrus-Logic-CS47L24-and-WM1831-codecs/20151019-203503 reproduce:

Hi Richard,

[auto build test WARNING on next-20151016 -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url: https://github.com/0day-ci/linux/commits/Richard-Fitzgerald/Add-support-for-Cirrus-Logic-CS47L24-and-WM1831-codecs/20151019-203503
reproduce:

        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__

sparse warnings: (new ones prefixed by >>)

>> drivers/mfd/cs47l24-tables.c:33:38: sparse: incorrect type in argument 2 (different base types)
   drivers/mfd/cs47l24-tables.c:33:38:    expected struct reg_sequence const *regs
   drivers/mfd/cs47l24-tables.c:33:38:    got struct reg_default static const [toplevel] *<noident>
   drivers/mfd/cs47l24-tables.c: In function 'cs47l24_patch':
   drivers/mfd/cs47l24-tables.c:33:10: warning: passing argument 2 of 'regmap_register_patch' from incompatible pointer type [-Wincompatible-pointer-types]
             cs47l24_reva_patch,
             ^
   In file included from include/linux/mfd/arizona/core.h:17:0,
                    from drivers/mfd/cs47l24-tables.c:15:

include/linux/regmap.h:726:5: note: expected 'const struct reg_sequence *' but argument is of type 'const struct reg_default *'
int regmap_register_patch(struct regmap *map, const struct reg_sequence *regs,
^

vim +33 drivers/mfd/cs47l24-tables.c

    17	#include <linux/device.h>
    18	
    19	#include "arizona.h"
    20	
    21	#define CS47L24_NUM_ISR 5
    22	
    23	static const struct reg_default cs47l24_reva_patch[] = {
    24		{ 0x80,  0x3 },
    25		{ 0x27C, 0x0010 },
    26		{ 0x221, 0x0070 },
    27		{ 0x80,  0x0 },
    28	};
    29	
    30	int cs47l24_patch(struct arizona *arizona)
    31	{
    32		return regmap_register_patch(arizona->regmap,
  > 33					     cs47l24_reva_patch,
    34					     ARRAY_SIZE(cs47l24_reva_patch));
    35	}
    36	EXPORT_SYMBOL_GPL(cs47l24_patch);
    37	
    38	static const struct regmap_irq cs47l24_irqs[ARIZONA_NUM_IRQ] = {
    39		[ARIZONA_IRQ_GP2] = { .reg_offset = 0, .mask = ARIZONA_GP2_EINT1 },
    40		[ARIZONA_IRQ_GP1] = { .reg_offset = 0, .mask = ARIZONA_GP1_EINT1 },
    41	

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#5 lore raw

PATCH 2/3 gpio: arizona: Support Cirrus Logic CS47L24 and WM1831

In reply to Richard Fitzgerald

The CS47L24 and WM1831 codecs only have two GPIO lines, but are otherwise similar to the WM8280.

---
 drivers/gpio/gpio-arizona.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpio/gpio-arizona.c +4 -0
index ca00273..624ea54 100644
@@ -122,6 +122,10 @@ static int arizona_gpio_probe(struct platform_device *pdev)
 	case WM1814:
 		arizona_gpio->gpio_chip.ngpio = 5;
 		break;
+	case WM1831:
+	case CS47L24:
+		arizona_gpio->gpio_chip.ngpio = 2;
+		break;
 	default:
 		dev_err(&pdev->dev, "Unknown chip variant %d\n",
 			arizona->type);
Signature · 1 line
1.9.1
#6 lore raw

PATCH 3/3 ASoC: cs47l24: Add driver for Cirrus Logic CS47L24 and WM1831 codecs

In reply to Richard Fitzgerald

This patch adds support for the Cirrus Logic CS47L24 and WM1831 codecs.

---
 sound/soc/codecs/Kconfig   |    8 +
 sound/soc/codecs/Makefile  |    2 +
 sound/soc/codecs/cs47l24.c | 1148 ++++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/cs47l24.h |   23 +
 4 files changed, 1181 insertions(+)
 create mode 100644 sound/soc/codecs/cs47l24.c
 create mode 100644 sound/soc/codecs/cs47l24.h
sound/soc/codecs/Kconfig +8 -0
index cfdafc4..4d229d0 100644
@@ -134,6 +134,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_WM5100 if I2C
 	select SND_SOC_WM5102 if MFD_WM5102
 	select SND_SOC_WM5110 if MFD_WM5110
+	select SND_SOC_CS47L24 if MFD_CS47L24
 	select SND_SOC_WM8350 if MFD_WM8350
 	select SND_SOC_WM8400 if MFD_WM8400
 	select SND_SOC_WM8510 if SND_SOC_I2C_AND_SPI
@@ -197,10 +198,12 @@ config SND_SOC_ARIZONA
 	tristate
 	default y if SND_SOC_WM5102=y
 	default y if SND_SOC_WM5110=y
+	default y if SND_SOC_CS47L24=y
 	default y if SND_SOC_WM8997=y
 	default y if SND_SOC_WM8998=y
 	default m if SND_SOC_WM5102=m
 	default m if SND_SOC_WM5110=m
+	default m if SND_SOC_CS47L24=m
 	default m if SND_SOC_WM8997=m
 	default m if SND_SOC_WM8998=m
 
@@ -213,9 +216,11 @@ config SND_SOC_WM_ADSP
 	tristate
 	default y if SND_SOC_WM5102=y
 	default y if SND_SOC_WM5110=y
+	default y if SND_SOC_CS47L24=y
 	default y if SND_SOC_WM2200=y
 	default m if SND_SOC_WM5102=m
 	default m if SND_SOC_WM5110=m
+	default m if SND_SOC_CS47L24=m
 	default m if SND_SOC_WM2200=m
 
 config SND_SOC_AB8500_CODEC
@@ -733,6 +738,9 @@ config SND_SOC_WM5102
 config SND_SOC_WM5110
 	tristate
 
+config SND_SOC_CS47L24
+	tristate "TEST cs47l24"
+
 config SND_SOC_WM8350
 	tristate
 
sound/soc/codecs/Makefile +2 -0
index f632fc4..45877b8 100644
@@ -138,6 +138,7 @@ snd-soc-wm2200-objs := wm2200.o
 snd-soc-wm5100-objs := wm5100.o wm5100-tables.o
 snd-soc-wm5102-objs := wm5102.o
 snd-soc-wm5110-objs := wm5110.o
+snd-soc-cs47l24-objs := cs47l24.o
 snd-soc-wm8350-objs := wm8350.o
 snd-soc-wm8400-objs := wm8400.o
 snd-soc-wm8510-objs := wm8510.o
@@ -329,6 +330,7 @@ obj-$(CONFIG_SND_SOC_WM2200)	+= snd-soc-wm2200.o
 obj-$(CONFIG_SND_SOC_WM5100)	+= snd-soc-wm5100.o
 obj-$(CONFIG_SND_SOC_WM5102)	+= snd-soc-wm5102.o
 obj-$(CONFIG_SND_SOC_WM5110)	+= snd-soc-wm5110.o
+obj-$(CONFIG_SND_SOC_CS47L24)	+= snd-soc-cs47l24.o
 obj-$(CONFIG_SND_SOC_WM8350)	+= snd-soc-wm8350.o
 obj-$(CONFIG_SND_SOC_WM8400)	+= snd-soc-wm8400.o
 obj-$(CONFIG_SND_SOC_WM8510)	+= snd-soc-wm8510.o
sound/soc/codecs/cs47l24.c new file +1148 -0

1,148 lines not on this page · raw message

sound/soc/codecs/cs47l24.h new file +23 -0
new file mode 100644
index 0000000..77ab2b7
@@ -0,0 +1,23 @@
+/*
+ * cs47l24.h  --  ALSA SoC Audio driver for Cirrus Logic CS47L24
+ *
+ * Copyright 2015 Cirrus Logic Inc.
+ *
+ * Author: Richard Fitzgerald <[email protected]>
+ *
+ * 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 _CS47L24_H
+#define _CS47L24_H
+
+#include "arizona.h"
+
+#define CS47L24_FLL1        1
+#define CS47L24_FLL2        2
+#define CS47L24_FLL1_REFCLK 3
+#define CS47L24_FLL2_REFCLK 4
+
+#endif
Signature · 1 line
1.9.1