All of lore.kernel.org
 help / color / mirror / Atom feed
* [alsa_devel] [PATCH v3 0/2] ASoC: add driver support for Conexant CX2092X DSP
@ 2017-02-21 13:58 simon.ho.cnxt
  2017-02-21 13:58 ` [alsa_devel] [PATCH v3 1/2] doc: cx2092x: Add DT bingings doc for " simon.ho.cnxt
  2017-02-21 13:58 ` [alsa_devel] [PATCH v3 2/2] ASoC: Add driver support fro Conexant " simon.ho.cnxt
  0 siblings, 2 replies; 16+ messages in thread
From: simon.ho.cnxt @ 2017-02-21 13:58 UTC (permalink / raw)
  To: alsa-devel; +Cc: Simon Ho, tiwai, broonie, lgirdwood

From: Simon Ho <simon.ho@conexant.com>

Hi Mark, Takashi

I corrected the driver based on your input as below.

  - GPIO specifier names have to be pluralised. 
  - Using gpiod_ instead of gpio APIs.
  - Using cansleep () gpio version.
  - Using cansleep () gpio version.
  - Moving the driver information to patch description.

Thanks,

Simoon

Simon Ho (2):
  doc: cx2092x: Add DT bingings doc for CX2092X DSP
  ASoC: Add driver support fro Conexant CX2092X DSP

 .../devicetree/bindings/sound/cnxt,cx2092x.txt     |  29 ++
 sound/soc/codecs/Kconfig                           |  17 +
 sound/soc/codecs/Makefile                          |   6 +
 sound/soc/codecs/cx2092x-i2c.c                     |  54 +++
 sound/soc/codecs/cx2092x-spi.c                     |  57 +++
 sound/soc/codecs/cx2092x.c                         | 411 +++++++++++++++++++++
 sound/soc/codecs/cx2092x.h                         |  26 ++
 7 files changed, 600 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/cnxt,cx2092x.txt
 create mode 100644 sound/soc/codecs/cx2092x-i2c.c
 create mode 100644 sound/soc/codecs/cx2092x-spi.c
 create mode 100644 sound/soc/codecs/cx2092x.c
 create mode 100644 sound/soc/codecs/cx2092x.h

-- 
2.7.4

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [alsa_devel] [PATCH v3 1/2] doc: cx2092x: Add DT bingings doc for CX2092X DSP
  2017-02-21 13:58 [alsa_devel] [PATCH v3 0/2] ASoC: add driver support for Conexant CX2092X DSP simon.ho.cnxt
@ 2017-02-21 13:58 ` simon.ho.cnxt
  2017-02-21 13:58 ` [alsa_devel] [PATCH v3 2/2] ASoC: Add driver support fro Conexant " simon.ho.cnxt
  1 sibling, 0 replies; 16+ messages in thread
From: simon.ho.cnxt @ 2017-02-21 13:58 UTC (permalink / raw)
  To: alsa-devel; +Cc: Simon Ho, tiwai, broonie, lgirdwood

From: Simon Ho <simon.ho@conexant.com>

Initial version of CX2092X device tree bindings document.

Signed-off-by: Simon Ho <simon.ho@conexant.com>
---
 .../devicetree/bindings/sound/cnxt,cx2092x.txt     | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/cnxt,cx2092x.txt

