Alsa-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/2] ASoC: tlv320adcx140: Fix GPO register start address
@ 2020-07-30 14:24 Dan Murphy
  2020-07-30 14:24 ` [PATCH 2/2] ASoC: tlv320adcx140: Move device reset to before programming Dan Murphy
  2020-07-30 22:27 ` [PATCH 1/2] ASoC: tlv320adcx140: Fix GPO register start address Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Murphy @ 2020-07-30 14:24 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai; +Cc: alsa-devel, linux-kernel, Dan Murphy

The header was updated to align with the data sheet to start the GPO_CFG
at GPO_CFG0.  The code was not updated to the change and therefore the
GPO_CFG0 register was not written to.

Fixes: 6617cff6a05e ("ASoC: tlv320adcx140: Add GPO configuration and drive output config")
Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
 sound/soc/codecs/tlv320adcx140.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c
index 7bb9e9aa0c0a..fc7616dcf9b5 100644
--- a/sound/soc/codecs/tlv320adcx140.c
+++ b/sound/soc/codecs/tlv320adcx140.c
@@ -790,7 +790,7 @@ static int adcx140_configure_gpo(struct adcx140_priv *adcx140)
 
 		gpo_output_val = gpo_outputs[0] << ADCX140_GPO_SHIFT |
 				 gpo_outputs[1];
-		ret = regmap_write(adcx140->regmap, ADCX140_GPO_CFG1 + i,
+		ret = regmap_write(adcx140->regmap, ADCX140_GPO_CFG0 + i,
 				   gpo_output_val);
 		if (ret)
 			return ret;
-- 
2.28.0


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

* [PATCH 2/2] ASoC: tlv320adcx140: Move device reset to before programming
  2020-07-30 14:24 [PATCH 1/2] ASoC: tlv320adcx140: Fix GPO register start address Dan Murphy
@ 2020-07-30 14:24 ` Dan Murphy
  2020-07-30 22:27 ` [PATCH 1/2] ASoC: tlv320adcx140: Fix GPO register start address Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Dan Murphy @ 2020-07-30 14:24 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai; +Cc: alsa-devel, linux-kernel, Dan Murphy

Reset the device before programming the registers or all programming
will be lost as the device resets registers to default settings.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
 sound/soc/codecs/tlv320adcx140.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c
index fc7616dcf9b5..5cd50d841177 100644
--- a/sound/soc/codecs/tlv320adcx140.c
+++ b/sound/soc/codecs/tlv320adcx140.c
@@ -838,6 +838,10 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
 
 	bias_cfg = bias_source << ADCX140_MIC_BIAS_SHIFT | vref_source;
 
+	ret = adcx140_reset(adcx140);
+	if (ret)
+		goto out;
+
 	pdm_count = device_property_count_u32(adcx140->dev,
 					      "ti,pdm-edge-select");
 	if (pdm_count <= ADCX140_NUM_PDM_EDGES && pdm_count > 0) {
@@ -885,10 +889,6 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
 	if (ret)
 		goto out;
 
-	ret = adcx140_reset(adcx140);
-	if (ret)
-		goto out;
-
 	if (adcx140->supply_areg == NULL)
 		sleep_cfg_val |= ADCX140_AREG_INTERNAL;
 
-- 
2.28.0


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

* Re: [PATCH 1/2] ASoC: tlv320adcx140: Fix GPO register start address
  2020-07-30 14:24 [PATCH 1/2] ASoC: tlv320adcx140: Fix GPO register start address Dan Murphy
  2020-07-30 14:24 ` [PATCH 2/2] ASoC: tlv320adcx140: Move device reset to before programming Dan Murphy
@ 2020-07-30 22:27 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-07-30 22:27 UTC (permalink / raw)
  To: lgirdwood, perex, tiwai, Dan Murphy; +Cc: alsa-devel, linux-kernel

On Thu, 30 Jul 2020 09:24:18 -0500, Dan Murphy wrote:
> The header was updated to align with the data sheet to start the GPO_CFG
> at GPO_CFG0.  The code was not updated to the change and therefore the
> GPO_CFG0 register was not written to.

Applied to

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

Thanks!

[1/2] ASoC: tlv320adcx140: Fix GPO register start address
      commit: 806a8afedef82c5f156b1c9b1de1205f9abfd21e
[2/2] ASoC: tlv320adcx140: Move device reset to before programming
      commit: 982f4a4134893cd48c466e7a56422d7c65837d10

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] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30 14:24 [PATCH 1/2] ASoC: tlv320adcx140: Fix GPO register start address Dan Murphy
2020-07-30 14:24 ` [PATCH 2/2] ASoC: tlv320adcx140: Move device reset to before programming Dan Murphy
2020-07-30 22:27 ` [PATCH 1/2] ASoC: tlv320adcx140: Fix GPO register start address Mark Brown

Alsa-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/alsa-devel/0 alsa-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 alsa-devel alsa-devel/ https://lore.kernel.org/alsa-devel \
		alsa-devel@alsa-project.org
	public-inbox-index alsa-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.alsa-project.alsa-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git