We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de0c9a6 commit 33cd0a1Copy full SHA for 33cd0a1
VoodooGPIO/VoodooGPIO.cpp
@@ -194,6 +194,17 @@ bool VoodooGPIO::intel_pad_acpi_mode(unsigned pin) {
194
offset = community->hostown_offset + padgrp->reg_num * 4;
195
hostown = community->regs + offset;
196
197
+ UInt32 hostownval = readl(hostown);
198
+ if ((hostownval & BIT(gpp_offset)) == 0) {
199
+ IOLog("%s::Pin owned by ACPI...Attempting to take ownership\n", getName());
200
+
201
+ hostownval |= BIT(gpp_offset);
202
+ writel(hostownval, hostown);
203
+ } else {
204
+ return false;
205
+ }
206
207
+ // Second read to double check we actually got ownership
208
return !(readl(hostown) & BIT(gpp_offset));
209
}
210
0 commit comments