lkml.org 
[lkml]   [2021]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFCv1 6/8] phy: amlogic: meson8b-usb2: Use phy reset callback function
Hi Anand,

On Thu, Jun 17, 2021 at 9:44 PM Anand Moon <linux.amoon@gmail.com> wrote:
[...]
> +static int phy_meson8b_usb2_reset(struct phy *phy)
> +{
> + struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy);
> + int ret;
> +
> + if (priv->is_enabled) {
> + ret = reset_control_reset(priv->reset);
> + if (ret) {
> + dev_err(&phy->dev, "Failed to trigger USB reset\n");
> + return ret;
> + }
> + }
> +
> + return 0;
> +}
will this reset change the register values back to some kind of default?
If it does then we're not re-applying our desired register values
afterwards - which is probably asking for trouble.

For shared resets (like the one we have here) reset_control_reset will
only trigger the reset line once until all drivers using that reset
line are unloaded.
So effectively this new phy_ops.reset callback will be a no-op.

[...]
> - priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, NULL);
> + priv->reset = devm_reset_control_get_optional_shared(&pdev->dev, "phy");
I think this breaks compatibility with existing .dtbs and our
dt-bindings (as we're not documenting a "reset-names" property).
What is the goal of this one?


Best regards,
Martin

\
 
 \ /
  Last update: 2021-06-18 00:25    [W:0.196 / U:1.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site