All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/5] Sound: SOC: TAS571x: added missing register literals
@ 2016-03-29  7:39 Petr Kulhavy
       [not found] ` <1459237178-12920-1-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Petr Kulhavy @ 2016-03-29  7:39 UTC (permalink / raw)
  To: cernekee-F7+t8E8rja9g9hUCZPvPmw,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Petr Kulhavy

The list of TAS571x registers was incomplete.
Added the missing register definitions up to register 0x25

Signed-off-by: Petr Kulhavy <petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
---
v1: <initial>

v2: <no change>

 sound/soc/codecs/tas571x.c |  4 ++++
 sound/soc/codecs/tas571x.h | 22 ++++++++++++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c
index 39307ad..346d3da 100644
--- a/sound/soc/codecs/tas571x.c
+++ b/sound/soc/codecs/tas571x.c
@@ -57,6 +57,10 @@ static int tas571x_register_size(struct tas571x_private *priv, unsigned int reg)
 	case TAS571X_CH1_VOL_REG:
 	case TAS571X_CH2_VOL_REG:
 		return priv->chip->vol_reg_size;
+	case TAS571X_INPUT_MUX_REG:
+	case TAS571X_CH4_SRC_SELECT_REG:
+	case TAS571X_PWM_MUX_REG:
+		return 4;
 	default:
 		return 1;
 	}
diff --git a/sound/soc/codecs/tas571x.h b/sound/soc/codecs/tas571x.h
index 0aee471..cf800c3 100644
--- a/sound/soc/codecs/tas571x.h
+++ b/sound/soc/codecs/tas571x.h
@@ -13,6 +13,10 @@
 #define _TAS571X_H
 
 /* device registers */
+#define TAS571X_CLK_CTRL_REG		0x00
+#define TAS571X_DEV_ID_REG		0x01
+#define TAS571X_ERR_STATUS_REG		0x02
+#define TAS571X_SYS_CTRL_1_REG		0x03
 #define TAS571X_SDI_REG			0x04
 #define TAS571X_SDI_FMT_MASK		0x0f
 
@@ -27,7 +31,25 @@
 #define TAS571X_MVOL_REG		0x07
 #define TAS571X_CH1_VOL_REG		0x08
 #define TAS571X_CH2_VOL_REG		0x09
+#define TAS571X_CH3_VOL_REG		0x0a
+#define TAS571X_VOL_CFG_REG		0x0e
+#define TAS571X_MODULATION_LIMIT_REG	0x10
+#define TAS571X_IC_DELAY_CH1_REG	0x11
+#define TAS571X_IC_DELAY_CH2_REG	0x12
+#define TAS571X_IC_DELAY_CH3_REG	0x13
+#define TAS571X_IC_DELAY_CH4_REG	0x14
 
+#define TAS571X_PWM_CH_SDN_GROUP_REG	0x19	/* N/A on TAS5717, TAS5719 */
+#define TAS571X_PWM_CH1_SDN_MASK	(1<<0)
+#define TAS571X_PWM_CH2_SDN_SHIFT	(1<<1)
+#define TAS571X_PWM_CH3_SDN_SHIFT	(1<<2)
+#define TAS571X_PWM_CH4_SDN_SHIFT	(1<<3)
+
+#define TAS571X_START_STOP_PERIOD_REG	0x1a
 #define TAS571X_OSC_TRIM_REG		0x1b
+#define TAS571X_BKND_ERR_REG		0x1c
+#define TAS571X_INPUT_MUX_REG		0x20
+#define TAS571X_CH4_SRC_SELECT_REG	0x21
+#define TAS571X_PWM_MUX_REG		0x25
 
 #endif /* _TAS571X_H */
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 2/5] Sound: SOC: TAS571x: chip type detection via I2C name
       [not found] ` <1459237178-12920-1-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
@ 2016-03-29  7:39   ` Petr Kulhavy
  2016-03-29  7:39   ` [PATCH v2 3/5] Sound: SOC: TAS571x: implemented digital mute Petr Kulhavy
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Petr Kulhavy @ 2016-03-29  7:39 UTC (permalink / raw)
  To: cernekee-F7+t8E8rja9g9hUCZPvPmw,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Petr Kulhavy

The chip selection was relying only on DT. It was not possible to use the
driver without DT.
This adds the chip type detection from the I2C name, which
allows to use the driver from the platform driver without DT.

Signed-off-by: Petr Kulhavy <petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
Tested-by: Petr Kulhavy <petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
---
 sound/soc/codecs/tas571x.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c
index 346d3da..2a63069 100644
--- a/sound/soc/codecs/tas571x.c
+++ b/sound/soc/codecs/tas571x.c
@@ -390,11 +390,10 @@ static int tas571x_i2c_probe(struct i2c_client *client,
 	i2c_set_clientdata(client, priv);
 
 	of_id = of_match_device(tas571x_of_match, dev);
-	if (!of_id) {
-		dev_err(dev, "Unknown device type\n");
-		return -EINVAL;
-	}
-	priv->chip = of_id->data;
+	if (of_id)
+		priv->chip = of_id->data;
+	else
+		priv->chip = (void *) id->driver_data;
 
 	priv->mclk = devm_clk_get(dev, "mclk");
 	if (IS_ERR(priv->mclk) && PTR_ERR(priv->mclk) != -ENOENT) {
@@ -495,9 +494,9 @@ static const struct of_device_id tas571x_of_match[] = {
 MODULE_DEVICE_TABLE(of, tas571x_of_match);
 
 static const struct i2c_device_id tas571x_i2c_id[] = {
-	{ "tas5711", 0 },
-	{ "tas5717", 0 },
-	{ "tas5719", 0 },
+	{ "tas5711", (kernel_ulong_t) &tas5711_chip },
+	{ "tas5717", (kernel_ulong_t) &tas5717_chip },
+	{ "tas5719", (kernel_ulong_t) &tas5717_chip },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tas571x_i2c_id);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 3/5] Sound: SOC: TAS571x: implemented digital mute
       [not found] ` <1459237178-12920-1-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
  2016-03-29  7:39   ` [PATCH v2 2/5] Sound: SOC: TAS571x: chip type detection via I2C name Petr Kulhavy
@ 2016-03-29  7:39   ` Petr Kulhavy
  2016-03-29  7:39   ` [PATCH v2 4/5] Sound: SOC: TAS571x: added support for TAS5721 Petr Kulhavy
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Petr Kulhavy @ 2016-03-29  7:39 UTC (permalink / raw)
  To: cernekee-F7+t8E8rja9g9hUCZPvPmw,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Petr Kulhavy

The driver did not have a mute function. The amplifier was brought out of
shutdown mode (hard-mute) once for ever in probe(), which was causing
clicks and pops when altering the I2C register configuration later.

This adds the digital_mute() function. The amplifier unmute in probe()
was removed.

Signed-off-by: Petr Kulhavy <petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
---
v1: <initial>

v2: <no change>

 sound/soc/codecs/tas571x.c | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c
index 2a63069..431dffa 100644
--- a/sound/soc/codecs/tas571x.c
+++ b/sound/soc/codecs/tas571x.c
@@ -171,6 +171,23 @@ static int tas571x_hw_params(struct snd_pcm_substream *substream,
 				  TAS571X_SDI_FMT_MASK, val);
 }
 
+static int tas571x_mute(struct snd_soc_dai *dai, int mute)
+{
+	struct snd_soc_codec *codec = dai->codec;
+	u8 sysctl2;
+	int ret;
+
+	sysctl2 = mute ? TAS571X_SYS_CTRL_2_SDN_MASK : 0;
+
+	ret = snd_soc_update_bits(codec,
+			    TAS571X_SYS_CTRL_2_REG,
+		     TAS571X_SYS_CTRL_2_SDN_MASK,
+		     sysctl2);
+	usleep_range(1000, 2000);
+
+	return ret;
+}
+
 static int tas571x_set_bias_level(struct snd_soc_codec *codec,
 				  enum snd_soc_bias_level level)
 {
@@ -218,6 +235,7 @@ static int tas571x_set_bias_level(struct snd_soc_codec *codec,
 static const struct snd_soc_dai_ops tas571x_dai_ops = {
 	.set_fmt	= tas571x_set_dai_fmt,
 	.hw_params	= tas571x_hw_params,
+	.digital_mute	= tas571x_mute,
 };
 
 static const char *const tas5711_supply_names[] = {
@@ -448,10 +466,6 @@ static int tas571x_i2c_probe(struct i2c_client *client,
 	if (ret)
 		return ret;
 
-	ret = regmap_update_bits(priv->regmap, TAS571X_SYS_CTRL_2_REG,
-				 TAS571X_SYS_CTRL_2_SDN_MASK, 0);
-	if (ret)
-		return ret;
 
 	memcpy(&priv->codec_driver, &tas571x_codec, sizeof(priv->codec_driver));
 	priv->codec_driver.controls = priv->chip->controls;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 4/5] Sound: SOC: TAS571x: added support for TAS5721
       [not found] ` <1459237178-12920-1-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
  2016-03-29  7:39   ` [PATCH v2 2/5] Sound: SOC: TAS571x: chip type detection via I2C name Petr Kulhavy
  2016-03-29  7:39   ` [PATCH v2 3/5] Sound: SOC: TAS571x: implemented digital mute Petr Kulhavy
@ 2016-03-29  7:39   ` Petr Kulhavy
  2016-03-29  7:39   ` [PATCH v2 5/5] dt/bindings: sound: new chip added into TAS571x binding Petr Kulhavy
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Petr Kulhavy @ 2016-03-29  7:39 UTC (permalink / raw)
  To: cernekee-F7+t8E8rja9g9hUCZPvPmw,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Petr Kulhavy

This adds support for TAS5721.

Signed-off-by: Petr Kulhavy <petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
---
v1: <initial>

v2: <no change>

 sound/soc/codecs/Kconfig   |  2 +-
 sound/soc/codecs/tas571x.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 50693c8..562b66f 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -705,7 +705,7 @@ config SND_SOC_TAS5086
 	depends on I2C
 
 config SND_SOC_TAS571X
-	tristate "Texas Instruments TAS5711/TAS5717/TAS5719 power amplifiers"
+	tristate "Texas Instruments TAS5711/TAS5717/TAS5719/TAS5721 power amplifiers"
 	depends on I2C
 
 config SND_SOC_TFA9879
diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c
index 431dffa..187f85b 100644
--- a/sound/soc/codecs/tas571x.c
+++ b/sound/soc/codecs/tas571x.c
@@ -4,6 +4,9 @@
  * Copyright (C) 2015 Google, Inc.
  * Copyright (c) 2013 Daniel Mack <zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  *
+ * TAS5721 support:
+ * Copyright (C) 2016 Petr Kulhavy, Barix AG <petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.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
@@ -348,6 +351,75 @@ static const struct tas571x_chip tas5717_chip = {
 	.vol_reg_size			= 2,
 };
 
+static const char *const tas5721_supply_names[] = {
+	"AVDD",
+	"DVDD",
+	"DRVDD",
+	"PVDD",
+};
+
+static const struct snd_kcontrol_new tas5721_controls[] = {
+	SOC_SINGLE_TLV("Master Volume",
+		       TAS571X_MVOL_REG,
+		       0, 0xff, 1, tas5711_volume_tlv),
+	SOC_DOUBLE_R_TLV("Speaker Volume",
+			 TAS571X_CH1_VOL_REG,
+			 TAS571X_CH2_VOL_REG,
+			 0, 0xff, 1, tas5711_volume_tlv),
+	SOC_DOUBLE("Speaker Switch",
+		   TAS571X_SOFT_MUTE_REG,
+		   TAS571X_SOFT_MUTE_CH1_SHIFT, TAS571X_SOFT_MUTE_CH2_SHIFT,
+		   1, 1),
+};
+
+static const struct reg_default tas5721_reg_defaults[] = {
+	{TAS571X_CLK_CTRL_REG,		0x6c},
+	{TAS571X_DEV_ID_REG,		0x00},
+	{TAS571X_ERR_STATUS_REG,	0x00},
+	{TAS571X_SYS_CTRL_1_REG,	0xa0},
+	{TAS571X_SDI_REG,		0x05},
+	{TAS571X_SYS_CTRL_2_REG,	0x40},
+	{TAS571X_SOFT_MUTE_REG,		0x00},
+	{TAS571X_MVOL_REG,		0xff},
+	{TAS571X_CH1_VOL_REG,		0x30},
+	{TAS571X_CH2_VOL_REG,		0x30},
+	{TAS571X_CH3_VOL_REG,		0x30},
+	{TAS571X_VOL_CFG_REG,		0x91},
+	{TAS571X_MODULATION_LIMIT_REG,	0x02},
+	{TAS571X_IC_DELAY_CH1_REG,	0xac},
+	{TAS571X_IC_DELAY_CH2_REG,	0x54},
+	{TAS571X_IC_DELAY_CH3_REG,	0xac},
+	{TAS571X_IC_DELAY_CH4_REG,	0x54},
+	{TAS571X_PWM_CH_SDN_GROUP_REG,	0x30},
+	{TAS571X_START_STOP_PERIOD_REG,	0x0f},
+	{TAS571X_OSC_TRIM_REG,		0x82},
+	{TAS571X_BKND_ERR_REG,		0x02},
+	{TAS571X_INPUT_MUX_REG,		0x17772},
+	{TAS571X_CH4_SRC_SELECT_REG,	0x4303},
+	{TAS571X_PWM_MUX_REG,		0x1021345},
+};
+
+static const struct regmap_config tas5721_regmap_config = {
+	.reg_bits			= 8,
+	.val_bits			= 32,
+	.max_register			= 0xff,
+	.reg_read			= tas571x_reg_read,
+	.reg_write			= tas571x_reg_write,
+	.reg_defaults			= tas5721_reg_defaults,
+	.num_reg_defaults		= ARRAY_SIZE(tas5721_reg_defaults),
+	.cache_type			= REGCACHE_RBTREE,
+};
+
+
+static const struct tas571x_chip tas5721_chip = {
+	.supply_names			= tas5721_supply_names,
+	.num_supply_names		= ARRAY_SIZE(tas5721_supply_names),
+	.controls			= tas5711_controls,
+	.num_controls			= ARRAY_SIZE(tas5711_controls),
+	.regmap_config			= &tas5721_regmap_config,
+	.vol_reg_size			= 1,
+};
+
 static const struct snd_soc_dapm_widget tas571x_dapm_widgets[] = {
 	SND_SOC_DAPM_DAC("DACL", NULL, SND_SOC_NOPM, 0, 0),
 	SND_SOC_DAPM_DAC("DACR", NULL, SND_SOC_NOPM, 0, 0),
@@ -503,6 +575,7 @@ static const struct of_device_id tas571x_of_match[] = {
 	{ .compatible = "ti,tas5711", .data = &tas5711_chip, },
 	{ .compatible = "ti,tas5717", .data = &tas5717_chip, },
 	{ .compatible = "ti,tas5719", .data = &tas5717_chip, },
+	{ .compatible = "ti,tas5721", .data = &tas5721_chip, },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, tas571x_of_match);
@@ -511,6 +584,7 @@ static const struct i2c_device_id tas571x_i2c_id[] = {
 	{ "tas5711", (kernel_ulong_t) &tas5711_chip },
 	{ "tas5717", (kernel_ulong_t) &tas5717_chip },
 	{ "tas5719", (kernel_ulong_t) &tas5717_chip },
+	{ "tas5721", (kernel_ulong_t) &tas5721_chip },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tas571x_i2c_id);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 5/5] dt/bindings: sound: new chip added into TAS571x binding
       [not found] ` <1459237178-12920-1-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
                     ` (2 preceding siblings ...)
  2016-03-29  7:39   ` [PATCH v2 4/5] Sound: SOC: TAS571x: added support for TAS5721 Petr Kulhavy
@ 2016-03-29  7:39   ` Petr Kulhavy
       [not found]     ` <1459237178-12920-5-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
  2016-03-31 17:33     ` Applied "ASoC: tas571x: new chip added into TAS571x binding" to the asoc tree Mark Brown
  2016-03-29 16:52   ` [PATCH v2 1/5] Sound: SOC: TAS571x: added missing register literals Mark Brown
                     ` (2 subsequent siblings)
  6 siblings, 2 replies; 12+ messages in thread
From: Petr Kulhavy @ 2016-03-29  7:39 UTC (permalink / raw)
  To: cernekee-F7+t8E8rja9g9hUCZPvPmw,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Petr Kulhavy

This adds the TAS5721 into the TAS571x binding.

Signed-off-by: Petr Kulhavy <petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
---
v1: <initial>

v2: formatting of the "compatible" strings amended

 Documentation/devicetree/bindings/sound/tas571x.txt | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/tas571x.txt b/Documentation/devicetree/bindings/sound/tas571x.txt
index 0ac31d8..b4959f1 100644
--- a/Documentation/devicetree/bindings/sound/tas571x.txt
+++ b/Documentation/devicetree/bindings/sound/tas571x.txt
@@ -1,4 +1,4 @@
-Texas Instruments TAS5711/TAS5717/TAS5719 stereo power amplifiers
+Texas Instruments TAS5711/TAS5717/TAS5719/TAS5721 stereo power amplifiers
 
 The codec is controlled through an I2C interface.  It also has two other
 signals that can be wired up to GPIOs: reset (strongly recommended), and
@@ -6,7 +6,11 @@ powerdown (optional).
 
 Required properties:
 
-- compatible: "ti,tas5711", "ti,tas5717", or "ti,tas5719"
+- compatible: should be one of the following:
+  - "ti,tas5711",
+  - "ti,tas5717",
+  - "ti,tas5719",
+  - "ti,tas5721"
 - reg: The I2C address of the device
 - #sound-dai-cells: must be equal to 0
 
@@ -25,6 +29,8 @@ Optional properties:
 - PVDD_B-supply: regulator phandle for the PVDD_B supply (5711)
 - PVDD_C-supply: regulator phandle for the PVDD_C supply (5711)
 - PVDD_D-supply: regulator phandle for the PVDD_D supply (5711)
+- DRVDD-supply: regulator phandle for the DRVDD supply (5721)
+- PVDD-supply: regulator phandle for the PVDD supply (5721)
 
 Example:
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 1/5] Sound: SOC: TAS571x: added missing register literals
       [not found] ` <1459237178-12920-1-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
                     ` (3 preceding siblings ...)
  2016-03-29  7:39   ` [PATCH v2 5/5] dt/bindings: sound: new chip added into TAS571x binding Petr Kulhavy
@ 2016-03-29 16:52   ` Mark Brown
  2016-03-29 18:11   ` Kevin Cernekee
  2016-03-29 21:33   ` Mark Brown
  6 siblings, 0 replies; 12+ messages in thread
From: Mark Brown @ 2016-03-29 16:52 UTC (permalink / raw)
  To: Petr Kulhavy
  Cc: cernekee-F7+t8E8rja9g9hUCZPvPmw,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 298 bytes --]

On Tue, Mar 29, 2016 at 09:39:34AM +0200, Petr Kulhavy wrote:
> The list of TAS571x registers was incomplete.
> Added the missing register definitions up to register 0x25

Please use subject lines matching the style for the subsystem.  This
makes it easier for people to identify relevant patches.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [PATCH v2 1/5] Sound: SOC: TAS571x: added missing register literals
       [not found] ` <1459237178-12920-1-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
                     ` (4 preceding siblings ...)
  2016-03-29 16:52   ` [PATCH v2 1/5] Sound: SOC: TAS571x: added missing register literals Mark Brown
@ 2016-03-29 18:11   ` Kevin Cernekee
  2016-03-29 21:33   ` Mark Brown
  6 siblings, 0 replies; 12+ messages in thread
From: Kevin Cernekee @ 2016-03-29 18:11 UTC (permalink / raw)
  To: Petr Kulhavy
  Cc: Liam Girdwood, Mark Brown, Rob Herring,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Tue, Mar 29, 2016 at 12:39 AM, Petr Kulhavy <petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org> wrote:
> The list of TAS571x registers was incomplete.
> Added the missing register definitions up to register 0x25
>
> Signed-off-by: Petr Kulhavy <petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>

For the series:

Reviewed-by: Kevin Cernekee <cernekee-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 1/5] Sound: SOC: TAS571x: added missing register literals
       [not found] ` <1459237178-12920-1-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
                     ` (5 preceding siblings ...)
  2016-03-29 18:11   ` Kevin Cernekee
@ 2016-03-29 21:33   ` Mark Brown
       [not found]     ` <20160329213305.GO2350-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
  6 siblings, 1 reply; 12+ messages in thread
From: Mark Brown @ 2016-03-29 21:33 UTC (permalink / raw)
  To: Petr Kulhavy
  Cc: cernekee-F7+t8E8rja9g9hUCZPvPmw,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 578 bytes --]

On Tue, Mar 29, 2016 at 09:39:34AM +0200, Petr Kulhavy wrote:

> The list of TAS571x registers was incomplete.
> Added the missing register definitions up to register 0x25

According to the driver the device has registers up to 0xff?

>  /* device registers */
> +#define TAS571X_CLK_CTRL_REG		0x00
> +#define TAS571X_DEV_ID_REG		0x01
> +#define TAS571X_ERR_STATUS_REG		0x02
> +#define TAS571X_SYS_CTRL_1_REG		0x03

These look like volatile registers but the device has a register cache
and we're not adding a list of volatile registers (or readable registers
for that matter).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [PATCH v2 1/5] Sound: SOC: TAS571x: added missing register literals
       [not found]     ` <20160329213305.GO2350-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
@ 2016-03-30  8:14       ` Petr Kulhavy
       [not found]         ` <56FB8B00.4000408-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Petr Kulhavy @ 2016-03-30  8:14 UTC (permalink / raw)
  To: Mark Brown
  Cc: cernekee-F7+t8E8rja9g9hUCZPvPmw,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi Mark,

On 29.03.2016 23:33, Mark Brown wrote:
> On Tue, Mar 29, 2016 at 09:39:34AM +0200, Petr Kulhavy wrote:
>
>> The list of TAS571x registers was incomplete.
>> Added the missing register definitions up to register 0x25
> According to the driver the device has registers up to 0xff?

That is indeed true. But from address 0x29 on (0x26 to 0x28 are 
reserved) the register width varies between 20, 12 and 8 bytes, which 
I'm afraid the register map is unable to represent.

>>   /* device registers */
>> +#define TAS571X_CLK_CTRL_REG		0x00
>> +#define TAS571X_DEV_ID_REG		0x01
>> +#define TAS571X_ERR_STATUS_REG		0x02
>> +#define TAS571X_SYS_CTRL_1_REG		0x03
> These look like volatile registers but the device has a register cache
> and we're not adding a list of volatile registers (or readable registers
> for that matter).
That's a good point, thanks! 0x03 is a regular RW register but 0x00 to 
0x02 are indeed volatile.
Is it better to make them read-only, or volatile?

Petr
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 1/5] Sound: SOC: TAS571x: added missing register literals
       [not found]         ` <56FB8B00.4000408-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
@ 2016-03-30 17:21           ` Mark Brown
  0 siblings, 0 replies; 12+ messages in thread
From: Mark Brown @ 2016-03-30 17:21 UTC (permalink / raw)
  To: Petr Kulhavy
  Cc: cernekee-F7+t8E8rja9g9hUCZPvPmw,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1215 bytes --]

