Skip to content

Commit 1f3546f

Browse files
Heikki Krogerusgregkh
authored andcommitted
usb: typec: ucsi: acpi: Check the _DEP dependencies
Failing probe with -EPROBE_DEFER until all dependencies listed in the _DEP (Operation Region Dependencies) object have been met. This will fix an issue where on some platforms UCSI ACPI driver fails to probe because the address space handler for the operation region that the UCSI ACPI interface uses has not been loaded yet. Fixes: 8243edf ("usb: typec: ucsi: Add ACPI driver") 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 290a405 commit 1f3546f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/usb/typec/ucsi/ucsi_acpi.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,15 @@ static void ucsi_acpi_notify(acpi_handle handle, u32 event, void *data)
112112

113113
static int ucsi_acpi_probe(struct platform_device *pdev)
114114
{
115+
struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
115116
struct ucsi_acpi *ua;
116117
struct resource *res;
117118
acpi_status status;
118119
int ret;
119120

121+
if (adev->dep_unmet)
122+
return -EPROBE_DEFER;
123+
120124
ua = devm_kzalloc(&pdev->dev, sizeof(*ua), GFP_KERNEL);
121125
if (!ua)
122126
return -ENOMEM;

0 commit comments

Comments
 (0)