]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - drivers/usb/typec/mux/intel_pmc_mux.c
Merge tag 'platform-drivers-x86-v5.8-1' of git://git.infradead.org/linux-platform...
[thirdparty/linux.git] / drivers / usb / typec / mux / intel_pmc_mux.c
index c22e5c4bbf1a9e1bf25ed0fa310198b836b5b7c6..1ac0a3eb7dd8597669f3624b57ba85e38b333e8f 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/usb/typec_dp.h>
 #include <linux/usb/typec_tbt.h>
 
-#include <asm/intel_pmc_ipc.h>
+#include <asm/intel_scu_ipc.h>
 
 #define PMC_USBC_CMD           0xa7
 
@@ -97,6 +97,7 @@ struct pmc_usb_port {
 struct pmc_usb {
        u8 num_ports;
        struct device *dev;
+       struct intel_scu_ipc_dev *ipc;
        struct pmc_usb_port *port;
 };
 
@@ -108,9 +109,8 @@ static int pmc_usb_command(struct pmc_usb_port *port, u8 *msg, u32 len)
         * Error bit will always be 0 with the USBC command.
         * Status can be checked from the response message.
         */
-       intel_pmc_ipc_command(PMC_USBC_CMD, 0, msg, len,
-                             (void *)response, 1);
-
+       intel_scu_ipc_dev_command(port->pmc->ipc, PMC_USBC_CMD, 0, msg, len,
+                                 response, sizeof(response));
        if (response[2]) {
                if (response[2] & BIT(1))
                        return -EIO;
@@ -374,6 +374,10 @@ static int pmc_usb_probe(struct platform_device *pdev)
        if (!pmc->port)
                return -ENOMEM;
 
+       pmc->ipc = devm_intel_scu_ipc_dev_get(&pdev->dev);
+       if (!pmc->ipc)
+               return -ENODEV;
+
        pmc->dev = &pdev->dev;
 
        /*