From: Vinod Koul <vkoul@kernel.org>
To: Robert Marko <robert.marko@sartura.hr>
Cc: agross@kernel.org, bjorn.andersson@linaro.org, kishon@ti.com,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
robh+dt@kernel.org, mark.rutland@arm.com,
devicetree@vger.kernel.org, John Crispin <john@phrozen.org>,
Luka Perkov <luka.perkov@sartura.hr>
Subject: Re: [PATCH v6 1/3] phy: add driver for Qualcomm IPQ40xx USB PHY
Date: Mon, 27 Apr 2020 22:15:14 +0530 [thread overview]
Message-ID: <20200427164514.GQ56386@vkoul-mobl.Dlink> (raw)
In-Reply-To: <20200401163542.83278-1-robert.marko@sartura.hr>
Hello Robert,
On 01-04-20, 18:35, Robert Marko wrote:
> +static int ipq4019_ss_phy_power_on(struct phy *_phy)
> +{
> + struct ipq4019_usb_phy *phy = phy_get_drvdata(_phy);
> +
> + ipq4019_ss_phy_power_off(_phy);
> +
> + reset_control_deassert(phy->por_rst);
> +
> + return 0;
> +}
> +
> +static struct phy_ops ipq4019_usb_ss_phy_ops = {
> + .power_on = ipq4019_ss_phy_power_on,
> + .power_off = ipq4019_ss_phy_power_off,
> +};
> +
> +static int ipq4019_hs_phy_power_off(struct phy *_phy)
> +{
> + struct ipq4019_usb_phy *phy = phy_get_drvdata(_phy);
> +
> + reset_control_assert(phy->por_rst);
> + msleep(10);
why not call ipq4019_ss_phy_power_off() here as well?
> +
> + reset_control_assert(phy->srif_rst);
> + msleep(10);
> +
> + return 0;
> +}
> +
> +static int ipq4019_hs_phy_power_on(struct phy *_phy)
> +{
> + struct ipq4019_usb_phy *phy = phy_get_drvdata(_phy);
> +
> + ipq4019_hs_phy_power_off(_phy);
> +
> + reset_control_deassert(phy->srif_rst);
> + msleep(10);
> +
> + reset_control_deassert(phy->por_rst);
> +
> + return 0;
> +}
> +
> +static struct phy_ops ipq4019_usb_hs_phy_ops = {
> + .power_on = ipq4019_hs_phy_power_on,
> + .power_off = ipq4019_hs_phy_power_off,
> +};
So this is fiddling with resets, what about phy configuration and
calibration, who take care of that?
> +static int ipq4019_usb_phy_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct resource *res;
> + struct phy_provider *phy_provider;
> + struct ipq4019_usb_phy *phy;
> + const struct of_device_id *match;
> +
> + match = of_match_device(ipq4019_usb_phy_of_match, &pdev->dev);
> + if (!match)
> + return -ENODEV;
you are using this to get match-data few lines below, why not use
of_device_get_match_data() and get the match->data which you are
interested in?
--
~Vinod
next prev parent reply other threads:[~2020-04-27 16:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 16:35 Robert Marko
2020-04-01 16:35 ` [PATCH v6 2/3] dt-bindings: phy-qcom-ipq4019-usb: add binding document Robert Marko
2020-04-04 17:07 ` Rob Herring
2020-04-01 16:35 ` [PATCH v6 3/3] ARM: dts: qcom: ipq4019: add USB devicetree nodes Robert Marko
2020-04-22 9:16 ` [PATCH v6 1/3] phy: add driver for Qualcomm IPQ40xx USB PHY Robert Marko
2020-04-27 16:45 ` Vinod Koul [this message]
2020-04-28 12:47 ` Robert Marko
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=20200427164514.GQ56386@vkoul-mobl.Dlink \
--to=vkoul@kernel.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=john@phrozen.org \
--cc=kishon@ti.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luka.perkov@sartura.hr \
--cc=mark.rutland@arm.com \
--cc=robert.marko@sartura.hr \
--cc=robh+dt@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
all inboxes | Powered by JetHome®