On Wed, Mar 30, 2016 at 10:14:56AM +0200, Petr Kulhavy wrote:
> On 29.03.2016 23:33, Mark Brown wrote:

> >On Tue, Mar 29, 2016 at 09:39:34AM +0200, Petr Kulhavy wrote:

> >>The list of TAS571x registers was incomplete.
> >>Added the missing register definitions up to register 0x25

> >According to the driver the device has registers up to 0xff?

> That is indeed true. But from address 0x29 on (0x26 to 0x28 are reserved)
> the register width varies between 20, 12 and 8 bytes, which I'm afraid the
> register map is unable to represent.

Say what's going on in your changelog then.

> >>+#define TAS571X_DEV_ID_REG		0x01
> >>+#define TAS571X_ERR_STATUS_REG		0x02

> >These look like volatile registers but the device has a register cache
> >and we're not adding a list of volatile registers (or readable registers
> >for that matter).

> That's a good point, thanks! 0x03 is a regular RW register but 0x00 to 0x02
> are indeed volatile.
> Is it better to make them read-only, or volatile?

It's not an either/or.  If they are read only they should be flagged as
that.  If they are volatile (if they could change value at runtime) then
they need to be flagged as that, I'd expect this applies to
ERR_STATUS_REG.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [PATCH v2 5/5] dt/bindings: sound: new chip added into TAS571x binding
       [not found]     ` <1459237178-12920-5-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
@ 2016-03-31 14:21       ` Rob Herring
  0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2016-03-31 14:21 UTC (permalink / raw)
  To: Petr Kulhavy
  Cc: cernekee-F7+t8E8rja9g9hUCZPvPmw,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Tue, Mar 29, 2016 at 09:39:38AM +0200, Petr Kulhavy wrote:
