Skip to content

Commit 49ccab4

Browse files
fschnydervinodkoul
authored andcommitted
phy: fsl-imx8mq-usb: fix typec orientation switch when built as module
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 45fe729 ("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: b58f0f8 ("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: Frank Li <Frank.Li@nxp.com> Reviewed-by: Xu Yang <xu.yang_2@nxp.com> Link: https://patch.msgid.link/20251126140136.1202241-1-fra.schnyder@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 8f0b4cc commit 49ccab4

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

drivers/phy/freescale/phy-fsl-imx8mq-usb.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ struct imx8mq_usb_phy {
126126
static void tca_blk_orientation_set(struct tca_blk *tca,
127127
enum typec_orientation orientation);
128128

129-
#ifdef CONFIG_TYPEC
130-
131129
static int tca_blk_typec_switch_set(struct typec_switch_dev *sw,
132130
enum typec_orientation orientation)
133131
{
@@ -175,18 +173,6 @@ static void tca_blk_put_typec_switch(struct typec_switch_dev *sw)
175173
typec_switch_unregister(sw);
176174
}
177175

178-
#else
179-
180-
static struct typec_switch_dev *tca_blk_get_typec_switch(struct platform_device *pdev,
181-
struct imx8mq_usb_phy *imx_phy)
182-
{
183-
return NULL;
184-
}
185-
186-
static void tca_blk_put_typec_switch(struct typec_switch_dev *sw) {}
187-
188-
#endif /* CONFIG_TYPEC */
189-
190176
static void tca_blk_orientation_set(struct tca_blk *tca,
191177
enum typec_orientation orientation)
192178
{

0 commit comments

Comments
 (0)