devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] ASoC: SMA1303: Remove the sysclk setting in devicetree
@ 2023-02-09  8:49 Kiseok Jo
  2023-02-09  8:54 ` Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Kiseok Jo @ 2023-02-09  8:49 UTC (permalink / raw)
  To: Rob Herring, Mark Brown, Liam Girdwood, Krzysztof Kozlowski
  Cc: alsa-devel, devicetree, Kiseok Jo, Krzysztof Kozlowski

In SMA1303, this device does not support MCLK.
So it need to remove sysclk setting in devicetree.
v2: Modify the sysclk setting - using devm_clk_get for mclk.

Signed-off-by: Kiseok Jo <kiseok.jo@irondevice.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 sound/soc/codecs/sma1303.c | 37 ++-----------------------------------
 1 file changed, 2 insertions(+), 35 deletions(-)

diff --git a/sound/soc/codecs/sma1303.c b/sound/soc/codecs/sma1303.c
index 9ae4e3cba3ae..727c01facf52 100644
--- a/sound/soc/codecs/sma1303.c
+++ b/sound/soc/codecs/sma1303.c
@@ -998,10 +998,7 @@ static int sma1303_dai_hw_params_amp(struct snd_pcm_substream *substream,
 			params_channels(params));
 
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
-
-		if (sma1303->sys_clk_id == SMA1303_PLL_CLKIN_MCLK
-			|| sma1303->sys_clk_id == SMA1303_PLL_CLKIN_BCLK) {
-
+		if (sma1303->sys_clk_id == SMA1303_PLL_CLKIN_BCLK) {
 			if (sma1303->last_bclk != bclk) {
 				sma1303_setup_pll(component, bclk);
 				sma1303->last_bclk = bclk;
@@ -1680,9 +1677,7 @@ static struct attribute_group sma1303_attr_group = {
 static int sma1303_i2c_probe(struct i2c_client *client)
 {
 	struct sma1303_priv *sma1303;
-	struct device_node *np = client->dev.of_node;
 	int ret, i = 0;
-	u32 value = 0;
 	unsigned int device_info, status, otp_stat;
 
 	sma1303 = devm_kzalloc(&client->dev,
@@ -1700,35 +1695,6 @@ static int sma1303_i2c_probe(struct i2c_client *client)
 		return ret;
 	}
 
-	if (np) {
-		if (!of_property_read_u32(np, "sys-clk-id", &value)) {
-			switch (value) {
-			case SMA1303_EXTERNAL_CLOCK_19_2:
-			case SMA1303_EXTERNAL_CLOCK_24_576:
-			case SMA1303_PLL_CLKIN_MCLK:
-				dev_dbg(&client->dev, "MCLK is not supported\n");
-				break;
-			case SMA1303_PLL_CLKIN_BCLK:
-				dev_dbg(&client->dev,
-				"Take an BCLK(SCK) and covert it to an internal PLL for use\n");
-				break;
-			default:
-				dev_err(&client->dev,
-					"Invalid sys-clk-id: %u\n", value);
-				return -EINVAL;
-			}
-			sma1303->sys_clk_id = value;
-		} else {
-			dev_dbg(&client->dev, "Use the internal PLL clock by default\n");
-			sma1303->sys_clk_id = SMA1303_PLL_CLKIN_BCLK;
-		}
-	} else {
-		dev_err(&client->dev,
-			"device node initialization error\n");
-		devm_kfree(&client->dev, sma1303);
-		return -ENODEV;
-	}
-
 	ret = sma1303_regmap_read(sma1303,
 			SMA1303_FF_DEVICE_INDEX, &device_info);
 
@@ -1783,6 +1749,7 @@ static int sma1303_i2c_probe(struct i2c_client *client)
 	sma1303->retry_cnt = SMA1303_I2C_RETRY_COUNT;
 	sma1303->tdm_slot_rx = 0;
 	sma1303->tdm_slot_tx = 0;
+	sma1303->sys_clk_id = SMA1303_PLL_CLKIN_BCLK;
 
 	sma1303->dev = &client->dev;
 	sma1303->kobj = &client->dev.kobj;
-- 
2.20.1


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

* Re: [PATCH v3] ASoC: SMA1303: Remove the sysclk setting in devicetree
  2023-02-09  8:49 [PATCH v3] ASoC: SMA1303: Remove the sysclk setting in devicetree Kiseok Jo
@ 2023-02-09  8:54 ` Krzysztof Kozlowski
  2023-02-09  9:01   ` Ki-Seok Jo
  2023-02-09 11:29 ` Mark Brown
  2023-02-09 16:06 ` Mark Brown
  2 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-09  8:54 UTC (permalink / raw)
  To: Kiseok Jo, Rob Herring, Mark Brown, Liam Girdwood,
	Krzysztof Kozlowski
  Cc: alsa-devel, devicetree

On 09/02/2023 09:49, Kiseok Jo wrote:
> In SMA1303, this device does not support MCLK.
> So it need to remove sysclk setting in devicetree.
> v2: Modify the sysclk setting - using devm_clk_get for mclk.
> 
> Signed-off-by: Kiseok Jo <kiseok.jo@irondevice.com>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Where? Where did you get this tag?

Best regards,
Krzysztof


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

* Re: [PATCH v3] ASoC: SMA1303: Remove the sysclk setting in devicetree
  2023-02-09  8:54 ` Krzysztof Kozlowski