diff --git a/Documentation/devicetree/bindings/sound/cnxt,cx2092x.txt b/Documentation/devicetree/bindings/sound/cnxt,cx2092x.txt
new file mode 100644
index 0000000..72928bd
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/cnxt,cx2092x.txt
@@ -0,0 +1,29 @@
+Conexant CX20921/CX209724 Voice Processor DSP
+
+The devices supports both the I2C and SPI bus.
+
+Required properties:
+
+  - compatible: One of "cnxt,cx20921", "cnxt,cx20924".
+  - reg: The I2C address of the device for I2C, it should be <0x41>
+
+Optional properties:
+
+  - reset-gpios: A GPIO spec to define which pin is connected to the chip's
+		 !RESET pin. If specified, the driver will assert a hardware
+		 reset at probe time.
+
+CODEC input pins:
+  "MIC"	- Microphone input
+
+Example:
+
+codec_i2c: cx20921@41 {
+	compatible = "cnxt,cx20921";
+	reg = <0x41>;
+	reset-gpios = <&gpio1 23 0>;
+};
+
+codec_spi: cx20924@0 {
+	compatible = "cnxt,cx20924";
+};
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [alsa_devel] [PATCH v3 2/2] ASoC: Add driver support fro Conexant CX2092X DSP
  2017-02-21 13:58 [alsa_devel] [PATCH v3 0/2] ASoC: add driver support for Conexant CX2092X DSP simon.ho.cnxt
  2017-02-21 13:58 ` [alsa_devel] [PATCH v3 1/2] doc: cx2092x: Add DT bingings doc for " simon.ho.cnxt
@ 2017-02-21 13:58 ` simon.ho.cnxt
  2017-02-21 17:44   ` kbuild test robot
  2017-02-21 17:44   ` [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings kbuild test robot
  1 sibling, 2 replies; 16+ messages in thread
From: simon.ho.cnxt @ 2017-02-21 13:58 UTC (permalink / raw)
  To: alsa-devel; +Cc: Simon Ho, tiwai, broonie, lgirdwood

From: Simon Ho <simon.ho@conexant.com>

Initial commit of Conexant CX20921/CX20924 I2S Audio DSP driver

The CX2092X devices are designed for virtual assisant application need to
be always open, listening for users to summon it. There is no any power
saving mode support on this device. The processed voice data will be sent
to automatic speech recognition (ASR) application for further processing.

Signed-off-by: Simon Ho <simon.ho@conexant.com>
---
 sound/soc/codecs/Kconfig       |  17 ++
 sound/soc/codecs/Makefile      |   6 +
 sound/soc/codecs/cx2092x-i2c.c |  54 ++++++
 sound/soc/codecs/cx2092x-spi.c |  57 ++++++
 sound/soc/codecs/cx2092x.c     | 411 +++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/cx2092x.h     |  26 +++
 6 files changed, 571 insertions(+)
 create mode 100644 sound/soc/codecs/cx2092x-i2c.c
 create mode 100644 sound/soc/codecs/cx2092x-spi.c
 create mode 100644 sound/soc/codecs/cx2092x.c
 create mode 100644 sound/soc/codecs/cx2092x.h

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index e49e9da..a98d3c2 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -63,6 +63,8 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_CS47L24 if MFD_CS47L24
 	select SND_SOC_CS53L30 if I2C
 	select SND_SOC_CX20442 if TTY
+	select SND_SOC_CX2092X_I2C if I2C
+	select SND_SOC_CX2092X_SPI if SPI_MASTER
 	select SND_SOC_DA7210 if SND_SOC_I2C_AND_SPI
 	select SND_SOC_DA7213 if I2C
 	select SND_SOC_DA7218 if I2C
@@ -491,6 +493,21 @@ config SND_SOC_CX20442
 	tristate
 	depends on TTY
 
+config SND_SOC_CX2092X
+	tristate
+
+config SND_SOC_CX2092X_I2C
+	tristate "Conexant CX20921/CX2094 CODEC (I2C)"
+	depends on I2C
+	select SND_SOC_CX2092X
+	select REGMAP_I2C
+
+config SND_SOC_CX2092X_SPI
+	tristate "Conexant CX20921/CX2094 CODEC (SPI)"
+	depends on SPI_MASTER
+	select SND_SOC_CX2092X
+	select REGMAP_SPI
+
 config SND_SOC_JZ4740_CODEC
 	select REGMAP_MMIO
 	tristate
diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
index 1796cb9..e30a398 100644
--- a/sound/soc/codecs/Makefile
+++ b/sound/soc/codecs/Makefile
@@ -56,6 +56,9 @@ snd-soc-cs4349-objs := cs4349.o
 snd-soc-cs47l24-objs := cs47l24.o
 snd-soc-cs53l30-objs := cs53l30.o
 snd-soc-cx20442-objs := cx20442.o
+snd-soc-cx2092x-objs := cx2092x.o
+snd-soc-cx2092x-i2c-objs := cx2092x-i2c.o
+snd-soc-cx2092x-spi-objs := cx2092x-spi.o
 snd-soc-da7210-objs := da7210.o
 snd-soc-da7213-objs := da7213.o
 snd-soc-da7218-objs := da7218.o
@@ -286,6 +289,9 @@ obj-$(CONFIG_SND_SOC_CS4349)	+= snd-soc-cs4349.o
 obj-$(CONFIG_SND_SOC_CS47L24)	+= snd-soc-cs47l24.o
 obj-$(CONFIG_SND_SOC_CS53L30)	+= snd-soc-cs53l30.o
 obj-$(CONFIG_SND_SOC_CX20442)	+= snd-soc-cx20442.o
+obj-$(CONFIG_SND_SOC_CX2092X)	+= snd-soc-cx2092x.o
+obj-$(CONFIG_SND_SOC_CX2092X_I2C)	+= snd-soc-cx2092x-i2c.o
+obj-$(CONFIG_SND_SOC_CX2092X_SPI)	+= snd-soc-cx2092x-spi.o
 obj-$(CONFIG_SND_SOC_DA7210)	+= snd-soc-da7210.o
 obj-$(CONFIG_SND_SOC_DA7213)	+= snd-soc-da7213.o
 obj-$(CONFIG_SND_SOC_DA7218)	+= snd-soc-da7218.o
diff --git a/sound/soc/codecs/cx2092x-i2c.c b/sound/soc/codecs/cx2092x-i2c.c
new file mode 100644
index 0000000..a07800e
--- /dev/null
+++ b/sound/soc/codecs/cx2092x-i2c.c
@@ -0,0 +1,54 @@
+/*
+ * cx2092x-i2c.c -- CX20921 and CX20924 I2C Audio driver
+ *
+ * Copyright:   (C) 2017 Conexant Systems, Inc.
+ *
+ * This is based on Alexander Sverdlin's CS4271 driver code.
+ *
+ * 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.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/i2c.h>
+#include <linux/regmap.h>
+#include <sound/soc.h>
+#include "cx2092x.h"
+
+static int cx2092x_i2c_probe(struct i2c_client *i2c,
+		const struct i2c_device_id *id)
+{
+	return cx2092x_dev_probe(&i2c->dev,
+			devm_regmap_init_i2c(i2c, &cx2092x_regmap_config));
+}
+static int cx2092x_i2c_remove(struct i2c_client *client)
+{
+	snd_soc_unregister_codec(&client->dev);
+	return 0;
+}
+
+static const struct i2c_device_id cx2092x_i2c_id[] = {
+	{"cx20921", 0},
+	{"cx20924", 0},
+	{}
+};
+
+MODULE_DEVICE_TABLE(i2c, cx2092x_i2c_id);
+
+static struct i2c_driver cx2092x_i2c_driver = {
+	.driver = {
+		.name = "cx2092x",
+		.owner = THIS_MODULE,
+		.of_match_table = of_match_ptr(cx2092x_dt_ids),
+	},
+	.id_table = cx2092x_i2c_id,
+	.probe = cx2092x_i2c_probe,
+	.remove = cx2092x_i2c_remove,
+};
+module_i2c_driver(cx2092x_i2c_driver);
+
+MODULE_DESCRIPTION("ASoC CX2092X I2C Driver");
+MODULE_AUTHOR("Simon Ho <simon.ho@conexant.com>");
+MODULE_LICENSE("GPL");
diff --git a/sound/soc/codecs/cx2092x-spi.c b/sound/soc/codecs/cx2092x-spi.c
new file mode 100644
index 0000000..3723909
--- /dev/null
+++ b/sound/soc/codecs/cx2092x-spi.c
@@ -0,0 +1,57 @@
+/*
+ * cx2092x-spi.c -- CX20921 and CX20924 SPI Audio driver
+ *
+ * Copyright:   (C) 2017 Conexant Systems, Inc.
+ *
+ * This is based on Alexander Sverdlin's CS4271 driver code.
+ *
+ * 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.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/spi/spi.h>
+#include <linux/regmap.h>
+#include <sound/soc.h>
+#include "cx2092x.h"
+
+static int cx2092x_spi_probe(struct spi_device *spi)
+{
+	struct regmap_config config;
+
+	config = cx2092x_regmap_config;
+	config.write_flag_mask = 0x81;
+
+	return cx2092x_dev_probe(&spi->dev,
+			devm_regmap_init_spi(spi, &cx2092x_regmap_config));
+}
+
+static int cx2092x_spi_remove(struct spi_device *spi)
+{
+	snd_soc_unregister_codec(&spi->dev);
+	return 0;
+}
+
+static const struct spi_device_id cx2092x_spi_id[] = {
+	{"cx20921", 0},
+	{"cx20924", 0},
+	{}
+};
+
+static struct spi_driver cx2092x_spi_driver = {
+	.driver = {
+		.name = "cx2092x",
+		.of_match_table = of_match_ptr(cx2092x_dt_ids),
+	},
+	.id_table = cx2092x_spi_id,
+	.probe = cx2092x_spi_probe,
+	.remove = cx2092x_spi_remove,
+};
+
+module_spi_driver(cx2092x_spi_driver);
+
+MODULE_DESCRIPTION("ASoC CX2092X SPI Driver");
+MODULE_AUTHOR("Simon Ho <simon.ho@conexant.com>");
+MODULE_LICENSE("GPL");
diff --git a/sound/soc/codecs/cx2092x.c b/sound/soc/codecs/cx2092x.c
new file mode 100644
index 0000000..a15e3f9
--- /dev/null
+++ b/sound/soc/codecs/cx2092x.c
@@ -0,0 +1,411 @@
+/*
+ * cx2092x.c -- CX20921 and CX20924 ALSA SoC Audio driver
+ *
+ * Copyright:   (C) 2017 Conexant Systems, Inc.
+ *
+ * This is based on Alexander Sverdlin's CS4271 driver code.
+ *
+ * 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.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/delay.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/of_gpio.h>
+#include <linux/gpio/consumer.h>
+#include <sound/pcm.h>
+#include <sound/soc.h>
+#include "cx2092x.h"
+
+#define CX2092X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
+			 SNDRV_PCM_FMTBIT_S24_LE | \
+			 SNDRV_PCM_FMTBIT_S32_LE)
+
+#define CX2092X_CAPE_ID(a, b, c, d)  (((a) - 0x20) << 8 | \
+				      ((b) - 0x20) << 14| \
+				      ((c) - 0x20) << 20| \
+				      ((d) - 0x20) << 26)
+
+#define CX2092X_ID2CH_A(id)  (((((unsigned int)(id)) >> 8) & 0x3f) + 0x20)
+#define CX2092X_ID2CH_B(id)  (((((unsigned int)(id)) >> 14) & 0x3f) + 0x20)
+#define CX2092X_ID2CH_C(id)  (((((unsigned int)(id)) >> 20) & 0x3f) + 0x20)
+#define CX2092X_ID2CH_D(id)  (((((unsigned int)(id)) >> 26) & 0x3f) + 0x20)
+
+#define CX2092X_CONTROL(xname, xinfo, xget, xput, xaccess) { \
+	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
+	.access = xaccess, .info = xinfo, .get = xget, .put = xput, \
+	}
+
+#define CX2092X_CMD_GET(item)   ((item) |  0x0100)
+#define CX2092X_CMD_SIZE 13
+
+/*
+ * Defines the command format which is used to communicate with cx2092x device.
+ */
+struct cx2092x_cmd {
+	int	num_32b_words:16;   /* Indicates how many data to be sent.
+				     * If operation is successful, this will
+				     * be updated with the number of returned
+				     * data in word. one word == 4 bytes.
+				     */
+
+	u32	command_id:15;
+	u32	reply:1;            /* The device will set this flag once
+				     * the operation is complete.
+				     */
+	u32	app_module_id;
+	u32	data[CX2092X_CMD_SIZE]; /* Used for storing parameters and
+					 * receiving the returned data from
+					 * device.
+					 */
+};
+
+/* codec private data*/
+struct cx2092x_priv {
+	struct device *dev;
+	struct regmap *regmap;
+	struct gpio_desc *gpiod_reset;
+	struct cx2092x_cmd cmd;
+	int cmd_res;
+};
+
+/*
+ * This functions takes cx2092x_cmd structure as input and output parameters
+ * to communicate CX2092X. If operation is successfully, it returns number of
+ * returned data and stored the returned data in "cmd->data" array.
+ * Otherwise, it returns the error code.
+ */
+static int cx2092x_sendcmd(struct snd_soc_codec *codec,
+			   struct cx2092x_cmd *cmd)
+{
+	struct cx2092x_priv *cx2092x = snd_soc_codec_get_drvdata(codec);
+	int ret = 0;
+	int num_32b_words = cmd->num_32b_words;
+	unsigned long time_out;
+	u32 *i2c_data = (u32 *)cmd;
+	int size = num_32b_words + 2;
+
+	/* calculate how many WORD that will be wrote to device*/
+	cmd->num_32b_words = cmd->command_id & CX2092X_CMD_GET(0) ?
+			     CX2092X_CMD_SIZE : num_32b_words;
+
+
+	/* write all command data except fo frist 4 bytes*/
+	ret = regmap_bulk_write(cx2092x->regmap, 4, &i2c_data[1], size - 1);
+	if (ret < 0) {
+		dev_err(cx2092x->dev, "Failed to write command data\n");
+		goto LEAVE;
+	}
+
+	/* write first 4 bytes command data*/
+	ret = regmap_bulk_write(cx2092x->regmap, 0, i2c_data, 1);
+	if (ret < 0) {
+		dev_err(cx2092x->dev, "Failed to write command\n");
+		goto LEAVE;
+	}
+
+	/* continuously read the first bytes data from device until
+	 * either timeout or the flag 'reply' is set.
+	 */
+	time_out = msecs_to_jiffies(2000);
+	time_out += jiffies;
+	do {
+		regmap_bulk_read(cx2092x->regmap, 0, &i2c_data[0], 1);
+		if (cmd->reply == 1)
+			break;
+		mdelay(10);
+
+	} while (!time_after(jiffies, time_out));
+
+	if (cmd->reply == 1) {
+		/* check if there is returned data. If yes copy the returned
+		 * data to cmd->data array
+		 */
+		if (cmd->num_32b_words > 0)
+			regmap_bulk_read(cx2092x->regmap, 8, &i2c_data[2],
+					 cmd->num_32b_words);
+		/* return error code if operation is not successful.*/
+		else if (cmd->num_32b_words < 0)
+			dev_err(cx2092x->dev, "SendCmd failed, err = %d\n",
+				cmd->num_32b_words);
+
+		ret = cmd->num_32b_words;
+	} else {
+		dev_err(cx2092x->dev, "SendCmd timeout\n");
+		ret = -EBUSY;
+	}
+
+LEAVE:
+	return ret;
+}
+
+
+static int cmd_info(struct snd_kcontrol *kcontrol,
+		struct snd_ctl_elem_info *uinfo)
+{
+	uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
+	uinfo->count = sizeof(struct cx2092x_cmd);
+
+	return 0;
+}
+
+static int cmd_get(struct snd_kcontrol *kcontrol,
+		struct snd_ctl_elem_value *ucontrol)
+{
+	struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
+	struct cx2092x_priv *cx2092x =
+		snd_soc_component_get_drvdata(component);
+
+	memcpy(ucontrol->value.bytes.data, &cx2092x->cmd,
+			sizeof(cx2092x->cmd));
+
+	return 0;
+}
+
+static int cmd_put(struct snd_kcontrol *kcontrol,
+		   struct snd_ctl_elem_value *ucontrol)
+{
+	struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
+	struct cx2092x_priv *cx2092x = snd_soc_component_get_drvdata(component);
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+
+	memcpy(&cx2092x->cmd, ucontrol->value.bytes.data,
+			sizeof(cx2092x->cmd));
+
+	cx2092x->cmd_res = cx2092x_sendcmd(codec, &cx2092x->cmd);
+
+	if (cx2092x->cmd_res < 0)
+		dev_err(codec->dev, "Failed to send cmd, ret = %d\n",
+			cx2092x->cmd_res);
+
+	return cx2092x->cmd_res < 0 ? cx2092x->cmd_res : 0;
+}
+
+
+static int mode_info(struct snd_kcontrol *kcontrol,
+		     struct snd_ctl_elem_info *uinfo)
+{
+	uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
+	uinfo->count = 4;
+
+	return 0;
+}
+
+static int mode_get(struct snd_kcontrol *kcontrol,
+		    struct snd_ctl_elem_value *ucontrol)
+{
+	struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+	struct cx2092x_cmd cmd;
+	int ret = 0;
+
+	cmd.command_id = 0x12f; /*CX2092X_CMD_GET(SOS_RESOURCE);*/
+	cmd.reply = 0;
+	cmd.app_module_id = CX2092X_CAPE_ID('S', 'O', 'S', ' ');
+	cmd.num_32b_words = 1;
+	cmd.data[0] = CX2092X_CAPE_ID('C', 'T', 'R', 'L');
+
+	ret = cx2092x_sendcmd(codec, &cmd);
+	if (ret <= 0)
+		dev_err(codec->dev, "Failed to get current mode, ret = %d\n",
+			ret);
+	else {
+		ucontrol->value.bytes.data[0] = CX2092X_ID2CH_A(cmd.data[0]);
+		ucontrol->value.bytes.data[1] = CX2092X_ID2CH_B(cmd.data[0]);
+		ucontrol->value.bytes.data[2] = CX2092X_ID2CH_C(cmd.data[0]);
+		ucontrol->value.bytes.data[3] = CX2092X_ID2CH_D(cmd.data[0]);
+
+		dev_dbg(codec->dev, "Current mode = %c%c%c%c\n",
+			ucontrol->value.bytes.data[0],
+			ucontrol->value.bytes.data[1],
+			ucontrol->value.bytes.data[2],
+			ucontrol->value.bytes.data[3]);
+
+		ret = 0;
+	}
+
+	return ret;
+}
+
+static int mode_put(struct snd_kcontrol *kcontrol,
+		    struct snd_ctl_elem_value *ucontrol)
+{
+	struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+	struct cx2092x_cmd cmd;
+	int ret = -1;
+
+	cmd.command_id = 4;
+	cmd.reply = 0;
+	cmd.app_module_id = CX2092X_CAPE_ID('C', 'T', 'R', 'L');
+	cmd.num_32b_words = 1;
+	cmd.data[0] = CX2092X_CAPE_ID(ucontrol->value.bytes.data[0],
+				      ucontrol->value.bytes.data[1],
+				      ucontrol->value.bytes.data[2],
+				      ucontrol->value.bytes.data[3]);
+
+	ret = cx2092x_sendcmd(codec, &cmd);
+	if (ret < 0) {
+		dev_err(codec->dev, "Failed to set mode, ret =%d\n", ret);
+	} else {
+		dev_dbg(codec->dev, "Set mode successfully, ret = %d\n", ret);
+		ret = 0;
+	}
+
+	return ret;
+}
+
+static const struct snd_kcontrol_new cx2092x_snd_controls[] = {
+	CX2092X_CONTROL("SendCmd", cmd_info, cmd_get, cmd_put,
+		SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE|
+		SNDRV_CTL_ELEM_ACCESS_VOLATILE),
+	CX2092X_CONTROL("Mode", mode_info, mode_get, mode_put,
+		SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE|
+		SNDRV_CTL_ELEM_ACCESS_VOLATILE),
+};
+
+
+static const struct snd_soc_dapm_widget cx2092x_dapm_widgets[] = {
+	SND_SOC_DAPM_AIF_OUT("Mic AIF", "Capture", 0,
+			     SND_SOC_NOPM, 0, 0),
+	SND_SOC_DAPM_INPUT("MIC"),
+};
+
+static const struct snd_soc_dapm_route cx2092x_intercon[] = {
+	{"Mic AIF", NULL, "MIC"},
+};
+
+
+static struct snd_soc_dai_driver soc_codec_cx2092x_dai[] = {
+	{
+		.name = "cx2092x-aif",
+		.capture = {
+		.stream_name = "Capture",
+		.channels_min = 2,
+		.channels_max = 2,
+		.rates = SNDRV_PCM_RATE_48000,
+		.formats = CX2092X_FORMATS,
+		},
+	},
+	{
+		.name = "cx2092x-dsp",
+		.capture = {
+		.stream_name = "AEC Ref",
+		.channels_min = 2,
+		.channels_max = 2,
+		.rates = SNDRV_PCM_RATE_48000,
+		.formats = CX2092X_FORMATS,
+		},
+	},
+};
+
+static int cx2092x_reset(struct snd_soc_codec *codec)
+{
+	struct cx2092x_priv *cx2092x = snd_soc_codec_get_drvdata(codec);
+
+	if (cx2092x->gpiod_reset) {
+		gpiod_set_value_cansleep(cx2092x->gpiod_reset, 0);
+		mdelay(10);
+		gpiod_set_value_cansleep(cx2092x->gpiod_reset, 1);
+	}
+
+	return 0;
+}
+
+const struct of_device_id cx2092x_dt_ids[] = {
+	{ .compatible = "cnxt,cx20921", },
+	{ .compatible = "cnxt,cx20924", },
+	{ }
+};
+EXPORT_SYMBOL_GPL(cx2092x_dt_ids);
+MODULE_DEVICE_TABLE(of, cx2092x_dt_ids);
+
+static int cx2092x_probe(struct snd_soc_codec *codec)
+{
+	return cx2092x_reset(codec);
+}
+
+static int cx2092x_remove(struct snd_soc_codec *codec)
+{
+	struct cx2092x_priv *cx2092x = snd_soc_codec_get_drvdata(codec);
+
+	if (cx2092x->gpiod_reset)
+		/* Set codec to the reset state */
+		gpiod_set_value_cansleep(cx2092x->gpiod_reset, 0);
+
+	return 0;
+}
+
+static const struct snd_soc_codec_driver soc_codec_driver_cx2092x = {
+	.probe = cx2092x_probe,
+	.remove = cx2092x_remove,
+
+	.component_driver = {
+		.controls = cx2092x_snd_controls,
+		.num_controls = ARRAY_SIZE(cx2092x_snd_controls),
+		.dapm_widgets = cx2092x_dapm_widgets,
+		.num_dapm_widgets = ARRAY_SIZE(cx2092x_dapm_widgets),
+		.dapm_routes = cx2092x_intercon,
+		.num_dapm_routes = ARRAY_SIZE(cx2092x_intercon),
+	},
+};
+EXPORT_SYMBOL_GPL(soc_codec_driver_cx2092x);
+
+static bool cx2092x_volatile_register(struct device *dev, unsigned int reg)
+{
+	return true; /*all register are volatile*/
+}
+
+const struct regmap_config cx2092x_regmap_config = {
+	.reg_bits = 16,
+	.val_bits = 32,
+	.reg_stride = 4,
+	.max_register = CX2092X_REG_MAX,
+	.cache_type = REGCACHE_NONE,
+	.volatile_reg = cx2092x_volatile_register,
+	.val_format_endian = REGMAP_ENDIAN_NATIVE,
+};
+EXPORT_SYMBOL_GPL(cx2092x_regmap_config);
+
+int cx2092x_dev_probe(struct device *dev, struct regmap *regmap)
+{
+	struct cx2092x_priv *cx2092x;
+	int ret;
+
+	if (IS_ERR(regmap))
+		return PTR_ERR(regmap);
+
+	cx2092x = devm_kzalloc(dev, sizeof(*cx2092x), GFP_KERNEL);
+	if (!cx2092x)
+		return -ENOMEM;
+
+	/* GPIOs */
+	cx2092x->gpiod_reset = devm_gpiod_get_optional(dev, "reset",
+						       GPIOD_OUT_LOW);
+	if (IS_ERR(cx2092x->gpiod_reset))
+		return PTR_ERR(cx2092x->gpiod_reset);
+
+	dev_set_drvdata(dev, cx2092x);
+	cx2092x->regmap = regmap;
+	cx2092x->dev = dev;
+
+	ret = snd_soc_register_codec(cx2092x->dev, &soc_codec_driver_cx2092x,
+				soc_codec_cx2092x_dai,
+				ARRAY_SIZE(soc_codec_cx2092x_dai));
+	if (ret < 0)
+		dev_err(dev, "Failed to register codec: %d\n", ret);
+	else
+		dev_dbg(dev, "%s: Register codec.\n", __func__);
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(cx2092x_dev_probe);
+
+MODULE_DESCRIPTION("ASoC CX2092X ALSA SoC Driver");
+MODULE_AUTHOR("Simon Ho <simon.ho@conexant.com>");
+MODULE_LICENSE("GPL");
diff --git a/sound/soc/codecs/cx2092x.h b/sound/soc/codecs/cx2092x.h
new file mode 100644
index 0000000..9577be8
--- /dev/null
+++ b/sound/soc/codecs/cx2092x.h
@@ -0,0 +1,26 @@
+/*
+ * cx2092x.h -- CX20921 and CX20924 Audio driver
+ *
+ * Copyright:   (C) 2017 Conexant Systems, Inc.
+ *
+ * This is based on Alexander Sverdlin's CS4271 driver code.
+ *
+ * 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 __CX2092X_PRIV_H__
+#define __CX2092X_PRIV_H__
+
+#include <linux/regmap.h>
+
+extern const struct of_device_id cx2092x_dt_ids[];
+extern const struct regmap_config cx2092x_regmap_config;
+
+int cx2092x_dev_probe(struct device *dev, struct regmap *regmap);
+
+#define CX2092X_REG_MAX 0x2000
+
+#endif
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [alsa_devel] [PATCH v3 2/2] ASoC: Add driver support fro Conexant CX2092X DSP
  2017-02-21 13:58 ` [alsa_devel] [PATCH v3 2/2] ASoC: Add driver support fro Conexant " simon.ho.cnxt
@ 2017-02-21 17:44   ` kbuild test robot
  2017-02-21 17:44   ` [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings kbuild test robot
  1 sibling, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2017-02-21 17:44 UTC (permalink / raw)
  To: simon.ho.cnxt; +Cc: alsa-devel, Simon Ho, lgirdwood, tiwai, broonie, kbuild-all

Hi Simon,

[auto build test WARNING on asoc/for-next]
[also build test WARNING on v4.10 next-20170220]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/simon-ho-cnxt-gmail-com/ASoC-add-driver-support-for-Conexant-CX2092X-DSP/20170221-235253
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next


coccinelle warnings: (new ones prefixed by >>)

>> sound/soc/codecs/cx2092x-i2c.c:43:3-8: No need to set .owner here. The core will do it.

Please review and possibly fold the followup patch.

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings
  2017-02-21 13:58 ` [alsa_devel] [PATCH v3 2/2] ASoC: Add driver support fro Conexant " simon.ho.cnxt
  2017-02-21 17:44   ` kbuild test robot
@ 2017-02-21 17:44   ` kbuild test robot
  1 sibling, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2017-02-21 17:44 UTC (permalink / raw)
  To: simon.ho.cnxt; +Cc: alsa-devel, Simon Ho, lgirdwood, tiwai, broonie, kbuild-all

sound/soc/codecs/cx2092x-i2c.c:43:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: Simon Ho <simon.ho@conexant.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 cx2092x-i2c.c |    1 -
 1 file changed, 1 deletion(-)

--- a/sound/soc/codecs/cx2092x-i2c.c
+++ b/sound/soc/codecs/cx2092x-i2c.c
@@ -40,7 +40,6 @@ MODULE_DEVICE_TABLE(i2c, cx2092x_i2c_id)
 static struct i2c_driver cx2092x_i2c_driver = {
 	.driver = {
 		.name = "cx2092x",
-		.owner = THIS_MODULE,
 		.of_match_table = of_match_ptr(cx2092x_dt_ids),
 	},
 	.id_table = cx2092x_i2c_id,

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings
  2018-08-29 14:47 [PATCH 1/2] ASoC: Add driver for PROTO Audio CODEC (with a WM8731) Codrin Ciubotariu
@ 2018-08-30 10:13   ` kbuild test robot
  0 siblings, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2018-08-30 10:13 UTC (permalink / raw)
  To: Codrin Ciubotariu
  Cc: kbuild-all, alsa-devel, devicetree, broonie, robh+dt,
	alexandre.belloni, nicolas.ferre, linux-kernel, linux-arm-kernel,
	florian.meier, cristian.birsan

From: kbuild test robot <fengguang.wu@intel.com>

sound/soc/atmel/mikroe-proto.c:178:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Fixes: 395c2cec021d ("ASoC: Add driver for PROTO Audio CODEC (with a WM8731)")
CC: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/Codrin-Ciubotariu/ASoC-Add-driver-for-PROTO-Audio-CODEC-with-a-WM8731/20180830-060610
base:   https://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91.git at91-next

 mikroe-proto.c |    1 -
 1 file changed, 1 deletion(-)

--- a/sound/soc/atmel/mikroe-proto.c
+++ b/sound/soc/atmel/mikroe-proto.c
@@ -175,7 +175,6 @@ MODULE_DEVICE_TABLE(of, snd_proto_of_mat
 static struct platform_driver snd_proto_driver = {
 	.driver = {
 		.name   = "snd-mikroe-proto",
-		.owner  = THIS_MODULE,
 		.of_match_table = snd_proto_of_match,
 	},
 	.probe	  = snd_proto_probe,

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings
@ 2018-08-30 10:13   ` kbuild test robot
  0 siblings, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2018-08-30 10:13 UTC (permalink / raw)
  To: linux-arm-kernel

From: kbuild test robot <fengguang.wu@intel.com>

sound/soc/atmel/mikroe-proto.c:178:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Fixes: 395c2cec021d ("ASoC: Add driver for PROTO Audio CODEC (with a WM8731)")
CC: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/Codrin-Ciubotariu/ASoC-Add-driver-for-PROTO-Audio-CODEC-with-a-WM8731/20180830-060610
base:   https://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91.git at91-next

 mikroe-proto.c |    1 -
 1 file changed, 1 deletion(-)

--- a/sound/soc/atmel/mikroe-proto.c
+++ b/sound/soc/atmel/mikroe-proto.c
@@ -175,7 +175,6 @@ MODULE_DEVICE_TABLE(of, snd_proto_of_mat
 static struct platform_driver snd_proto_driver = {
 	.driver = {
 		.name   = "snd-mikroe-proto",
-		.owner  = THIS_MODULE,
 		.of_match_table = snd_proto_of_match,
 	},
 	.probe	  = snd_proto_probe,

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings
  2017-01-31 10:05 ` Mylène Josserand
  2017-01-31 11:34     ` kbuild test robot
@ 2017-01-31 11:34     ` kbuild test robot
  0 siblings, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2017-01-31 11:34 UTC (permalink / raw)
  To: Mylène Josserand
  Cc: kbuild-all, lgirdwood, broonie, robh+dt, mark.rutland,
	maxime.ripard, wens, perex, tiwai, alsa-devel, devicetree,
	linux-kernel, linux-arm-kernel, thomas.petazzoni,
	mylene.josserand, alexandre.belloni

sound/soc/sunxi/sun8i-codec.c:487:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 sun8i-codec.c |    1 -
 1 file changed, 1 deletion(-)

--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -484,7 +484,6 @@ static const struct dev_pm_ops sun8i_cod
 static struct platform_driver sun8i_codec_driver = {
 	.driver = {
 		.name = "sun8i-codec",
-		.owner = THIS_MODULE,
 		.of_match_table = sun8i_codec_of_match,
 		.pm = &sun8i_codec_pm_ops,
 	},

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings
@ 2017-01-31 11:34     ` kbuild test robot
  0 siblings, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2017-01-31 11:34 UTC (permalink / raw)
  Cc: mark.rutland, devicetree, alsa-devel, linux-kernel, tiwai,
	lgirdwood, robh+dt, wens, broonie, alexandre.belloni, kbuild-all,
	maxime.ripard, mylene.josserand, thomas.petazzoni,
	linux-arm-kernel

sound/soc/sunxi/sun8i-codec.c:487:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 sun8i-codec.c |    1 -
 1 file changed, 1 deletion(-)

--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -484,7 +484,6 @@ static const struct dev_pm_ops sun8i_cod
 static struct platform_driver sun8i_codec_driver = {
 	.driver = {
 		.name = "sun8i-codec",
-		.owner = THIS_MODULE,
 		.of_match_table = sun8i_codec_of_match,
 		.pm = &sun8i_codec_pm_ops,
 	},

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings
@ 2017-01-31 11:34     ` kbuild test robot
  0 siblings, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2017-01-31 11:34 UTC (permalink / raw)
  To: linux-arm-kernel

sound/soc/sunxi/sun8i-codec.c:487:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: Myl?ne Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 sun8i-codec.c |    1 -
 1 file changed, 1 deletion(-)

--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -484,7 +484,6 @@ static const struct dev_pm_ops sun8i_cod
 static struct platform_driver sun8i_codec_driver = {
 	.driver = {
 		.name = "sun8i-codec",
-		.owner = THIS_MODULE,
 		.of_match_table = sun8i_codec_of_match,
 		.pm = &sun8i_codec_pm_ops,
 	},

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings
  2016-11-09 16:58 [asoc:topic/cs42l42 4/5] sound/soc/codecs/cs42l42.c:1972:3-8: No need to set .owner here. The core will do it kbuild test robot
@ 2016-11-09 16:58 ` kbuild test robot
  0 siblings, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2016-11-09 16:58 UTC (permalink / raw)
  To: James Schulman
  Cc: kbuild-all, alsa-devel, Mark Brown, Brian Austin, Paul Handrigan,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, linux-kernel

sound/soc/codecs/cs42l42.c:1972:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: James Schulman <james.schulman@cirrus.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 cs42l42.c |    1 -
 1 file changed, 1 deletion(-)

--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -1969,7 +1969,6 @@ MODULE_DEVICE_TABLE(i2c, cs42l42_id);
 static struct i2c_driver cs42l42_i2c_driver = {
 	.driver = {
 		.name = "cs42l42",
-		.owner = THIS_MODULE,
 		.pm = &cs42l42_runtime_pm,
 		.of_match_table = cs42l42_of_match,
 		},

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings
  2015-12-01 18:31 ` anish kumar
@ 2015-12-01 19:23   ` kbuild test robot
  0 siblings, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2015-12-01 19:23 UTC (permalink / raw)
  Cc: alsa-devel, broonie, kbuild-all, anish kumar

sound/soc/codecs/max98926.c:587:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: anish kumar <yesanishhere@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 max98926.c |    1 -
 1 file changed, 1 deletion(-)

--- a/sound/soc/codecs/max98926.c
+++ b/sound/soc/codecs/max98926.c
@@ -584,7 +584,6 @@ MODULE_DEVICE_TABLE(of, max98926_of_matc
 static struct i2c_driver max98926_i2c_driver = {
 	.driver = {
 		.name = "max98926",
-		.owner = THIS_MODULE,
 		.of_match_table = of_match_ptr(max98926_of_match),
 		.pm = NULL,
 	},

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings
  2015-06-22 15:36 [asoc:topic/gtm601 2/3] sound/soc/codecs/gtm601.c:86:4-9: No need to set .owner here. The core will do it kbuild test robot
@ 2015-06-22 15:36   ` kbuild test robot
  0 siblings, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2015-06-22 15:36 UTC (permalink / raw)
  To: Marek Belisko
  Cc: kbuild-all, Mark Brown, alsa-devel, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, linux-kernel

sound/soc/codecs/gtm601.c:86:4-9: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: Marek Belisko <marek@goldelico.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 gtm601.c |    1 -
 1 file changed, 1 deletion(-)

--- a/sound/soc/codecs/gtm601.c
+++ b/sound/soc/codecs/gtm601.c
@@ -83,7 +83,6 @@ MODULE_DEVICE_TABLE(of, gtm601_codec_of_
 static struct platform_driver gtm601_codec_driver = {
 	.driver = {
 			.name = "gtm601",
-			.owner = THIS_MODULE,
 			.of_match_table = of_match_ptr(gtm601_codec_of_match),
 	},
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings
@ 2015-06-22 15:36   ` kbuild test robot
  0 siblings, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2015-06-22 15:36 UTC (permalink / raw)
  To: Marek Belisko
  Cc: kbuild-all, Mark Brown, alsa-devel, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, linux-kernel

sound/soc/codecs/gtm601.c:86:4-9: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: Marek Belisko <marek@goldelico.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 gtm601.c |    1 -
 1 file changed, 1 deletion(-)

--- a/sound/soc/codecs/gtm601.c
+++ b/sound/soc/codecs/gtm601.c
@@ -83,7 +83,6 @@ MODULE_DEVICE_TABLE(of, gtm601_codec_of_
 static struct platform_driver gtm601_codec_driver = {
 	.driver = {
 			.name = "gtm601",
-			.owner = THIS_MODULE,
 			.of_match_table = of_match_ptr(gtm601_codec_of_match),
 	},
 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings
       [not found] <201412070634.hwbnurjX%fengguang.wu@intel.com>
@ 2014-12-06 22:06   ` kbuild test robot
  0 siblings, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2014-12-06 22:06 UTC (permalink / raw)
  To: Max Filippov
  Cc: kbuild-all, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, linux-xtensa, alsa-devel, linux-kernel

sound/soc/xtensa/xtfpga-i2s.c:666:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 xtfpga-i2s.c |    1 -
 1 file changed, 1 deletion(-)

--- a/sound/soc/xtensa/xtfpga-i2s.c
+++ b/sound/soc/xtensa/xtfpga-i2s.c
@@ -663,7 +663,6 @@ static struct platform_driver xtfpga_i2s
 	.remove  = xtfpga_i2s_remove,
 	.driver  = {
 		.name = "xtfpga-i2s",
-		.owner = THIS_MODULE,
 		.of_match_table = of_match_ptr(xtfpga_i2s_of_match),
 		.pm = &xtfpga_i2s_pm_ops,
 	},

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings
@ 2014-12-06 22:06   ` kbuild test robot
  0 siblings, 0 replies; 16+ messages in thread
From: kbuild test robot @ 2014-12-06 22:06 UTC (permalink / raw)
  To: Max Filippov
  Cc: linux-xtensa, alsa-devel, Takashi Iwai, linux-kernel,
	Liam Girdwood, Mark Brown, kbuild-all

sound/soc/xtensa/xtfpga-i2s.c:666:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 xtfpga-i2s.c |    1 -
 1 file changed, 1 deletion(-)

--- a/sound/soc/xtensa/xtfpga-i2s.c
+++ b/sound/soc/xtensa/xtfpga-i2s.c
@@ -663,7 +663,6 @@ static struct platform_driver xtfpga_i2s
 	.remove  = xtfpga_i2s_remove,
 	.driver  = {
 		.name = "xtfpga-i2s",
-		.owner = THIS_MODULE,
 		.of_match_table = of_match_ptr(xtfpga_i2s_of_match),
 		.pm = &xtfpga_i2s_pm_ops,
 	},

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-08-30 10:14 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-21 13:58 [alsa_devel] [PATCH v3 0/2] ASoC: add driver support for Conexant CX2092X DSP simon.ho.cnxt
2017-02-21 13:58 ` [alsa_devel] [PATCH v3 1/2] doc: cx2092x: Add DT bingings doc for " simon.ho.cnxt
2017-02-21 13:58 ` [alsa_devel] [PATCH v3 2/2] ASoC: Add driver support fro Conexant " simon.ho.cnxt
2017-02-21 17:44   ` kbuild test robot
2017-02-21 17:44   ` [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings kbuild test robot
  -- strict thread matches above, loose matches on Subject: below --
2018-08-29 14:47 [PATCH 1/2] ASoC: Add driver for PROTO Audio CODEC (with a WM8731) Codrin Ciubotariu
2018-08-30 10:13 ` [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings kbuild test robot
2018-08-30 10:13   ` kbuild test robot
2017-01-31 11:34 [PATCH v3 3/8] ASoC: Add sun8i digital audio codec kbuild test robot
2017-01-31 10:05 ` Mylène Josserand
2017-01-31 11:34   ` [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings kbuild test robot
2017-01-31 11:34     ` kbuild test robot
2017-01-31 11:34     ` kbuild test robot
2016-11-09 16:58 [asoc:topic/cs42l42 4/5] sound/soc/codecs/cs42l42.c:1972:3-8: No need to set .owner here. The core will do it kbuild test robot
2016-11-09 16:58 ` [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings kbuild test robot
2015-12-01 19:23 [PATCH] ASoC: Add max98926 codec driver kbuild test robot
2015-12-01 18:31 ` anish kumar
2015-12-01 19:23   ` [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings kbuild test robot
2015-06-22 15:36 [asoc:topic/gtm601 2/3] sound/soc/codecs/gtm601.c:86:4-9: No need to set .owner here. The core will do it kbuild test robot
2015-06-22 15:36 ` [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings kbuild test robot
2015-06-22 15:36   ` kbuild test robot
     [not found] <201412070634.hwbnurjX%fengguang.wu@intel.com>
2014-12-06 22:06 ` kbuild test robot
2014-12-06 22:06   ` kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.