All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ASoC: tlv320aic32x4: Bugfixes for tlv320aic32x4 driver
       [not found] <20210331182125.413693-1-nh6z@nh6z.net>
@ 2021-03-31 18:21 ` Annaliese McDermond
  2021-04-06 17:39   ` Mark Brown
       [not found] ` <20210331182125.413693-3-nh6z@nh6z.net>
       [not found] ` <20210331182125.413693-2-nh6z@nh6z.net>
  2 siblings, 1 reply; 6+ messages in thread
From: Annaliese McDermond @ 2021-03-31 18:21 UTC (permalink / raw)
  To: alsa-devel, broonie, lgirdwood, perex, tiwai; +Cc: team, Annaliese McDermond

These are a couple of bugfixes for the tlv320aic32x4 driver
that we discovered after the Raspberry Pi Foundation's move to
the 5.10 kernel.

The first increases the maximum value in the regmap configuration
so that the powerup command actually works.

The second changes the ordering of the clock registration in the
module probe function so that the clocks are properly registered
before the component probe function runs.

Changes in v2:
- Corrected commit hashes in Fixes lines to be proper length
- Including inadvertently omitted maintainers on To list.

Annaliese McDermond (2):
  ASoC: tlv320aic32x4: Increase maximum register in regmap
  ASoC: tlv320aic32x4: Register clocks before registering component

 sound/soc/codecs/tlv320aic32x4.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

-- 
2.27.0


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

* [PATCH v2 2/2] ASoC: tlv320aic32x4: Register clocks before registering component
       [not found] ` <20210331182125.413693-3-nh6z@nh6z.net>
@ 2021-03-31 18:21     ` Annaliese McDermond
  0 siblings, 0 replies; 6+ messages in thread
From: Annaliese McDermond @ 2021-03-31 18:21 UTC (permalink / raw)
  To: alsa-devel, broonie, lgirdwood, perex, tiwai
  Cc: Annaliese McDermond, team, stable

Clock registration must be performed before the component is
registered.  aic32x4_component_probe attempts to get all the
clocks right off the bat.  If the component is registered before
the clocks there is a race condition where the clocks may not
be registered by the time aic32x4_componet_probe actually runs.

Fixes: d1c859d314d8 ("ASoC: codec: tlv3204: Increased maximum supported channels")
Cc: stable@vger.kernel.org
Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
---
 sound/soc/codecs/tlv320aic32x4.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index 1ac3b3b12dc6..b689f26fc4be 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -1243,6 +1243,10 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap)
 	if (ret)
 		goto err_disable_regulators;
 
+	ret = aic32x4_register_clocks(dev, aic32x4->mclk_name);
+	if (ret)
+		goto err_disable_regulators;
+
 	ret = devm_snd_soc_register_component(dev,
 			&soc_component_dev_aic32x4, &aic32x4_dai, 1);
 	if (ret) {
@@ -1250,10 +1254,6 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap)
 		goto err_disable_regulators;
 	}
 
-	ret = aic32x4_register_clocks(dev, aic32x4->mclk_name);
-	if (ret)
-		goto err_disable_regulators;
-
 	return 0;
 
 err_disable_regulators:
-- 
2.27.0



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

* [PATCH v2 2/2] ASoC: tlv320aic32x4: Register clocks before registering component
@ 2021-03-31 18:21     ` Annaliese McDermond
  0 siblings, 0 replies; 6+ messages in thread
From: Annaliese McDermond @ 2021-03-31 18:21 UTC (permalink / raw)
  To: alsa-devel, broonie, lgirdwood, perex, tiwai
  Cc: team, stable, Annaliese McDermond

Clock registration must be performed before the component is
registered.  aic32x4_component_probe attempts to get all the
clocks right off the bat.  If the component is registered before
the clocks there is a race condition where the clocks may not
be registered by the time aic32x4_componet_probe actually runs.

Fixes: d1c859d314d8 ("ASoC: codec: tlv3204: Increased maximum supported channels")
Cc: stable@vger.kernel.org
Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
---
 sound/soc/codecs/tlv320aic32x4.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index 1ac3b3b12dc6..b689f26fc4be 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -1243,6 +1243,10 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap)
 	if (ret)
 		goto err_disable_regulators;
 
+	ret = aic32x4_register_clocks(dev, aic32x4->mclk_name);
+	if (ret)
+		goto err_disable_regulators;
+
 	ret = devm_snd_soc_register_component(dev,
 			&soc_component_dev_aic32x4, &aic32x4_dai, 1);
 	if (ret) {
@@ -1250,10 +1254,6 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap)
 		goto err_disable_regulators;
 	}
 
-	ret = aic32x4_register_clocks(dev, aic32x4->mclk_name);
-	if (ret)
-		goto err_disable_regulators;
-
 	return 0;
 
 err_disable_regulators:
-- 
2.27.0



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

* [PATCH v2 1/2] ASoC: tlv320aic32x4: Increase maximum register in regmap
       [not found] ` <20210331182125.413693-2-nh6z@nh6z.net>