@ 2023-02-09  9:01   ` Ki-Seok Jo
  2023-02-09  9:03     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 9+ messages in thread
From: Ki-Seok Jo @ 2023-02-09  9:01 UTC (permalink / raw)
  To: Rob Herring, Mark Brown, Liam Girdwood, Krzysztof Kozlowski
  Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org


> > In SMA1303, this device does not support MCLK.
> > So it need to remove sysclk setting in devicetree.
> > v2: Modify the sysclk setting - using devm_clk_get for mclk.
> >
> > Signed-off-by: Kiseok Jo <kiseok.jo@irondevice.com>
> > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> Where? Where did you get this tag?
> 
> Best regards,
> Krzysztof

I'm sorry, I don’t' know what you're talking about.
What tag are you talking about?
Sorry, could you please elaborate?

Best regards,
Kiseok Jo

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

* Re: [PATCH v3] ASoC: SMA1303: Remove the sysclk setting in devicetree
  2023-02-09  9:01   ` Ki-Seok Jo
@ 2023-02-09  9:03     ` Krzysztof Kozlowski
  2023-02-09  9:20       ` Ki-Seok Jo
  0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-09  9:03 UTC (permalink / raw)
  To: Ki-Seok Jo, Rob Herring, Mark Brown, Liam Girdwood,
	Krzysztof Kozlowski
  Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org

On 09/02/2023 10:01, Ki-Seok Jo wrote:
> 
>>> In SMA1303, this device does not support MCLK.
>>> So it need to remove sysclk setting in devicetree.
>>> v2: Modify the sysclk setting - using devm_clk_get for mclk.
>>>
>>> Signed-off-by: Kiseok Jo <kiseok.jo@irondevice.com>
>>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>> Where? Where did you get this tag?
>>
>> Best regards,
>> Krzysztof
> 
> I'm sorry, I don’t' know what you're talking about.
> What tag are you talking about?
> Sorry, could you please elaborate?

From where the tag "Reviewed-by: Krzysztof..." appear?

Best regards,
Krzysztof


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