> This adds the TAS5721 into the TAS571x binding.
> 
> Signed-off-by: Petr Kulhavy <petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
> ---
> v1: <initial>
> 
> v2: formatting of the "compatible" strings amended
> 
>  Documentation/devicetree/bindings/sound/tas571x.txt | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)

Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Applied "ASoC: tas571x: new chip added into TAS571x binding" to the asoc tree
  2016-03-29  7:39   ` [PATCH v2 5/5] dt/bindings: sound: new chip added into TAS571x binding Petr Kulhavy
       [not found]     ` <1459237178-12920-5-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
@ 2016-03-31 17:33     ` Mark Brown
  1 sibling, 0 replies; 12+ messages in thread
From: Mark Brown @ 2016-03-31 17:33 UTC (permalink / raw)
  To: Petr Kulhavy, Rob Herring, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: tas571x: new chip added into TAS571x binding

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From a42121b7a1d80a0eaac9ed1442760bf4e65f5352 Mon Sep 17 00:00:00 2001
From: Petr Kulhavy <petr@barix.com>
Date: Thu, 31 Mar 2016 18:41:27 +0200
Subject: [PATCH] ASoC: tas571x: new chip added into TAS571x binding

This adds the TAS5721 into the TAS571x binding.

Signed-off-by: Petr Kulhavy <petr@barix.com>
Reviewed-by: Kevin Cernekee <cernekee@chromium.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 Documentation/devicetree/bindings/sound/tas571x.txt | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/tas571x.txt b/Documentation/devicetree/bindings/sound/tas571x.txt
index 0ac31d8d5ac4..b4959f10b74b 100644
--- a/Documentation/devicetree/bindings/sound/tas571x.txt
+++ b/Documentation/devicetree/bindings/sound/tas571x.txt
@@ -1,4 +1,4 @@
-Texas Instruments TAS5711/TAS5717/TAS5719 stereo power amplifiers
+Texas Instruments TAS5711/TAS5717/TAS5719/TAS5721 stereo power amplifiers
 
 The codec is controlled through an I2C interface.  It also has two other
 signals that can be wired up to GPIOs: reset (strongly recommended), and
@@ -6,7 +6,11 @@ powerdown (optional).
 
 Required properties:
 
-- compatible: "ti,tas5711", "ti,tas5717", or "ti,tas5719"
+- compatible: should be one of the following:
+  - "ti,tas5711",
+  - "ti,tas5717",
+  - "ti,tas5719",
+  - "ti,tas5721"
 - reg: The I2C address of the device
 - #sound-dai-cells: must be equal to 0
 
@@ -25,6 +29,8 @@ Optional properties:
 - PVDD_B-supply: regulator phandle for the PVDD_B supply (5711)
 - PVDD_C-supply: regulator phandle for the PVDD_C supply (5711)
 - PVDD_D-supply: regulator phandle for the PVDD_D supply (5711)
+- DRVDD-supply: regulator phandle for the DRVDD supply (5721)
+- PVDD-supply: regulator phandle for the PVDD supply (5721)
 
 Example:
 
-- 
2.8.0.rc3

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

end of thread, other threads:[~2016-03-31 17:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-29  7:39 [PATCH v2 1/5] Sound: SOC: TAS571x: added missing register literals Petr Kulhavy
     [not found] ` <1459237178-12920-1-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-03-29  7:39   ` [PATCH v2 2/5] Sound: SOC: TAS571x: chip type detection via I2C name Petr Kulhavy
2016-03-29  7:39   ` [PATCH v2 3/5] Sound: SOC: TAS571x: implemented digital mute Petr Kulhavy
2016-03-29  7:39   ` [PATCH v2 4/5] Sound: SOC: TAS571x: added support for TAS5721 Petr Kulhavy
2016-03-29  7:39   ` [PATCH v2 5/5] dt/bindings: sound: new chip added into TAS571x binding Petr Kulhavy
     [not found]     ` <1459237178-12920-5-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-03-31 14:21       ` Rob Herring
2016-03-31 17:33     ` Applied "ASoC: tas571x: new chip added into TAS571x binding" to the asoc tree Mark Brown
2016-03-29 16:52   ` [PATCH v2 1/5] Sound: SOC: TAS571x: added missing register literals Mark Brown
2016-03-29 18:11   ` Kevin Cernekee
2016-03-29 21:33   ` Mark Brown
     [not found]     ` <20160329213305.GO2350-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-03-30  8:14       ` Petr Kulhavy
     [not found]         ` <56FB8B00.4000408-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-03-30 17:21           ` Mark Brown

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.