lkml.org 
[lkml]   [2023]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v3 RESEND 1/4] phy: core: add notify_connect and notify_disconnect callback
Date
Hi Sergei,

>
>
> On 12/7/23 10:38 AM, Stanley Chang wrote:
>
> > In Realtek SoC, the parameter of usb phy is designed to can dynamic
> > tuning base on port status. Therefore, add a notify callback of phy
>
> To be able to do dynamic tuning based in the port status, maybe?

Okay, I will revise.

> > driver when usb connection/disconnection change.


> > Signed-off-by: Stanley Chang <stanley_chang@realtek.com>
> [...]
> > diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index
> > 96a0b1e111f3..a84ad4896b7f 100644
> > --- a/drivers/phy/phy-core.c
> > +++ b/drivers/phy/phy-core.c
> > @@ -489,6 +489,53 @@ int phy_calibrate(struct phy *phy) }
> > EXPORT_SYMBOL_GPL(phy_calibrate);
> >
> > +/**
> > + * phy_notify_connect() - phy connect notify
>
> Notification?

Okay, I will revise.

> > + * @phy: the phy returned by phy_get()
> > + * @port: the port index for connect
> > + *
> > + * If phy need the get connection status, the callback can be used.
>
> If the PHY needs to get the connection status, maybe?
>
> > + * Returns: %0 if successful, a negative error code otherwise */ int
> > +phy_notify_connect(struct phy *phy, int port) {
> > + int ret;
> > +
> > + if (!phy || !phy->ops->connect)
> > + return 0;
> > +
> > + mutex_lock(&phy->mutex);
> > + ret = phy->ops->connect(phy, port);
> > + mutex_unlock(&phy->mutex);
> > +
> > + return ret;
> > +}
> > +EXPORT_SYMBOL_GPL(phy_notify_connect);
> > +
> > +/**
> > + * phy_notify_disconnect() - phy disconnect notify
>
> Notification?

Okay, I will revise.

> > + * @phy: the phy returned by phy_get()
> > + * @port: the port index for disconnect
> > + *
> > + * If phy need the get disconnection status, the callback can be used.
>
> If the PHY needs to get the connection status, maybe?

Okay, I will revise.

Thanks,
Stanley
\
 
 \ /
  Last update: 2023-12-07 10:38    [W:0.174 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site