android_kernel_motorola_sm6375/drivers
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Rajat Jain 2f844b61db ACPI: PM: Set enable_for_wake for wakeup GPEs during suspend-to-idle
I noticed that recently multiple systems (chromebooks) couldn't wake
from S0ix using LID or Keyboard after updating to a newer kernel. I
bisected and it turned up commit f941d3e41d ("ACPI: EC / PM: Disable
non-wakeup GPEs for suspend-to-idle"). I checked that the issue got
fixed if that commit was reverted.

I debugged and found that although PNP0C0D:00 (representing the LID)
is wake capable and should wakeup the system per the code in
acpi_wakeup_gpe_init() and in drivers/acpi/button.c:

localhost /sys # cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
LID0      S4    *enabled   platform:PNP0C0D:00
CREC      S5    *disabled  platform:GOOG0004:00
                *disabled  platform:cros-ec-dev.1.auto
                *disabled  platform:cros-ec-accel.0
                *disabled  platform:cros-ec-accel.1
                *disabled  platform:cros-ec-gyro.0
                *disabled  platform:cros-ec-ring.0
                *disabled  platform:cros-usbpd-charger.2.auto
                *disabled  platform:cros-usbpd-logger.3.auto
D015      S3    *enabled   i2c:i2c-ELAN0000:00
PENH      S3    *enabled   platform:PRP0001:00
XHCI      S3    *enabled   pci:0000:00:14.0
GLAN      S4    *disabled
WIFI      S3    *disabled  pci:0000:00:14.3
localhost /sys #

On debugging, I found that its corresponding GPE is not being enabled.
The particular GPE's "gpe_register_info->enable_for_wake" does not
have any bits set when acpi_enable_all_wakeup_gpes() comes around to
use it. I looked at code and could not find any other code path that
should set the bits in "enable_for_wake" bitmask for the wake enabled
devices for s2idle.  [I do see that it happens for S3 in
acpi_sleep_prepare()].

Thus I used the same call to enable the GPEs for wake enabled devices,
and verified that this fixes the regression I was seeing on multiple
of my devices.

[ rjw: The problem is that commit f941d3e41d ("ACPI: EC / PM:
  Disable non-wakeup GPEs for suspend-to-idle") forgot to add
  the acpi_enable_wakeup_devices() call for s2idle along with
  acpi_enable_all_wakeup_gpes(). ]

Fixes: f941d3e41d ("ACPI: EC / PM: Disable non-wakeup GPEs for suspend-to-idle")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=203579
Signed-off-by: Rajat Jain <rajatja@google.com>
[ rjw: Subject & changelog ]
Cc: 5.0+ <stable@vger.kernel.org> # 5.0+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-05-14 11:02:09 +02:00
..
accessibility
acpi ACPI: PM: Set enable_for_wake for wakeup GPEs during suspend-to-idle 2019-05-14 11:02:09 +02:00
amba
android
ata
atm firestream: fix spelling mistake "tramsitted" -> "transmitted" 2019-04-18 11:38:22 -07:00
auxdisplay
base mm/memory_hotplug: do not unlock after failing to take the device_hotplug_lock 2019-04-19 09:46:04 -07:00
bcma
block zram: pass down the bvec we need to read into in the work struct 2019-04-26 09:18:05 -07:00
bluetooth Bluetooth: btusb: request wake pin with NOAUTOEN 2019-04-09 17:38:24 -10:00
bus
cdrom
char ipmi: fix sleep-in-atomic in free_user at cleanup SRCU user->release_barrier 2019-04-17 10:29:27 -05:00
clk Allwinner clocks fixes for 5.1 2019-04-19 13:06:58 -07:00
clocksource arm64 updates for 5.2 2019-05-06 17:54:22 -07:00
connector
cpufreq
cpuidle
crypto Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
dax
dca
devfreq
dio
dma Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
dma-buf
edac
eisa
extcon Merge branches 'acpi-utils', 'acpi-video', 'acpi-soc' and 'acpi-button' 2019-05-06 10:50:08 +02:00
firewire
firmware ACPI updates for 5.2-rc1 2019-05-06 19:35:13 -07:00
fmc
fpga
fsi
gnss
gpio Merge branches 'acpi-utils', 'acpi-video', 'acpi-soc' and 'acpi-button' 2019-05-06 10:50:08 +02:00
gpu Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2019-04-19 10:28:27 -07:00
hsi
hv
hwmon
hwspinlock
hwtracing
i2c Merge branch 'i2c/for-current-fixed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-05-03 11:42:01 -07:00
i3c i3c: dw: Fix dw_i3c_master_disable controller by using correct mask 2019-04-10 12:46:20 +02:00
ide
idle
iio
infiniband Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2019-04-27 16:27:02 -07:00
interconnect
iommu iommu/amd: Set exclusion range correctly 2019-04-12 12:59:45 +02:00
ipack
irqchip A couple more MIPS fixes: 2019-04-22 11:54:47 -07:00
isdn mISDN: Check address length before reading address family 2019-04-12 10:25:03 -07:00
leds
lightnvm lightnvm: pblk: fix crash in pblk_end_partial_read due to multipage bvecs 2019-04-10 12:17:01 -06:00
macintosh
mailbox
mcb
md dm persistent data: Simplify stack trace handling 2019-04-29 12:37:52 +02:00
media
memory
memstick
message
mfd
misc Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
mmc Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
mtd Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
mux
net Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
nfc spi: ST ST95HF NFC: declare missing of table 2019-04-23 10:44:44 -07:00
ntb
nubus
nvdimm
nvme Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu 2019-04-18 14:42:24 +02:00
nvmem
of of_net: Fix residues after of_get_nvmem_mac_address removal 2019-04-19 11:58:30 -07:00
opp
oprofile
parisc
parport
pci Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-06 15:51:56 -07:00
pcmcia
perf perf/arm-ccn: Clean up CPU hotplug handling 2019-04-23 12:29:37 +01:00
phy
pinctrl
platform Here's more than a handful of clk driver fixes for changes that came in 2019-04-13 14:33:56 -07:00
pnp
power Power Supply Fixes for 5.1 cycle 2019-05-01 14:57:23 -07:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 s390 updates for the 5.2 merge window 2019-05-06 16:42:54 -07:00
sbus
scsi Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
sfi
sh
siox
slimbus
sn
soc
soundwire
spi
spmi
ssb
staging Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
target
tc
tee
thermal
thunderbolt
tty Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
uio
usb Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
uwb
vfio
vhost vhost: reject zero size iova range 2019-04-10 22:45:38 -07:00
video
virt
virtio
visorbus
vlynq
vme
w1 USB: w1 ds2490: Fix bug caused by improper use of altsetting array 2019-04-25 11:11:41 +02:00
watchdog watchdog/sbsa: Use arch_timer_read_counter instead of arch_counter_get_cntvct 2019-04-30 16:09:27 +01:00
xen x86/irq/32: Invoke irq_ctx_init() from init_IRQ() 2019-04-17 15:30:12 +02:00
zorro
Kconfig
Makefile