From: Krzysztof Kozlowski <krzk@kernel.org>
To: Ze Huang <huangze@whut.edu.cn>, Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Yixun Lan <dlan@gentoo.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
linux-riscv@lists.infradead.org, spacemit@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH 5/7] phy: spacemit: add USB3 support for K1 PCIe/USB3 combo PHY
Date: Wed, 9 Apr 2025 12:10:16 +0200 [thread overview]
Message-ID: <21698603-2780-4f23-8a77-7be98fdd3ab3@kernel.org> (raw)
In-Reply-To: <a71f45fc-d266-447d-8fb0-1ff0897f5bff@whut.edu.cn>
On 09/04/2025 11:43, Ze Huang wrote:
>>> + priv->phy = devm_phy_create(dev, NULL, &spacemit_combphy_ops);
>>> + if (IS_ERR(priv->phy))
>>> + return dev_err_probe(dev, PTR_ERR(priv->phy),
>>> + "failed to create combphy\n");
>>> +
>>> + dev_set_drvdata(dev, priv);
>>> + phy_set_drvdata(priv->phy, priv);
>> Both make no sense. Look what this function does.
>
> It does seem redundant at first glance, but pdev->dev is the parent of
> phy->dev.
> pdev->dev->driver_data will be used in spacemit_combphy_xlate()
> phy->dev->driver_data will be used in phy_ops functions
>
> I've checked some other drivers that did the same:
> - phy-zynqmp.c at lines 990 and 1026
> - phy-rockchip-samsung-hdptx.c at lines 1989 and 2000
Indeed, right. It's fine.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-04-09 10:10 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 12:38 [PATCH 0/7] Add USB3.0 PHY and host controller support for SpacemiT K1 SoC Ze Huang
2025-04-07 12:38 ` [PATCH 1/7] dt-bindings: phy: spacemit: add K1 USB2 PHY Ze Huang
2025-04-07 13:18 ` Krzysztof Kozlowski
2025-04-09 8:01 ` Ze Huang
2025-04-10 20:53 ` Rob Herring (Arm)
2025-04-07 12:38 ` [PATCH 2/7] dt-bindings: phy: spacemit: add K1 PCIe/USB3 combo PHY Ze Huang
2025-04-07 13:20 ` Krzysztof Kozlowski
2025-04-09 8:05 ` Ze Huang
2025-04-07 12:38 ` [PATCH 3/7] dt-bindings: usb: add SpacemiT K1 DWC3 glue Ze Huang
2025-04-07 13:22 ` Krzysztof Kozlowski
2025-04-09 8:16 ` Ze Huang
2025-04-09 10:08 ` Krzysztof Kozlowski
2025-04-07 13:51 ` Rob Herring (Arm)
2025-04-09 8:30 ` Ze Huang
2025-04-07 12:38 ` [PATCH 4/7] phy: spacemit: support K1 USB2.0 PHY controller Ze Huang
2025-04-07 13:25 ` Krzysztof Kozlowski
2025-04-09 8:18 ` Ze Huang
2025-04-07 12:38 ` [PATCH 5/7] phy: spacemit: add USB3 support for K1 PCIe/USB3 combo PHY Ze Huang
2025-04-07 13:28 ` Krzysztof Kozlowski
2025-04-09 9:43 ` Ze Huang
2025-04-09 10:10 ` Krzysztof Kozlowski [this message]
2025-04-09 11:38 ` Pan Junzhong
2025-04-09 11:42 ` Ze Huang
2025-04-07 12:38 ` [PATCH 6/7] usb: dwc3: add spacemit dwc3 glue layer driver Ze Huang
2025-04-09 22:34 ` Thinh Nguyen
2025-04-10 1:34 ` Ze Huang
2025-04-07 12:38 ` [PATCH 7/7] riscv: dts: spacemit: add usb3.0 support for K1 Ze Huang
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=21698603-2780-4f23-8a77-7be98fdd3ab3@kernel.org \
--to=krzk@kernel.org \
--cc=Thinh.Nguyen@synopsys.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@gentoo.org \
--cc=gregkh@linuxfoundation.org \
--cc=huangze@whut.edu.cn \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=spacemit@lists.linux.dev \
--cc=vkoul@kernel.org \
/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