All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko@sntech.de>
To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org,
	Frank Wang <frawang.cn@gmail.com>
Cc: 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,
	wmc@rock-chips.com, Frank Wang <frank.wang@rock-chips.com>
Subject: Re: [PATCH v2 2/2] phy: rockchip: inno-usb2: Add usb2 phys support for rk3576
Date: Tue, 24 Sep 2024 12:01:23 +0200	[thread overview]
Message-ID: <15288441.JCcGWNJJiE@phil> (raw)
In-Reply-To: <20240924085510.20863-2-frawang.cn@gmail.com>

Am Dienstag, 24. September 2024, 10:55:10 CEST schrieb Frank Wang:
> From: William Wu <william.wu@rock-chips.com>
> 
> The RK3576 SoC has two independent USB2.0 PHYs, and
> each PHY has one port.

Can you please split the content into "converting to clk_bulk" (see
additional comment below) and "add rk3576" please?

That would make the patch a lot cleaner.


> @@ -376,6 +378,7 @@ rockchip_usb2phy_clk480m_register(struct rockchip_usb2phy *rphy)
>  {
>  	struct device_node *node = rphy->dev->of_node;
>  	struct clk_init_data init;
> +	struct clk *refclk = of_clk_get_by_name(node, "phyclk");

Doesn't this create an imbalance - with the missing put?
I think ideally just define clk_bulk_data structs for the
1-clock and 3-clock variant, attach that to the device-data
and then use the regular devm_clk_bulk_get ?

That way you can then retrieve the clock from that struct?


Thanks
Heiko



-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

WARNING: multiple messages have this Message-ID (diff)
From: Heiko Stuebner <heiko@sntech.de>
To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org,
	Frank Wang <frawang.cn@gmail.com>
Cc: 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,
	wmc@rock-chips.com, Frank Wang <frank.wang@rock-chips.com>
Subject: Re: [PATCH v2 2/2] phy: rockchip: inno-usb2: Add usb2 phys support for rk3576
Date: Tue, 24 Sep 2024 12:01:23 +0200	[thread overview]
Message-ID: <15288441.JCcGWNJJiE@phil> (raw)
In-Reply-To: <20240924085510.20863-2-frawang.cn@gmail.com>

Am Dienstag, 24. September 2024, 10:55:10 CEST schrieb Frank Wang:
> From: William Wu <william.wu@rock-chips.com>
> 
> The RK3576 SoC has two independent USB2.0 PHYs, and
> each PHY has one port.

Can you please split the content into "converting to clk_bulk" (see
additional comment below) and "add rk3576" please?

That would make the patch a lot cleaner.


> @@ -376,6 +378,7 @@ rockchip_usb2phy_clk480m_register(struct rockchip_usb2phy *rphy)
>  {
>  	struct device_node *node = rphy->dev->of_node;
>  	struct clk_init_data init;
> +	struct clk *refclk = of_clk_get_by_name(node, "phyclk");

Doesn't this create an imbalance - with the missing put?
I think ideally just define clk_bulk_data structs for the
1-clock and 3-clock variant, attach that to the device-data
and then use the regular devm_clk_bulk_get ?

That way you can then retrieve the clock from that struct?


Thanks
Heiko



_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: Heiko Stuebner <heiko@sntech.de>
To: vkoul@kernel.org, kishon@kernel.org, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org,
	Frank Wang <frawang.cn@gmail.com>
Cc: 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,
	wmc@rock-chips.com, Frank Wang <frank.wang@rock-chips.com>
Subject: Re: [PATCH v2 2/2] phy: rockchip: inno-usb2: Add usb2 phys support for rk3576
Date: Tue, 24 Sep 2024 12:01:23 +0200	[thread overview]
Message-ID: <15288441.JCcGWNJJiE@phil> (raw)
In-Reply-To: <20240924085510.20863-2-frawang.cn@gmail.com>

Am Dienstag, 24. September 2024, 10:55:10 CEST schrieb Frank Wang:
> From: William Wu <william.wu@rock-chips.com>
> 
> The RK3576 SoC has two independent USB2.0 PHYs, and
> each PHY has one port.

Can you please split the content into "converting to clk_bulk" (see
additional comment below) and "add rk3576" please?

That would make the patch a lot cleaner.


> @@ -376,6 +378,7 @@ rockchip_usb2phy_clk480m_register(struct rockchip_usb2phy *rphy)
>  {
>  	struct device_node *node = rphy->dev->of_node;
>  	struct clk_init_data init;
> +	struct clk *refclk = of_clk_get_by_name(node, "phyclk");

Doesn't this create an imbalance - with the missing put?
I think ideally just define clk_bulk_data structs for the
1-clock and 3-clock variant, attach that to the device-data
and then use the regular devm_clk_bulk_get ?

That way you can then retrieve the clock from that struct?


Thanks
Heiko




  reply	other threads:[~2024-09-24 10:06 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-24  8:55 [PATCH v2 1/2] dt-bindings: phy: rockchip,inno-usb2phy: add rk3576 Frank Wang
2024-09-24  8:55 ` Frank Wang
2024-09-24  8:55 ` Frank Wang
2024-09-24  8:55 ` [PATCH v2 2/2] phy: rockchip: inno-usb2: Add usb2 phys support for rk3576 Frank Wang
2024-09-24  8:55   ` Frank Wang
2024-09-24  8:55   ` Frank Wang
2024-09-24 10:01   ` Heiko Stuebner [this message]
2024-09-24 10:01     ` Heiko Stuebner
2024-09-24 10:01     ` Heiko Stuebner
2024-09-25  1:42     ` frawang
2024-09-25  1:42       ` frawang
2024-09-25  1:42       ` frawang
2024-09-25  6:59       ` Heiko Stuebner
2024-09-25  6:59         ` Heiko Stuebner
2024-09-25  6:59         ` Heiko Stuebner
2024-09-24 10:01 ` [PATCH v2 1/2] dt-bindings: phy: rockchip,inno-usb2phy: add rk3576 Heiko Stuebner
2024-09-24 10:01   ` Heiko Stuebner
2024-09-24 10:01   ` Heiko Stuebner
2024-09-25  1:49   ` Frank Wang
2024-09-25  1:49     ` Frank Wang
2024-09-25  1:49     ` Frank Wang
2024-09-24 16:11 ` Conor Dooley
2024-09-24 16:11   ` Conor Dooley
2024-09-24 16:11   ` Conor Dooley
2024-09-25  2:09   ` Frank Wang
2024-09-25  2:09     ` Frank Wang
2024-09-25  2:09     ` Frank Wang
2024-09-25  7:16     ` Krzysztof Kozlowski
2024-09-25  7:16       ` Krzysztof Kozlowski
2024-09-25  7:16       ` Krzysztof Kozlowski
2024-09-25  9:33       ` Frank Wang
2024-09-25  9:33         ` Frank Wang
2024-09-25  9:33         ` Frank Wang

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=15288441.JCcGWNJJiE@phil \
    --to=heiko@sntech.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frank.wang@rock-chips.com \
    --cc=frawang.cn@gmail.com \
    --cc=kishon@kernel.org \
    --cc=krzk+dt@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 \
    --cc=wmc@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 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.