From: Peter Chen <peter.chen@kernel.org>
To: Xu Yang <xu.yang_2@nxp.com>
Cc: gregkh@linuxfoundation.org, shawnguo@kernel.org,
s.hauer@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
luca.ceresoli@bootlin.com, jun.li@nxp.com,
linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 3/3] usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host()
Date: Fri, 22 Dec 2023 17:28:42 +0800 [thread overview]
Message-ID: <20231222092842.GD1951375@nchen-desktop> (raw)
In-Reply-To: <20231218061420.3460145-3-xu.yang_2@nxp.com>
On 23-12-18 14:14:20, Xu Yang wrote:
> When CONFIG_USB_OTG is not set, mxs_phy_is_otg_host() will always return
> false. This behaviour is wrong. Since phy.last_event will always be set
> for either host or device mode. Therefore, CONFIG_USB_OTG condition
> can be removed.
>
> Fixes: 5eda42aebb76 ("usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host()")
> cc: <stable@vger.kernel.org>
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
>
> ---
> Changes in v2:
> - add fix tag and stable maillist
> ---
> drivers/usb/phy/phy-mxs-usb.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
> index acd46b72899e..920a32cd094d 100644
> --- a/drivers/usb/phy/phy-mxs-usb.c
> +++ b/drivers/usb/phy/phy-mxs-usb.c
> @@ -388,8 +388,7 @@ static void __mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool disconnect)
>
> static bool mxs_phy_is_otg_host(struct mxs_phy *mxs_phy)
> {
> - return IS_ENABLED(CONFIG_USB_OTG) &&
> - mxs_phy->phy.last_event == USB_EVENT_ID;
> + return mxs_phy->phy.last_event == USB_EVENT_ID;
> }
>
> static void mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool on)
> --
> 2.34.1
>
--
Thanks,
Peter Chen
WARNING: multiple messages have this Message-ID (diff)
From: Peter Chen <peter.chen@kernel.org>
To: Xu Yang <xu.yang_2@nxp.com>
Cc: gregkh@linuxfoundation.org, shawnguo@kernel.org,
s.hauer@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
luca.ceresoli@bootlin.com, jun.li@nxp.com,
linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 3/3] usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host()
Date: Fri, 22 Dec 2023 17:28:42 +0800 [thread overview]
Message-ID: <20231222092842.GD1951375@nchen-desktop> (raw)
In-Reply-To: <20231218061420.3460145-3-xu.yang_2@nxp.com>
On 23-12-18 14:14:20, Xu Yang wrote:
> When CONFIG_USB_OTG is not set, mxs_phy_is_otg_host() will always return
> false. This behaviour is wrong. Since phy.last_event will always be set
> for either host or device mode. Therefore, CONFIG_USB_OTG condition
> can be removed.
>
> Fixes: 5eda42aebb76 ("usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host()")
> cc: <stable@vger.kernel.org>
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
>
> ---
> Changes in v2:
> - add fix tag and stable maillist
> ---
> drivers/usb/phy/phy-mxs-usb.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
> index acd46b72899e..920a32cd094d 100644
> --- a/drivers/usb/phy/phy-mxs-usb.c
> +++ b/drivers/usb/phy/phy-mxs-usb.c
> @@ -388,8 +388,7 @@ static void __mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool disconnect)
>
> static bool mxs_phy_is_otg_host(struct mxs_phy *mxs_phy)
> {
> - return IS_ENABLED(CONFIG_USB_OTG) &&
> - mxs_phy->phy.last_event == USB_EVENT_ID;
> + return mxs_phy->phy.last_event == USB_EVENT_ID;
> }
>
> static void mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool on)
> --
> 2.34.1
>
--
Thanks,
Peter Chen
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-12-22 9:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 6:14 [PATCH v2 1/3] usb: chipidea: ci_hdrc_imx: add wakeup clock and keep it always on Xu Yang
2023-12-18 6:14 ` Xu Yang
2023-12-18 6:14 ` [PATCH v2 2/3] usb: chipidea: wait controller resume finished for wakeup irq Xu Yang
2023-12-18 6:14 ` Xu Yang
2023-12-22 3:41 ` Peter Chen
2023-12-22 3:41 ` Peter Chen
2023-12-18 6:14 ` [PATCH v2 3/3] usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host() Xu Yang
2023-12-18 6:14 ` Xu Yang
2023-12-22 9:28 ` Peter Chen [this message]
2023-12-22 9:28 ` Peter Chen
2023-12-22 3:40 ` [PATCH v2 1/3] usb: chipidea: ci_hdrc_imx: add wakeup clock and keep it always on Peter Chen
2023-12-22 3:40 ` Peter Chen
2023-12-22 8:24 ` [EXT] " Xu Yang
2023-12-22 8:24 ` Xu Yang
2023-12-22 9:25 ` Peter Chen
2023-12-22 9:25 ` Peter Chen
2023-12-22 12:26 ` Stefan Wahren
2023-12-22 12:26 ` Stefan Wahren
2023-12-25 2:20 ` [EXT] " Xu Yang
2023-12-25 2:20 ` Xu Yang
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=20231222092842.GD1951375@nchen-desktop \
--to=peter.chen@kernel.org \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jun.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-usb@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=xu.yang_2@nxp.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.