]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
usb: ucsi: ccg: disable runtime pm during fw flashing
authorAjay Gupta <ajayg@nvidia.com>
Mon, 17 Feb 2020 14:49:12 +0000 (17:49 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 14:11:51 +0000 (16:11 +0200)
[ Upstream commit 57a5e5f936be583d2c6cef3661c169e3ea4bf922 ]

Ucsi ppm is unregistered during fw flashing so disable
runtime pm also and reenable after fw flashing is completed
and ppm is re-registered.

Signed-off-by: Ajay Gupta <ajayg@nvidia.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200217144913.55330-3-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/typec/ucsi/ucsi_ccg.c

index 3370b3fc37b10ad5402d65c4077f25478dfa1c9f..bd374cea3ba6c97e7829e5f10b009891a6e1e569 100644 (file)
@@ -1032,6 +1032,7 @@ static int ccg_restart(struct ucsi_ccg *uc)
                return status;
        }
 
+       pm_runtime_enable(uc->dev);
        return 0;
 }
 
@@ -1047,6 +1048,7 @@ static void ccg_update_firmware(struct work_struct *work)
 
        if (flash_mode != FLASH_NOT_NEEDED) {
                ucsi_unregister(uc->ucsi);
+               pm_runtime_disable(uc->dev);
                free_irq(uc->irq, uc);
 
                ccg_fw_update(uc, flash_mode);