[PATCH v1] phy: fsl-imx8mq-usb: fix typec orientation switch when built as module
Neil Armstrong
neil.armstrong at linaro.org
Mon Nov 24 02:35:40 PST 2025
On 11/24/25 10:50, Franz Schnyder wrote:
> From: Franz Schnyder <franz.schnyder at 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 at vger.kernel.org
> Signed-off-by: Franz Schnyder <franz.schnyder at 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 at linaro.org>
More information about the linux-phy
mailing list