Skip to content

Commit 4e3a502

Browse files
Heikki Krogerusgregkh
authored andcommitted
usb: typec: ucsi: acpi: Implement resume callback
The ACPI driver needs to resume the interface by calling ucsi_resume(). Otherwise we may fail to detect connections and disconnections that happen while the system is suspended. Link: https://bugzilla.kernel.org/show_bug.cgi?id=210425 Fixes: a94ecde ("usb: typec: ucsi: ccg: enable runtime pm support") Cc: <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 99f6d43 commit 4e3a502

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/usb/typec/ucsi/ucsi_acpi.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,15 @@ static int ucsi_acpi_remove(struct platform_device *pdev)
185185
return 0;
186186
}
187187

188+
static int ucsi_acpi_resume(struct device *dev)
189+
{
190+
struct ucsi_acpi *ua = dev_get_drvdata(dev);
191+
192+
return ucsi_resume(ua->ucsi);
193+
}
194+
195+
static DEFINE_SIMPLE_DEV_PM_OPS(ucsi_acpi_pm_ops, NULL, ucsi_acpi_resume);
196+
188197
static const struct acpi_device_id ucsi_acpi_match[] = {
189198
{ "PNP0CA0", 0 },
190199
{ },
@@ -194,6 +203,7 @@ MODULE_DEVICE_TABLE(acpi, ucsi_acpi_match);
194203
static struct platform_driver ucsi_acpi_platform_driver = {
195204
.driver = {
196205
.name = "ucsi_acpi",
206+
.pm = pm_ptr(&ucsi_acpi_pm_ops),
197207
.acpi_match_table = ACPI_PTR(ucsi_acpi_match),
198208
},
199209
.probe = ucsi_acpi_probe,

0 commit comments

Comments
 (0)