]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.53/acpi-lpss-add-missing-prv_offset-setting-for-byt-cht-pwm-devices.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.14.53 / acpi-lpss-add-missing-prv_offset-setting-for-byt-cht-pwm-devices.patch
CommitLineData
0f714131
GKH
1From fdcb613d49321b5bf5d5a1bd0fba8e7c241dcc70 Mon Sep 17 00:00:00 2001
2From: Hans de Goede <hdegoede@redhat.com>
3Date: Thu, 26 Apr 2018 14:10:24 +0200
4Subject: ACPI / LPSS: Add missing prv_offset setting for byt/cht PWM devices
5
6From: Hans de Goede <hdegoede@redhat.com>
7
8commit fdcb613d49321b5bf5d5a1bd0fba8e7c241dcc70 upstream.
9
10The LPSS PWM device on on Bay Trail and Cherry Trail devices has a set
11of private registers at offset 0x800, the current lpss_device_desc for
12them already sets the LPSS_SAVE_CTX flag to have these saved/restored
13over device-suspend, but the current lpss_device_desc was not setting
14the prv_offset field, leading to the regular device registers getting
15saved/restored instead.
16
17This is causing the PWM controller to no longer work, resulting in a black
18screen, after a suspend/resume on systems where the firmware clears the
19APB clock and reset bits at offset 0x804.
20
21This commit fixes this by properly setting prv_offset to 0x800 for
22the PWM devices.
23
24Cc: stable@vger.kernel.org
25Fixes: e1c748179754 ("ACPI / LPSS: Add Intel BayTrail ACPI mode PWM")
26Fixes: 1bfbd8eb8a7f ("ACPI / LPSS: Add ACPI IDs for Intel Braswell")
27Signed-off-by: Hans de Goede <hdegoede@redhat.com>
28Acked-by: Rafael J . Wysocki <rjw@rjwysocki.net>
29Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
30Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31
32---
33 drivers/acpi/acpi_lpss.c | 2 ++
34 1 file changed, 2 insertions(+)
35
36--- a/drivers/acpi/acpi_lpss.c
37+++ b/drivers/acpi/acpi_lpss.c
38@@ -229,11 +229,13 @@ static const struct lpss_device_desc lpt
39
40 static const struct lpss_device_desc byt_pwm_dev_desc = {
41 .flags = LPSS_SAVE_CTX,
42+ .prv_offset = 0x800,
43 .setup = byt_pwm_setup,
44 };
45
46 static const struct lpss_device_desc bsw_pwm_dev_desc = {
47 .flags = LPSS_SAVE_CTX | LPSS_NO_D3_DELAY,
48+ .prv_offset = 0x800,
49 .setup = bsw_pwm_setup,
50 };
51