diff options
author | Hans de Goede <hdegoede@redhat.com> | 2018-10-06 04:25:39 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2018-10-11 17:05:09 -0400 |
commit | b30f2f65568f840e5ca522d98ba2ad73b8f59cde (patch) | |
tree | 1b5dba69b7bf61a239681feeb79faa2d42bb4bd6 /drivers | |
parent | cc52612ec0f3b80c19126a36b8c1e12a8f5a8e78 (diff) |
i2c: designware: Set IRQF_NO_SUSPEND flag for all BYT and CHT controllers
On some Cherry Trail systems the GPU ACPI fwnode has power-resources which
point to the PMIC, which is connected over a LPSS I2C controller. The GPU
is a PCI device and PCI devices are powered-on at the resume_noirq resume
phase.
Since the GPU power-resources need the I2C controller, recent acpi_lpss.c
changes now also power-up the LPSS I2C controllers on BYT and CHT devices
in the resume_noirq resume phase. But during this phase the IRQ of the
controller is disabled leading to these errors:
i2c_designware 808622C1:06: controller timed out
ACPI Error: AE_ERROR, Returned by Handler for [UserDefinedRegion]
ACPI Error: Method parse/execution failed \_SB.P18W._ON, AE_ERROR
video LNXVIDEO:00: Failed to change power state to D0
This commit makes the i2c-designware controller set the IRQF_NO_SUSPEND
flag when requesting the interrupt on BYT and CHT devices, so that the IRQ
is left enabled during the noirq phase, fixing this.
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/busses/i2c-designware-core.h | 1 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-designware-master.c | 2 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-designware-platdrv.c | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h index fb40d76639da..9ec8394f4787 100644 --- a/drivers/i2c/busses/i2c-designware-core.h +++ b/drivers/i2c/busses/i2c-designware-core.h | |||
@@ -278,6 +278,7 @@ struct dw_i2c_dev { | |||
278 | #define ACCESS_SWAP 0x00000001 | 278 | #define ACCESS_SWAP 0x00000001 |
279 | #define ACCESS_16BIT 0x00000002 | 279 | #define ACCESS_16BIT 0x00000002 |
280 | #define ACCESS_INTR_MASK 0x00000004 | 280 | #define ACCESS_INTR_MASK 0x00000004 |
281 | #define ACCESS_NO_IRQ_SUSPEND 0x00000008 | ||
281 | 282 | ||
282 | #define MODEL_CHERRYTRAIL 0x00000100 | 283 | #define MODEL_CHERRYTRAIL 0x00000100 |
283 | #define MODEL_MSCC_OCELOT 0x00000200 | 284 | #define MODEL_MSCC_OCELOT 0x00000200 |
diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c index 2ccb527735f9..2a630ac35ba2 100644 --- a/drivers/i2c/busses/i2c-designware-master.c +++ b/drivers/i2c/busses/i2c-designware-master.c | |||
@@ -707,7 +707,7 @@ int i2c_dw_probe(struct dw_i2c_dev *dev) | |||
707 | adap->dev.parent = dev->dev; | 707 | adap->dev.parent = dev->dev; |
708 | i2c_set_adapdata(adap, dev); | 708 | i2c_set_adapdata(adap, dev); |
709 | 709 | ||
710 | if (dev->shared_with_punit) { | 710 | if (dev->flags & ACCESS_NO_IRQ_SUSPEND) { |
711 | irq_flags = IRQF_NO_SUSPEND; | 711 | irq_flags = IRQF_NO_SUSPEND; |
712 | } else { | 712 | } else { |
713 | irq_flags = IRQF_SHARED | IRQF_COND_SUSPEND; | 713 | irq_flags = IRQF_SHARED | IRQF_COND_SUSPEND; |
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 51cb17287c47..997bbb3d925f 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c | |||
@@ -123,8 +123,8 @@ static const struct acpi_device_id dw_i2c_acpi_match[] = { | |||
123 | { "INT33C3", 0 }, | 123 | { "INT33C3", 0 }, |
124 | { "INT3432", 0 }, | 124 | { "INT3432", 0 }, |
125 | { "INT3433", 0 }, | 125 | { "INT3433", 0 }, |
126 | { "80860F41", 0 }, | 126 | { "80860F41", ACCESS_NO_IRQ_SUSPEND }, |
127 | { "808622C1", MODEL_CHERRYTRAIL }, | 127 | { "808622C1", ACCESS_NO_IRQ_SUSPEND | MODEL_CHERRYTRAIL }, |
128 | { "AMD0010", ACCESS_INTR_MASK }, | 128 | { "AMD0010", ACCESS_INTR_MASK }, |
129 | { "AMDI0010", ACCESS_INTR_MASK }, | 129 | { "AMDI0010", ACCESS_INTR_MASK }, |
130 | { "AMDI0510", 0 }, | 130 | { "AMDI0510", 0 }, |