* Re: [PATCH v3] ASoC: SMA1303: Remove the sysclk setting in devicetree
  2023-02-09  9:03     ` Krzysztof Kozlowski
@ 2023-02-09  9:20       ` Ki-Seok Jo
  2023-02-09  9:34         ` Ki-Seok Jo
  0 siblings, 1 reply; 9+ messages in thread
From: Ki-Seok Jo @ 2023-02-09  9:20 UTC (permalink / raw)
  To: Rob Herring, Mark Brown, Liam Girdwood, Krzysztof Kozlowski
  Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org


> On 09/02/2023 10:01, Ki-Seok Jo wrote:
> >
> >>> In SMA1303, this device does not support MCLK.
> >>> So it need to remove sysclk setting in devicetree.
> >>> v2: Modify the sysclk setting - using devm_clk_get for mclk.
> >>>
> >>> Signed-off-by: Kiseok Jo <kiseok.jo@irondevice.com>
> >>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >>
> >> Where? Where did you get this tag?
> >>
> >> Best regards,
> >> Krzysztof
> >
> > I'm sorry, I don’t' know what you're talking about.
> > What tag are you talking about?
> > Sorry, could you please elaborate?
> 
> From where the tag "Reviewed-by: Krzysztof..." appear?
> 
> Best regards,
> Krzysztof

I'm sorry I misunderstood the word. :(
Originally, I was going to use reported-by.
I shoud have reviewed it one more time, I'm really sorry.

Thank you for telling me.

Best regards,
Kiseok Jo

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

* Re: [PATCH v3] ASoC: SMA1303: Remove the sysclk setting in devicetree
  2023-02-09  9:20       ` Ki-Seok Jo
@ 2023-02-09  9:34         ` Ki-Seok Jo
  2023-02-09 11:18           ` Krzysztof Kozlowski
  0 siblings, 1 reply; 9+ messages in thread
From: Ki-Seok Jo @ 2023-02-09  9:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring, Mark Brown, Liam Girdwood
  Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org

> 
> > On 09/02/2023 10:01, Ki-Seok Jo wrote:
> > >
> > >>> In SMA1303, this device does not support MCLK.
> > >>> So it need to remove sysclk setting in devicetree.
> > >>> v2: Modify the sysclk setting - using devm_clk_get for mclk.
> > >>>
> > >>> Signed-off-by: Kiseok Jo <kiseok.jo@irondevice.com>
> > >>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > >>
> > >> Where? Where did you get this tag?
> > >>
> > >> Best regards,
> > >> Krzysztof
> > >
> > > I'm sorry, I don’t' know what you're talking about.
> > > What tag are you talking about?
> > > Sorry, could you please elaborate?
> >
> > From where the tag "Reviewed-by: Krzysztof..." appear?
> >
> > Best regards,
> > Krzysztof
> 
> I'm sorry I misunderstood the word. :(
> Originally, I was going to use reported-by.
> I shoud have reviewed it one more time, I'm really sorry.
> 
> Thank you for telling me.
> 
> Best regards,
> Kiseok Jo

I'm sorry. It's my mistake..

Can I just change the tag and send it back again to v4?
Reviewd-by -> Reported-by

Best Regards,
Kiseok Jo

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

* Re: [PATCH v3] ASoC: SMA1303: Remove the sysclk setting in devicetree
  2023-02-09  9:34         ` Ki-Seok Jo
@ 2023-02-09 11:18           ` Krzysztof Kozlowski
  0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-09 11:18 UTC (permalink / raw)
  To: Ki-Seok Jo, Krzysztof Kozlowski, Rob Herring, Mark Brown,
	Liam Girdwood
  Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org

