* [PATCH v2] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module
@ 2025-11-26 14:01 Franz Schnyder
2025-11-26 15:58 ` Frank Li
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Franz Schnyder @ 2025-11-26 14:01 UTC (permalink / raw)
To: Vinod Koul, Kishon Vijay Abraham I, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam
Cc: Franz Schnyder, linux-phy, imx, linux-arm-kernel, linux-kernel,
Francesco Dolcini, Neil Armstrong, stable, Xu Yang
From: Franz Schnyder <franz.schnyder@toradex.com>
Currently, the PHY only registers the typec orientation switch when it
is built in. If the typec driver is built as a module, the switch
registration is skipped due to the preprocessor condition, causing
orientation detection to fail.
With commit
45fe729be9a6 ("usb: typec: Stub out typec_switch APIs when CONFIG_TYPEC=n")
the preprocessor condition is not needed anymore and the orientation
switch is correctly registered for both built-in and module builds.
Fixes: b58f0f86fd61 ("phy: fsl-imx8mq-usb: add tca function driver for imx95")
Cc: stable@vger.kernel.org
Suggested-by: Xu Yang <xu.yang_2@nxp.com>
Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
---
v2: Drop the preprocessor condition after a better suggestion.
Reviewed-by Neil tag not added as patch is different
---
drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
index b94f242420fc..72e8aff38b92 100644
--- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
+++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
@@ -124,8 +124,6 @@ struct imx8mq_usb_phy {
static void tca_blk_orientation_set(struct tca_blk *tca,
enum typec_orientation orientation);
-#ifdef CONFIG_TYPEC
-
static int tca_blk_typec_switch_set(struct typec_switch_dev *sw,
enum typec_orientation orientation)
{
@@ -173,18 +171,6 @@ static void tca_blk_put_typec_switch(struct typec_switch_dev *sw)
typec_switch_unregister(sw);
}
-#else
-
-static struct typec_switch_dev *tca_blk_get_typec_switch(struct platform_device *pdev,
- struct imx8mq_usb_phy *imx_phy)
-{
- return NULL;
-}
-
-static void tca_blk_put_typec_switch(struct typec_switch_dev *sw) {}
-
-#endif /* CONFIG_TYPEC */
-
static void tca_blk_orientation_set(struct tca_blk *tca,
enum typec_orientation orientation)
{
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module
2025-11-26 14:01 [PATCH v2] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module Franz Schnyder
@ 2025-11-26 15:58 ` Frank Li
2025-11-27 11:17 ` Xu Yang
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Frank Li @ 2025-11-26 15:58 UTC (permalink / raw)
To: Franz Schnyder
Cc: Vinod Koul, Kishon Vijay Abraham I, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Franz Schnyder, linux-phy,
imx, linux-arm-kernel, linux-kernel, Francesco Dolcini,
Neil Armstrong, stable, Xu Yang
On Wed, Nov 26, 2025 at 03:01:33PM +0100, Franz Schnyder wrote:
> From: Franz Schnyder <franz.schnyder@toradex.com>
>
> Currently, the PHY only registers the typec orientation switch when it
> is built in. If the typec driver is built as a module, the switch
> registration is skipped due to the preprocessor condition, causing
> orientation detection to fail.
>
> With commit
> 45fe729be9a6 ("usb: typec: Stub out typec_switch APIs when CONFIG_TYPEC=n")
> the preprocessor condition is not needed anymore and the orientation
> switch is correctly registered for both built-in and module builds.
>
> Fixes: b58f0f86fd61 ("phy: fsl-imx8mq-usb: add tca function driver for imx95")
> Cc: stable@vger.kernel.org
> Suggested-by: Xu Yang <xu.yang_2@nxp.com>
> Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
> ---
> v2: Drop the preprocessor condition after a better suggestion.
> Reviewed-by Neil tag not added as patch is different
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 14 --------------
> 1 file changed, 14 deletions(-)
>
> diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> index b94f242420fc..72e8aff38b92 100644
> --- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> +++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> @@ -124,8 +124,6 @@ struct imx8mq_usb_phy {
> static void tca_blk_orientation_set(struct tca_blk *tca,
> enum typec_orientation orientation);
>
> -#ifdef CONFIG_TYPEC
> -
> static int tca_blk_typec_switch_set(struct typec_switch_dev *sw,
> enum typec_orientation orientation)
> {
> @@ -173,18 +171,6 @@ static void tca_blk_put_typec_switch(struct typec_switch_dev *sw)
> typec_switch_unregister(sw);
> }
>
> -#else
> -
> -static struct typec_switch_dev *tca_blk_get_typec_switch(struct platform_device *pdev,
> - struct imx8mq_usb_phy *imx_phy)
> -{
> - return NULL;
> -}
> -
> -static void tca_blk_put_typec_switch(struct typec_switch_dev *sw) {}
> -
> -#endif /* CONFIG_TYPEC */
> -
> static void tca_blk_orientation_set(struct tca_blk *tca,
> enum typec_orientation orientation)
> {
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module
2025-11-26 14:01 [PATCH v2] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module Franz Schnyder
2025-11-26 15:58 ` Frank Li
@ 2025-11-27 11:17 ` Xu Yang
2025-12-23 8:37 ` Francesco Dolcini
2025-12-23 17:33 ` Vinod Koul
3 siblings, 0 replies; 5+ messages in thread
From: Xu Yang @ 2025-11-27 11:17 UTC (permalink / raw)
To: Franz Schnyder
Cc: Vinod Koul, Kishon Vijay Abraham I, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Franz Schnyder, linux-phy,
imx, linux-arm-kernel, linux-kernel, Francesco Dolcini,
Neil Armstrong, stable
On Wed, Nov 26, 2025 at 03:01:33PM +0100, Franz Schnyder wrote:
> From: Franz Schnyder <franz.schnyder@toradex.com>
>
> Currently, the PHY only registers the typec orientation switch when it
> is built in. If the typec driver is built as a module, the switch
> registration is skipped due to the preprocessor condition, causing
> orientation detection to fail.
>
> With commit
> 45fe729be9a6 ("usb: typec: Stub out typec_switch APIs when CONFIG_TYPEC=n")
> the preprocessor condition is not needed anymore and the orientation
> switch is correctly registered for both built-in and module builds.
>
> Fixes: b58f0f86fd61 ("phy: fsl-imx8mq-usb: add tca function driver for imx95")
> Cc: stable@vger.kernel.org
> Suggested-by: Xu Yang <xu.yang_2@nxp.com>
> Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
Reviewed-by: Xu Yang <xu.yang_2@nxp.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module
2025-11-26 14:01 [PATCH v2] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module Franz Schnyder
2025-11-26 15:58 ` Frank Li
2025-11-27 11:17 ` Xu Yang
@ 2025-12-23 8:37 ` Francesco Dolcini
2025-12-23 17:33 ` Vinod Koul
3 siblings, 0 replies; 5+ messages in thread
From: Francesco Dolcini @ 2025-12-23 8:37 UTC (permalink / raw)
To: Vinod Koul, Franz Schnyder
Cc: Kishon Vijay Abraham I, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Franz Schnyder, linux-phy,
imx, linux-arm-kernel, linux-kernel, Francesco Dolcini,
Neil Armstrong, stable, Xu Yang
Hello Vinod,
On Wed, Nov 26, 2025 at 03:01:33PM +0100, Franz Schnyder wrote:
> From: Franz Schnyder <franz.schnyder@toradex.com>
>
> Currently, the PHY only registers the typec orientation switch when it
> is built in. If the typec driver is built as a module, the switch
> registration is skipped due to the preprocessor condition, causing
> orientation detection to fail.
>
> With commit
> 45fe729be9a6 ("usb: typec: Stub out typec_switch APIs when CONFIG_TYPEC=n")
> the preprocessor condition is not needed anymore and the orientation
> switch is correctly registered for both built-in and module builds.
>
> Fixes: b58f0f86fd61 ("phy: fsl-imx8mq-usb: add tca function driver for imx95")
> Cc: stable@vger.kernel.org
> Suggested-by: Xu Yang <xu.yang_2@nxp.com>
> Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
Just a gentle ping on this.
Thanks,
Francesco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module
2025-11-26 14:01 [PATCH v2] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module Franz Schnyder
` (2 preceding siblings ...)
2025-12-23 8:37 ` Francesco Dolcini
@ 2025-12-23 17:33 ` Vinod Koul
3 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2025-12-23 17:33 UTC (permalink / raw)
To: Kishon Vijay Abraham I, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, Franz Schnyder
Cc: Franz Schnyder, linux-phy, imx, linux-arm-kernel, linux-kernel,
Francesco Dolcini, Neil Armstrong, stable, Xu Yang
On Wed, 26 Nov 2025 15:01:33 +0100, Franz Schnyder wrote:
> Currently, the PHY only registers the typec orientation switch when it
> is built in. If the typec driver is built as a module, the switch
> registration is skipped due to the preprocessor condition, causing
> orientation detection to fail.
>
> With commit
> 45fe729be9a6 ("usb: typec: Stub out typec_switch APIs when CONFIG_TYPEC=n")
> the preprocessor condition is not needed anymore and the orientation
> switch is correctly registered for both built-in and module builds.
>
> [...]
Applied, thanks!
[1/1] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module
commit: 49ccab4bedd4779899246107dc19fb01c5b6fea3
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-12-23 17:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-26 14:01 [PATCH v2] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module Franz Schnyder
2025-11-26 15:58 ` Frank Li
2025-11-27 11:17 ` Xu Yang
2025-12-23 8:37 ` Francesco Dolcini
2025-12-23 17:33 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox