linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: codecs: msm8916-wcd-analog: clean parse_dt()
@ 2016-11-04 14:45 Srinivas Kandagatla
  2016-11-04 14:45 ` [PATCH 2/2] ASoC: codecs: msm8916-wcd-digital: rename parse_dt to get_clks Srinivas Kandagatla
  0 siblings, 1 reply; 3+ messages in thread
From: Srinivas Kandagatla @ 2016-11-04 14:45 UTC (permalink / raw)
  To: broonie, alsa-devel; +Cc: tiwai, kwestfie, linux-arm-msm, srinivas.kandagatla

Move the code which is not parsing dt from pm8916_wcd_analog_parse_dt()
to make it clear to reader.

No functional changes done.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---

This change was suggested by Mark http://www.spinics.net/lists/alsa-devel/msg55878.html

thanks,
srini

 sound/soc/codecs/msm8916-wcd-analog.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c
index d9f999b..50ad75a 100644
--- a/sound/soc/codecs/msm8916-wcd-analog.c
+++ b/sound/soc/codecs/msm8916-wcd-analog.c
@@ -802,7 +802,6 @@ static struct snd_soc_codec_driver pm8916_wcd_analog = {
 static int pm8916_wcd_analog_parse_dt(struct device *dev,
 				       struct pm8916_wcd_analog_priv *priv)
 {
-	int ret, i;

 	if (of_property_read_bool(dev->of_node, "qcom,micbias1-ext-cap"))
 		priv->micbias1_cap_mode = MICB_1_EN_EXT_BYP_CAP;
@@ -814,21 +813,6 @@ static int pm8916_wcd_analog_parse_dt(struct device *dev,
 	else
 		priv->micbias2_cap_mode = MICB_1_EN_NO_EXT_BYP_CAP;

-	priv->mclk = devm_clk_get(dev, "mclk");
-	if (IS_ERR(priv->mclk)) {
-		dev_err(dev, "failed to get mclk\n");
-		return PTR_ERR(priv->mclk);
-	}
-	for (i = 0; i < ARRAY_SIZE(supply_names); i++)
-		priv->supplies[i].supply = supply_names[i];
-
-	ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(priv->supplies),
-				    priv->supplies);
-	if (ret) {
-		dev_err(dev, "Failed to get regulator supplies %d\n", ret);
-		return ret;
-	}
-
 	return 0;
 }

@@ -836,7 +820,7 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev)
 {
 	struct pm8916_wcd_analog_priv *priv;
 	struct device *dev = &pdev->dev;
-	int ret;
+	int ret, i;

 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
@@ -846,6 +830,22 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev)
 	if (ret < 0)
 		return ret;

+	priv->mclk = devm_clk_get(dev, "mclk");
+	if (IS_ERR(priv->mclk)) {
+		dev_err(dev, "failed to get mclk\n");
+		return PTR_ERR(priv->mclk);
+	}
+
+	for (i = 0; i < ARRAY_SIZE(supply_names); i++)
+		priv->supplies[i].supply = supply_names[i];
+
+	ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(priv->supplies),
+				    priv->supplies);
+	if (ret) {
+		dev_err(dev, "Failed to get regulator supplies %d\n", ret);
+		return ret;
+	}
+
 	ret = clk_prepare_enable(priv->mclk);
 	if (ret < 0) {
 		dev_err(dev, "failed to enable mclk %d\n", ret);
--
2.10.1

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

* [PATCH 2/2] ASoC: codecs: msm8916-wcd-digital: rename parse_dt to get_clks
  2016-11-04 14:45 [PATCH 1/2] ASoC: codecs: msm8916-wcd-analog: clean parse_dt() Srinivas Kandagatla
@ 2016-11-04 14:45 ` Srinivas Kandagatla
  2016-11-04 16:47   ` Applied "ASoC: codecs: msm8916-wcd-digital: rename parse_dt to get_clks" to the asoc tree Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Srinivas Kandagatla @ 2016-11-04 14:45 UTC (permalink / raw)
  To: broonie, alsa-devel; +Cc: tiwai, kwestfie, linux-arm-msm, srinivas.kandagatla

This patch renames msm8916_wcd_digital_parse_dt() to
msm8916_wcd_digital_get_clks() as the function is not directly dealing
with dt parsing.

No functional changes done.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/codecs/msm8916-wcd-digital.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/msm8916-wcd-digital.c b/sound/soc/codecs/msm8916-wcd-digital.c
index e35501a..f690442 100644
--- a/sound/soc/codecs/msm8916-wcd-digital.c
+++ b/sound/soc/codecs/msm8916-wcd-digital.c
@@ -539,7 +539,7 @@ static const struct snd_soc_dapm_widget msm8916_wcd_digital_dapm_widgets[] = {
 
 };
 
-static int msm8916_wcd_digital_parse_dt(struct platform_device *pdev,
+static int msm8916_wcd_digital_get_clks(struct platform_device *pdev,
 					struct msm8916_wcd_digital_priv	*priv)
 {
 	struct device *dev = &pdev->dev;
@@ -866,7 +866,7 @@ static int msm8916_wcd_digital_probe(struct platform_device *pdev)
 	if (IS_ERR(digital_map))
 		return PTR_ERR(digital_map);
 
-	ret = msm8916_wcd_digital_parse_dt(pdev, priv);
+	ret = msm8916_wcd_digital_get_clks(pdev, priv);
 	if (ret < 0)
 		return ret;
 
-- 
2.10.1

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

* Applied "ASoC: codecs: msm8916-wcd-digital: rename parse_dt to get_clks" to the asoc tree
  2016-11-04 14:45 ` [PATCH 2/2] ASoC: codecs: msm8916-wcd-digital: rename parse_dt to get_clks Srinivas Kandagatla
@ 2016-11-04 16:47   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2016-11-04 16:47 UTC (permalink / raw)
  Cc: Mark Brown

The patch

   ASoC: codecs: msm8916-wcd-digital: rename parse_dt to get_clks

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 ba9b8c42cff5aaf78229260c5622d6b699683e28 Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date: Fri, 4 Nov 2016 14:45:40 +0000
Subject: [PATCH] ASoC: codecs: msm8916-wcd-digital: rename parse_dt to
 get_clks

This patch renames msm8916_wcd_digital_parse_dt() to
msm8916_wcd_digital_get_clks() as the function is not directly dealing
with dt parsing.

No functional changes done.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/msm8916-wcd-digital.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/msm8916-wcd-digital.c b/sound/soc/codecs/msm8916-wcd-digital.c
index e35501af91ab..f690442af8c9 100644
--- a/sound/soc/codecs/msm8916-wcd-digital.c
+++ b/sound/soc/codecs/msm8916-wcd-digital.c
@@ -539,7 +539,7 @@ static const struct snd_soc_dapm_widget msm8916_wcd_digital_dapm_widgets[] = {
 
 };
 
-static int msm8916_wcd_digital_parse_dt(struct platform_device *pdev,
+static int msm8916_wcd_digital_get_clks(struct platform_device *pdev,
 					struct msm8916_wcd_digital_priv	*priv)
 {
 	struct device *dev = &pdev->dev;
@@ -866,7 +866,7 @@ static int msm8916_wcd_digital_probe(struct platform_device *pdev)
 	if (IS_ERR(digital_map))
 		return PTR_ERR(digital_map);
 
-	ret = msm8916_wcd_digital_parse_dt(pdev, priv);
+	ret = msm8916_wcd_digital_get_clks(pdev, priv);
 	if (ret < 0)
 		return ret;
 
-- 
2.10.1

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

end of thread, other threads:[~2016-11-04 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-04 14:45 [PATCH 1/2] ASoC: codecs: msm8916-wcd-analog: clean parse_dt() Srinivas Kandagatla
2016-11-04 14:45 ` [PATCH 2/2] ASoC: codecs: msm8916-wcd-digital: rename parse_dt to get_clks Srinivas Kandagatla
2016-11-04 16:47   ` Applied "ASoC: codecs: msm8916-wcd-digital: rename parse_dt to get_clks" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).