On 09/02/2023 10:34, Ki-Seok Jo wrote:
>>
>>> On 09/02/2023 10:01, Ki-Seok Jo wrote:
>>>>
>>>>>> In SMA1303, this device does not support MCLK.
>>>>>> So it need to remove sysclk setting in devicetree.
>>>>>> v2: Modify the sysclk setting - using devm_clk_get for mclk.
>>>>>>
>>>>>> Signed-off-by: Kiseok Jo <kiseok.jo@irondevice.com>
>>>>>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>>>
>>>>> Where? Where did you get this tag?
>>>>>
>>>>> Best regards,
>>>>> Krzysztof
>>>>
>>>> I'm sorry, I don’t' know what you're talking about.
>>>> What tag are you talking about?
>>>> Sorry, could you please elaborate?
>>>
>>> From where the tag "Reviewed-by: Krzysztof..." appear?
>>>
>>> Best regards,
>>> Krzysztof
>>
>> I'm sorry I misunderstood the word. :(
>> Originally, I was going to use reported-by.
>> I shoud have reviewed it one more time, I'm really sorry.
>>
>> Thank you for telling me.
>>
>> Best regards,
>> Kiseok Jo
> 
> I'm sorry. It's my mistake..
> 
> Can I just change the tag and send it back again to v4?
> Reviewd-by -> Reported-by

There is no bug to report, so reported-by also does not fit. Just drop
the tag.

Best regards,
Krzysztof


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

* Re: [PATCH v3] ASoC: SMA1303: Remove the sysclk setting in devicetree
  2023-02-09  8:49 [PATCH v3] ASoC: SMA1303: Remove the sysclk setting in devicetree Kiseok Jo
  2023-02-09  8:54 ` Krzysztof Kozlowski
@ 2023-02-09 11:29 ` Mark Brown
  2023-02-09 16:06 ` Mark Brown
  2 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2023-02-09 11:29 UTC (permalink / raw)
  To: Kiseok Jo
  Cc: Rob Herring, Liam Girdwood, Krzysztof Kozlowski, alsa-devel,
	devicetree, Krzysztof Kozlowski

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

On Thu, Feb 09, 2023 at 08:49:03AM +0000, Kiseok Jo wrote:
> In SMA1303, this device does not support MCLK.
> So it need to remove sysclk setting in devicetree.
> v2: Modify the sysclk setting - using devm_clk_get for mclk.

Don't worry about it for now but the v2 above should go after the ---

> 
> Signed-off-by: Kiseok Jo <kiseok.jo@irondevice.com>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---

here.  This means the tools know they can remove it from the commit when
applying things to git.  Like I say no need to worry about it for this
submission - I'll fix it up locally, no need to resend.

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

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

* Re: [PATCH v3] ASoC: SMA1303: Remove the sysclk setting in devicetree
  2023-02-09  8:49 [PATCH v3] ASoC: SMA1303: Remove the sysclk setting in devicetree Kiseok Jo
  2023-02-09  8:54 ` Krzysztof Kozlowski
  2023-02-09 11:29 ` Mark Brown
@ 2023-02-09 16:06 ` Mark Brown
  2 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2023-02-09 16:06 UTC (permalink / raw)
  To: Rob Herring, Liam Girdwood, Krzysztof Kozlowski, Kiseok Jo
  Cc: alsa-devel, devicetree, Krzysztof Kozlowski

On Thu, 09 Feb 2023 08:49:03 +0000, Kiseok Jo wrote:
> In SMA1303, this device does not support MCLK.
> So it need to remove sysclk setting in devicetree.
> v2: Modify the sysclk setting - using devm_clk_get for mclk.
> 
> 

Applied to

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

Thanks!

[1/1] ASoC: SMA1303: Remove the sysclk setting in devicetree
      commit: 2512839dd648ffa2c2a752e1403aaeb928cff71a

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

end of thread, other threads:[~2023-02-09 16:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-09  8:49 [PATCH v3] ASoC: SMA1303: Remove the sysclk setting in devicetree Kiseok Jo
2023-02-09  8:54 ` Krzysztof Kozlowski
2023-02-09  9:01   ` Ki-Seok Jo
2023-02-09  9:03     ` Krzysztof Kozlowski
2023-02-09  9:20       ` Ki-Seok Jo
2023-02-09  9:34         ` Ki-Seok Jo
2023-02-09 11:18           ` Krzysztof Kozlowski
2023-02-09 11:29 ` Mark Brown
2023-02-09 16:06 ` 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).