@ 2021-03-31 18:21     ` Annaliese McDermond
  0 siblings, 0 replies; 6+ messages in thread
From: Annaliese McDermond @ 2021-03-31 18:21 UTC (permalink / raw)
  To: alsa-devel, broonie, lgirdwood, perex, tiwai
  Cc: Annaliese McDermond, team, stable

AIC32X4_REFPOWERUP was added as a register, but the maximum register value
in the regmap and regmap range was not correspondingly increased.  This
caused an error when this register was attempted to be written.

Fixes: ec96690de82c ("ASoC: tlv320aic32x4: Enable fast charge")
Cc: stable@vger.kernel.org
Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
---
 sound/soc/codecs/tlv320aic32x4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index f04f88c8d425..1ac3b3b12dc6 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -577,12 +577,12 @@ static const struct regmap_range_cfg aic32x4_regmap_pages[] = {
 		.window_start = 0,
 		.window_len = 128,
 		.range_min = 0,
-		.range_max = AIC32X4_RMICPGAVOL,
+		.range_max = AIC32X4_REFPOWERUP,
 	},
 };
 
 const struct regmap_config aic32x4_regmap_config = {
-	.max_register = AIC32X4_RMICPGAVOL,
+	.max_register = AIC32X4_REFPOWERUP,
 	.ranges = aic32x4_regmap_pages,
 	.num_ranges = ARRAY_SIZE(aic32x4_regmap_pages),
 };
-- 
2.27.0



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

* [PATCH v2 1/2] ASoC: tlv320aic32x4: Increase maximum register in regmap
@ 2021-03-31 18:21     ` Annaliese McDermond
  0 siblings, 0 replies; 6+ messages in thread
From: Annaliese McDermond @ 2021-03-31 18:21 UTC (permalink / raw)
  To: alsa-devel, broonie, lgirdwood, perex, tiwai
  Cc: team, stable, Annaliese McDermond

AIC32X4_REFPOWERUP was added as a register, but the maximum register value
in the regmap and regmap range was not correspondingly increased.  This
caused an error when this register was attempted to be written.

Fixes: ec96690de82c ("ASoC: tlv320aic32x4: Enable fast charge")
Cc: stable@vger.kernel.org
Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
---
 sound/soc/codecs/tlv320aic32x4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index f04f88c8d425..1ac3b3b12dc6 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -577,12 +577,12 @@ static const struct regmap_range_cfg aic32x4_regmap_pages[] = {
 		.window_start = 0,
 		.window_len = 128,
 		.range_min = 0,
-		.range_max = AIC32X4_RMICPGAVOL,
+		.range_max = AIC32X4_REFPOWERUP,
 	},
 };
 
 const struct regmap_config aic32x4_regmap_config = {
-	.max_register = AIC32X4_RMICPGAVOL,
+	.max_register = AIC32X4_REFPOWERUP,
 	.ranges = aic32x4_regmap_pages,
 	.num_ranges = ARRAY_SIZE(aic32x4_regmap_pages),
 };
-- 
2.27.0



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

* Re: [PATCH v2 0/2] ASoC: tlv320aic32x4: Bugfixes for tlv320aic32x4 driver
  2021-03-31 18:21 ` [PATCH v2 0/2] ASoC: tlv320aic32x4: Bugfixes for tlv320aic32x4 driver Annaliese McDermond
@ 2021-04-06 17:39   ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2021-04-06 17:39 UTC (permalink / raw)
  To: Annaliese McDermond, lgirdwood, tiwai, perex, alsa-devel; +Cc: team, Mark Brown

On Wed, 31 Mar 2021 18:21:36 +0000, Annaliese McDermond wrote:
> These are a couple of bugfixes for the tlv320aic32x4 driver
> that we discovered after the Raspberry Pi Foundation's move to
> the 5.10 kernel.
> 
> The first increases the maximum value in the regmap configuration
> so that the powerup command actually works.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: tlv320aic32x4: Increase maximum register in regmap
      commit: 29654ed8384e9dbaf4cfba689dbcb664a6ab4bb7
[2/2] ASoC: tlv320aic32x4: Register clocks before registering component
      commit: 1ca1156cfd69530e6b7cb99943baf90c8bd871a5

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

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

end of thread, other threads:[~2021-04-06 17:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210331182125.413693-1-nh6z@nh6z.net>
2021-03-31 18:21 ` [PATCH v2 0/2] ASoC: tlv320aic32x4: Bugfixes for tlv320aic32x4 driver Annaliese McDermond
2021-04-06 17:39   ` Mark Brown
     [not found] ` <20210331182125.413693-3-nh6z@nh6z.net>
2021-03-31 18:21   ` [PATCH v2 2/2] ASoC: tlv320aic32x4: Register clocks before registering component Annaliese McDermond
2021-03-31 18:21     ` Annaliese McDermond
     [not found] ` <20210331182125.413693-2-nh6z@nh6z.net>
2021-03-31 18:21   ` [PATCH v2 1/2] ASoC: tlv320aic32x4: Increase maximum register in regmap Annaliese McDermond
2021-03-31 18:21     ` Annaliese McDermond

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.