devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Wang <frawang.cn@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de,
	linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org,
	william.wu@rock-chips.com, tim.chen@rock-chips.com,
	frank.wang@rock-chips.com
Subject: Re: [PATCH v4 1/3] phy: rockchip: inno-usb2: convert clock management to bulk
Date: Wed, 9 Oct 2024 15:10:28 +0800	[thread overview]
Message-ID: <e1bbcaa7-bac6-4288-9c5c-ae5a292e1d1f@gmail.com> (raw)
In-Reply-To: <ac325385-cb3e-4002-b100-de73eb5a9ac7@kernel.org>

Hi Krzysztof,

On 2024/10/8 22:35, Krzysztof Kozlowski wrote:
> On 08/10/2024 05:07, Frank Wang wrote:
>>>> +	}
>>>> +
>>>> +	if (!IS_ERR(refclk)) {
>>>> +		clk_name = __clk_get_name(refclk);
>>>>    		init.parent_names = &clk_name;
>>>>    		init.num_parents = 1;
>>>>    	} else {
>>>> @@ -1406,18 +1424,29 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev)
>>>>    	if (IS_ERR(rphy->phy_reset))
>>>>    		return PTR_ERR(rphy->phy_reset);
>>>>    
>>>> -	rphy->clk = devm_clk_get_optional_enabled(dev, "phyclk");
>>>> -	if (IS_ERR(rphy->clk)) {
>>>> -		return dev_err_probe(&pdev->dev, PTR_ERR(rphy->clk),
>>>> +	ret = devm_clk_bulk_get_all(dev, &rphy->clks);
>>>> +	if (ret == -EPROBE_DEFER) {
>>> This does not make much sense. Why would you proceed on other critical
>>> errors?
>>>
>>> You want to use optional variant, I guess?
>> Yes, the clock properties are optional.
> And? So are you going to use optional variant of clk get or not? Is it
> appropriate? Are you going to improve it?

Using devm_clk_bulk_get_all() not only get clk_bulk_data, but also can 
get num_clks.
The clocks numbers (num_clks) are used for search the ref_clk in 
rockchip_usb2phy_clk480m_register().

However, right now, the optional variant of clk_*_optional functions can 
not get num_clks, or must know num_clks, then can get clk_bulk_data.


Best regards,
Frank

> Best regards,
> Krzysztof
>


      parent reply	other threads:[~2024-10-09  7:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-29  6:10 [PATCH v4 1/3] phy: rockchip: inno-usb2: convert clock management to bulk Frank Wang
2024-09-29  6:10 ` [PATCH v4 2/3] dt-bindings: phy: rockchip,inno-usb2phy: add rk3576 Frank Wang
2024-09-29 19:36   ` Krzysztof Kozlowski
2024-10-08  3:04     ` Frank Wang
2024-10-08 14:36       ` Krzysztof Kozlowski
2024-09-29  6:10 ` [PATCH v4 3/3] phy: rockchip: inno-usb2: Add usb2 phys support for rk3576 Frank Wang
2024-09-29 19:38 ` [PATCH v4 1/3] phy: rockchip: inno-usb2: convert clock management to bulk Krzysztof Kozlowski
2024-10-08  3:07   ` Frank Wang
2024-10-08 14:35     ` Krzysztof Kozlowski
2024-10-09  7:05       ` Frank Wang
2024-10-09  7:10       ` Frank Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1bbcaa7-bac6-4288-9c5c-ae5a292e1d1f@gmail.com \
    --to=frawang.cn@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frank.wang@rock-chips.com \
    --cc=heiko@sntech.de \
    --cc=kishon@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh@kernel.org \
    --cc=tim.chen@rock-chips.com \
    --cc=vkoul@kernel.org \
    --cc=william.wu@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).