Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: intel_soc_pmic_bxtwc: Fix usbc interrupt

The wcove USB Type-C driver is currently being flooded with
interrupts that are not targeted to it. The reason for that
is because all CHRG first level interrupts are mapped to it.
This fixes the issue by introducing separate irq for the
usbc device, and mapping only USB Type-C PHY interrupts to
it.

Fixes: 9c6235c86332 ("mfd: intel_soc_pmic_bxtwc: Add bxt_wcove_usbc device")
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Heikki Krogerus and committed by
Lee Jones
96007020 274e43ed

+4 -2
+4 -2
drivers/mfd/intel_soc_pmic_bxtwc.c
··· 86 86 BXTWC_THRM2_IRQ, 87 87 BXTWC_BCU_IRQ, 88 88 BXTWC_ADC_IRQ, 89 + BXTWC_USBC_IRQ, 89 90 BXTWC_CHGR0_IRQ, 90 91 BXTWC_CHGR1_IRQ, 91 92 BXTWC_GPIO0_IRQ, ··· 112 111 REGMAP_IRQ_REG(BXTWC_THRM2_IRQ, 2, 0xff), 113 112 REGMAP_IRQ_REG(BXTWC_BCU_IRQ, 3, 0x1f), 114 113 REGMAP_IRQ_REG(BXTWC_ADC_IRQ, 4, 0xff), 115 - REGMAP_IRQ_REG(BXTWC_CHGR0_IRQ, 5, 0x3f), 114 + REGMAP_IRQ_REG(BXTWC_USBC_IRQ, 5, BIT(5)), 115 + REGMAP_IRQ_REG(BXTWC_CHGR0_IRQ, 5, 0x1f), 116 116 REGMAP_IRQ_REG(BXTWC_CHGR1_IRQ, 6, 0x1f), 117 117 REGMAP_IRQ_REG(BXTWC_GPIO0_IRQ, 7, 0xff), 118 118 REGMAP_IRQ_REG(BXTWC_GPIO1_IRQ, 8, 0x3f), ··· 148 146 }; 149 147 150 148 static struct resource usbc_resources[] = { 151 - DEFINE_RES_IRQ_NAMED(BXTWC_CHGR0_IRQ, "USBC"), 149 + DEFINE_RES_IRQ(BXTWC_USBC_IRQ), 152 150 }; 153 151 154 152 static struct resource charger_resources[] = {