From: Xu Yang <xu.yang_2@nxp.com> To: peter.chen@kernel.org 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: [PATCH v3 3/3] usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host() Date: Thu, 28 Dec 2023 19:07:53 +0800 [thread overview] Message-ID: <20231228110753.1755756-3-xu.yang_2@nxp.com> (raw) In-Reply-To: <20231228110753.1755756-1-xu.yang_2@nxp.com> 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> Acked-by: Peter Chen <peter.chen@kernel.org> Signed-off-by: Xu Yang <xu.yang_2@nxp.com> --- Changes in v2: - add fix tag and stable maillist Changes in v3: - no changes --- 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
WARNING: multiple messages have this Message-ID (diff)
From: Xu Yang <xu.yang_2@nxp.com> To: peter.chen@kernel.org 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: [PATCH v3 3/3] usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host() Date: Thu, 28 Dec 2023 19:07:53 +0800 [thread overview] Message-ID: <20231228110753.1755756-3-xu.yang_2@nxp.com> (raw) In-Reply-To: <20231228110753.1755756-1-xu.yang_2@nxp.com> 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> Acked-by: Peter Chen <peter.chen@kernel.org> Signed-off-by: Xu Yang <xu.yang_2@nxp.com> --- Changes in v2: - add fix tag and stable maillist Changes in v3: - no changes --- 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 _______________________________________________ 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-28 11:02 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-12-28 11:07 [PATCH v3 1/3] usb: chipidea: ci_hdrc_imx: add wakeup clock and keep it always on Xu Yang 2023-12-28 11:07 ` Xu Yang 2023-12-28 11:07 ` [PATCH v3 2/3] usb: chipidea: wait controller resume finished for wakeup irq Xu Yang 2023-12-28 11:07 ` Xu Yang 2023-12-28 11:07 ` Xu Yang [this message] 2023-12-28 11:07 ` [PATCH v3 3/3] usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host() Xu Yang 2023-12-28 13:29 ` [PATCH v3 1/3] usb: chipidea: ci_hdrc_imx: add wakeup clock and keep it always on Stefan Wahren 2023-12-28 13:29 ` Stefan Wahren
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=20231228110753.1755756-3-xu.yang_2@nxp.com \ --to=xu.yang_2@nxp.com \ --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=peter.chen@kernel.org \ --cc=s.hauer@pengutronix.de \ --cc=shawnguo@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: linkBe 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.