-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path0105-ucsi-acpi.patch
47 lines (41 loc) · 1.78 KB
/
0105-ucsi-acpi.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From: Benjamin Berg <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>,
Guenter Roeck <[email protected]>,
[email protected], Benjamin Berg <[email protected]>,
Hans de Goede <[email protected]>,
Heikki Krogerus <[email protected]>
Subject: [PATCH 1/2] usb: typec: ucsi: acpi: Always decode connector change information
Date: Fri, 9 Oct 2020 16:40:46 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
From: Benjamin Berg <[email protected]>
Normal commands may be reporting that a connector has changed. Always
call the usci_connector_change handler and let it take care of
scheduling the work when needed.
Doing this makes the ACPI code path identical to the CCG one.
Cc: Hans de Goede <[email protected]>
Cc: Heikki Krogerus <[email protected]>
Signed-off-by: Benjamin Berg <[email protected]>
---
drivers/usb/typec/ucsi/ucsi_acpi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/typec/ucsi/ucsi_acpi.c b/drivers/usb/typec/ucsi/ucsi_acpi.c
index fbfe8f5933af..04976435ad73 100644
--- a/drivers/usb/typec/ucsi/ucsi_acpi.c
+++ b/drivers/usb/typec/ucsi/ucsi_acpi.c
@@ -103,11 +103,12 @@ static void ucsi_acpi_notify(acpi_handle handle, u32 event, void *data)
if (ret)
return;
+ if (UCSI_CCI_CONNECTOR(cci))
+ ucsi_connector_change(ua->ucsi, UCSI_CCI_CONNECTOR(cci));
+
if (test_bit(COMMAND_PENDING, &ua->flags) &&
cci & (UCSI_CCI_ACK_COMPLETE | UCSI_CCI_COMMAND_COMPLETE))
complete(&ua->complete);
- else if (UCSI_CCI_CONNECTOR(cci))
- ucsi_connector_change(ua->ucsi, UCSI_CCI_CONNECTOR(cci));
}
static int ucsi_acpi_probe(struct platform_device *pdev)
--
2.26.2