* Re: [PATCH v3 2/4] phy: realtek: usb: add new driver for the Realtek RTD SoC USB 2.0 PHY
[not found] ` <20231110054738.23515-2-stanley_chang@realtek.com>
@ 2023-11-10 7:47 ` Johan Hovold
0 siblings, 0 replies; 3+ messages in thread
From: Johan Hovold @ 2023-11-10 7:47 UTC (permalink / raw)
To: Stanley Chang
Cc: Greg Kroah-Hartman, Vinod Koul, Kishon Vijay Abraham I,
Geert Uytterhoeven, Rob Herring, Jinjie Ruan, Alan Stern,
Yang Yingliang, Roy Luo, Ricardo Cañuelo, Heikki Krogerus,
Flavio Suligoi, linux-kernel, linux-phy, linux-usb
On Fri, Nov 10, 2023 at 01:45:13PM +0800, Stanley Chang wrote:
> Realtek DHC (digital home center) RTD SoCs support DWC3 XHCI USB
> controller. Added the driver to drive the USB 2.0 PHY transceivers.
>
> Note: New driver,remove the port status notification on legacy USB PHY.
> Use the generic PHY to notify the usb device connect and disconnect.
> To avoid using these PHYs would require describing the very same
> PHY using both the generic "phy" property and the deprecated "usb-phy"
> property.
>
> Signed-off-by: Stanley Chang <stanley_chang@realtek.com>
> ---
> v1 to v2 change:
> rebase the driver to include the revert part on
> 7a784bcdd7e54f0599da3b2360e472238412623e
> v2 to v3 change:
> remove MODULE_ALIAS
Don't send out a new version of a patch series immediately just to fix
something small like this.
In this case I'd suggest you wait at least until you've gotten feedback
on the new notification implementation.
Johan
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3 1/4] phy: core: add notify_connect and notify_disconnect callback
[not found] <20231110054738.23515-1-stanley_chang@realtek.com>
[not found] ` <20231110054738.23515-2-stanley_chang@realtek.com>
@ 2023-11-21 5:47 ` Kishon Vijay Abraham I
[not found] ` <20231110054738.23515-4-stanley_chang@realtek.com>
2 siblings, 0 replies; 3+ messages in thread
From: Kishon Vijay Abraham I @ 2023-11-21 5:47 UTC (permalink / raw)
To: Stanley Chang, Greg Kroah-Hartman
Cc: Vinod Koul, Johan Hovold, Kishon Vijay Abraham I,
Geert Uytterhoeven, Jinjie Ruan, Rob Herring, Alan Stern,
Yang Yingliang, Flavio Suligoi, Roy Luo, Heikki Krogerus,
Ricardo Cañuelo, linux-kernel, linux-phy, linux-usb
Hi Stanley,
On 11/10/2023 11:15 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
> driver when usb connection/disconnection change.
>
> Signed-off-by: Stanley Chang <stanley_chang@realtek.com>
> ---
> v1 to v2:
> No change
> v2 to v3:
> No change
> ---
> drivers/phy/phy-core.c | 47 +++++++++++++++++++++++++++++++++++++++++
> include/linux/phy/phy.h | 18 ++++++++++++++++
> 2 files changed, 65 insertions(+)
>
> 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
> + * @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.
> + * 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
> + * @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.
> + *
> + * Returns: %0 if successful, a negative error code otherwise
> + */
> +int phy_notify_disconnect(struct phy *phy, int port)
> +{
> + int ret;
> +
> + if (!phy || !phy->ops->disconnect)
> + return 0;
> +
> + mutex_lock(&phy->mutex);
> + ret = phy->ops->disconnect(phy, port);
> + mutex_unlock(&phy->mutex);
> +
> + return ret;
> +}
> +EXPORT_SYMBOL_GPL(phy_notify_disconnect);
Please use EXTCON framework for notifying connect/disconnect.
Thanks,
Kishon
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3 4/4] usb: core: add phy notify connect and disconnect
[not found] ` <4736a6933f3546c48f24a635c15a5e20@realtek.com>
@ 2023-12-07 7:10 ` Greg Kroah-Hartman
0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2023-12-07 7:10 UTC (permalink / raw)
To: Stanley Chang[昌育德]
Cc: Vinod Koul, Johan Hovold, Kishon Vijay Abraham I,
Geert Uytterhoeven, Rob Herring, Jinjie Ruan, Alan Stern,
Yang Yingliang, Ricardo Cañuelo, Roy Luo, Heikki Krogerus,
linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
linux-usb@vger.kernel.org
On Thu, Dec 07, 2023 at 04:50:10AM +0000, Stanley Chang[昌育德] wrote:
> Hi Greg,
>
> Please help review this patch.
This series is gone from my tree as others reviewed it and asked for
changes. If you think those changes are not needed, feel free to resend
it with an explanation of why that is so.
thanks,
greg k-h
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-07 7:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20231110054738.23515-1-stanley_chang@realtek.com>
[not found] ` <20231110054738.23515-2-stanley_chang@realtek.com>
2023-11-10 7:47 ` [PATCH v3 2/4] phy: realtek: usb: add new driver for the Realtek RTD SoC USB 2.0 PHY Johan Hovold
2023-11-21 5:47 ` [PATCH v3 1/4] phy: core: add notify_connect and notify_disconnect callback Kishon Vijay Abraham I
[not found] ` <20231110054738.23515-4-stanley_chang@realtek.com>
[not found] ` <4736a6933f3546c48f24a635c15a5e20@realtek.com>
2023-12-07 7:10 ` [PATCH v3 4/4] usb: core: add phy notify connect and disconnect Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).