* [PATCH v1] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module
@ 2025-11-24 9:50 Franz Schnyder
2025-11-24 10:35 ` Neil Armstrong
2025-11-25 7:04 ` Xu Yang
0 siblings, 2 replies; 5+ messages in thread
From: Franz Schnyder @ 2025-11-24 9:50 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, stable
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.
This patch replaces the preprocessor condition so that 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
Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
---
drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
index b94f242420fc..d498a6b7234b 100644
--- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
+++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
@@ -124,7 +124,7 @@ struct imx8mq_usb_phy {
static void tca_blk_orientation_set(struct tca_blk *tca,
enum typec_orientation orientation);
-#ifdef CONFIG_TYPEC
+#if IS_ENABLED(CONFIG_TYPEC)
static int tca_blk_typec_switch_set(struct typec_switch_dev *sw,
enum typec_orientation orientation)
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module
2025-11-24 9:50 [PATCH v1] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module Franz Schnyder
@ 2025-11-24 10:35 ` Neil Armstrong
2025-11-25 7:04 ` Xu Yang
1 sibling, 0 replies; 5+ messages in thread
From: Neil Armstrong @ 2025-11-24 10:35 UTC (permalink / raw)
To: Franz Schnyder, 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, stable
On 11/24/25 10:50, 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.
>
> This patch replaces the preprocessor condition so that 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
> Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
> ---
> drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> index b94f242420fc..d498a6b7234b 100644
> --- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> +++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> @@ -124,7 +124,7 @@ struct imx8mq_usb_phy {
> static void tca_blk_orientation_set(struct tca_blk *tca,
> enum typec_orientation orientation);
>
> -#ifdef CONFIG_TYPEC
> +#if IS_ENABLED(CONFIG_TYPEC)
>
> static int tca_blk_typec_switch_set(struct typec_switch_dev *sw,
> enum typec_orientation orientation)
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module
2025-11-24 9:50 [PATCH v1] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module Franz Schnyder
2025-11-24 10:35 ` Neil Armstrong
@ 2025-11-25 7:04 ` Xu Yang
2025-11-25 7:20 ` Francesco Dolcini
1 sibling, 1 reply; 5+ messages in thread
From: Xu Yang @ 2025-11-25 7:04 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, stable
Hi Franz,
On Mon, Nov 24, 2025 at 10:50:04AM +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.
>
> This patch replaces the preprocessor condition so that 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
> Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
> ---
> drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> index b94f242420fc..d498a6b7234b 100644
> --- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> +++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> @@ -124,7 +124,7 @@ struct imx8mq_usb_phy {
> static void tca_blk_orientation_set(struct tca_blk *tca,
> enum typec_orientation orientation);
>
> -#ifdef CONFIG_TYPEC
> +#if IS_ENABLED(CONFIG_TYPEC)
With below commit:
45fe729be9a6 usb: typec: Stub out typec_switch APIs when CONFIG_TYPEC=n
I think this #if/else/endif condition can be removed.
Thanks,
Xu Yang
>
> static int tca_blk_typec_switch_set(struct typec_switch_dev *sw,
> enum typec_orientation orientation)
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module
2025-11-25 7:04 ` Xu Yang
@ 2025-11-25 7:20 ` Francesco Dolcini
2025-11-25 7:51 ` Xu Yang
0 siblings, 1 reply; 5+ messages in thread
From: Francesco Dolcini @ 2025-11-25 7:20 UTC (permalink / raw)
To: Xu Yang
Cc: Franz Schnyder, 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, stable
On Tue, Nov 25, 2025 at 03:04:43PM +0800, Xu Yang wrote:
> On Mon, Nov 24, 2025 at 10:50:04AM +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.
> >
> > This patch replaces the preprocessor condition so that 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
> > Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
> > ---
> > drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> > index b94f242420fc..d498a6b7234b 100644
> > --- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> > +++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> > @@ -124,7 +124,7 @@ struct imx8mq_usb_phy {
> > static void tca_blk_orientation_set(struct tca_blk *tca,
> > enum typec_orientation orientation);
> >
> > -#ifdef CONFIG_TYPEC
> > +#if IS_ENABLED(CONFIG_TYPEC)
>
> With below commit:
>
> 45fe729be9a6 usb: typec: Stub out typec_switch APIs when CONFIG_TYPEC=n
>
> I think this #if/else/endif condition can be removed.
This patch should go to stable, and that commit is not present in any
such previous kernel.
Should we have 2 patches or "force" 45fe729be9a6 to be also backported?
What's the general advise in these situations?
Francesco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module
2025-11-25 7:20 ` Francesco Dolcini
@ 2025-11-25 7:51 ` Xu Yang
0 siblings, 0 replies; 5+ messages in thread
From: Xu Yang @ 2025-11-25 7:51 UTC (permalink / raw)
To: Francesco Dolcini
Cc: Franz Schnyder, 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, stable
Hi Francesco,
On Tue, Nov 25, 2025 at 08:20:11AM +0100, Francesco Dolcini wrote:
> On Tue, Nov 25, 2025 at 03:04:43PM +0800, Xu Yang wrote:
> > On Mon, Nov 24, 2025 at 10:50:04AM +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.
> > >
> > > This patch replaces the preprocessor condition so that 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
> > > Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
> > > ---
> > > drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> > > index b94f242420fc..d498a6b7234b 100644
> > > --- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> > > +++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> > > @@ -124,7 +124,7 @@ struct imx8mq_usb_phy {
> > > static void tca_blk_orientation_set(struct tca_blk *tca,
> > > enum typec_orientation orientation);
> > >
> > > -#ifdef CONFIG_TYPEC
> > > +#if IS_ENABLED(CONFIG_TYPEC)
> >
> > With below commit:
> >
> > 45fe729be9a6 usb: typec: Stub out typec_switch APIs when CONFIG_TYPEC=n
> >
> > I think this #if/else/endif condition can be removed.
>
> This patch should go to stable, and that commit is not present in any
> such previous kernel.
Well, commit 45fe729be9a6 was merged in v6.18-rc2. Previous stable kernel
doesn't have it yet.
>
> Should we have 2 patches or "force" 45fe729be9a6 to be also backported?
>
> What's the general advise in these situations?
I am not quite sure either.
But commit b58f0f86fd61 was merged in v6.15-rc2. So the stable version to be fixed
will be v6.18, right? Then commit 45fe729be9a6 will be included already. If so,
I think only 1 patch will be enough.
Thanks,
Xu Yang
>
> Francesco
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-11-25 7:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-24 9:50 [PATCH v1] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module Franz Schnyder
2025-11-24 10:35 ` Neil Armstrong
2025-11-25 7:04 ` Xu Yang
2025-11-25 7:20 ` Francesco Dolcini
2025-11-25 7:51 ` Xu Yang
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).