summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStephen Boyd <swboyd@chromium.org>2020-01-24 08:58:46 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-24 10:36:57 +0300
commit251c53a92b54a7f10f98334200e606b8a6c68c83 (patch)
tree0d18374afa3144cd1decc9564ec3ec4c48c5e197 /tools
parent777baa1baf63b1ed79bb9dbf6c995b184563f2f0 (diff)
downloadlinux-251c53a92b54a7f10f98334200e606b8a6c68c83.tar.xz
alarmtimer: Make alarmtimer platform device child of RTC device
[ Upstream commit c79108bd19a8490315847e0c95ac6526fcd8e770 ] The alarmtimer_suspend() function will fail if an RTC device is on a bus such as SPI or i2c and that RTC device registers and probes after alarmtimer_init() registers and probes the 'alarmtimer' platform device. This is because system wide suspend suspends devices in the reverse order of their probe. When alarmtimer_suspend() attempts to program the RTC for a wakeup it will try to program an RTC device on a bus that has already been suspended. Move the alarmtimer device registration to happen when the RTC which is used for wakeup is registered. Register the 'alarmtimer' platform device as a child of the RTC device too, so that it can be guaranteed that the RTC device won't be suspended when alarmtimer_suspend() is called. Reported-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20200124055849.154411-2-swboyd@chromium.org Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions