#include <linux/usb/pd_vdo.h>
 #include <linux/usb/typec_dp.h>
 
-#define DP_HEADER(cmd)                 (VDO(USB_TYPEC_DP_SID, 1, cmd) | \
+#define DP_HEADER(_dp, cmd)            (VDO((_dp)->alt->svid, 1, cmd) | \
                                         VDO_OPOS(USB_TYPEC_DP_MODE))
 
 enum {
 
 static int dp_altmode_configure_vdm(struct dp_altmode *dp, u32 conf)
 {
-       u32 header = DP_HEADER(DP_CMD_CONFIGURE);
+       u32 header = DP_HEADER(dp, DP_CMD_CONFIGURE);
        int ret;
 
        ret = typec_altmode_notify(dp->alt, TYPEC_STATE_SAFE, &dp->data);
                        dev_err(&dp->alt->dev, "failed to enter mode\n");
                break;
        case DP_STATE_UPDATE:
-               header = DP_HEADER(DP_CMD_STATUS_UPDATE);
+               header = DP_HEADER(dp, DP_CMD_STATUS_UPDATE);
                vdo = 1;
                ret = typec_altmode_vdm(dp->alt, header, &vdo, 2);
                if (ret)
        .attrs = dp_altmode_attrs,
 };
 
-static int dp_altmode_probe(struct typec_altmode *alt)
+int dp_altmode_probe(struct typec_altmode *alt)
 {
        const struct typec_altmode *port = typec_altmode_get_partner(alt);
        struct dp_altmode *dp;
 
        return 0;
 }
+EXPORT_SYMBOL_GPL(dp_altmode_probe);
 
-static void dp_altmode_remove(struct typec_altmode *alt)
+void dp_altmode_remove(struct typec_altmode *alt)
 {
        struct dp_altmode *dp = typec_altmode_get_drvdata(alt);
 
        sysfs_remove_group(&alt->dev.kobj, &dp_altmode_group);
        cancel_work_sync(&dp->work);
 }
+EXPORT_SYMBOL_GPL(dp_altmode_remove);
 
 static const struct typec_device_id dp_typec_id[] = {
        { USB_TYPEC_DP_SID, USB_TYPEC_DP_MODE },
 
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0 */
+#if IS_ENABLED(CONFIG_TYPEC_DP_ALTMODE)
+int dp_altmode_probe(struct typec_altmode *alt);
+void dp_altmode_remove(struct typec_altmode *alt);
+#else
+int dp_altmode_probe(struct typec_altmode *alt) { return -ENOTSUPP; }
+void dp_altmode_remove(struct typec_altmode *alt) { }
+#endif /* CONFIG_TYPEC_DP_ALTMODE */