* [PATCH] mfd: intel_soc_pmic_bxtwc: fix usbc interrupt
@ 2016-10-17 7:32 Heikki Krogerus
2016-10-26 12:47 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Heikki Krogerus @ 2016-10-17 7:32 UTC (permalink / raw)
To: Lee Jones; +Cc: linux-kernel, Bin Gao
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>
---
drivers/mfd/intel_soc_pmic_bxtwc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index 43e54b7..f9a8c52 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -86,6 +86,7 @@ enum bxtwc_irqs_level2 {
BXTWC_THRM2_IRQ,
BXTWC_BCU_IRQ,
BXTWC_ADC_IRQ,
+ BXTWC_USBC_IRQ,
BXTWC_CHGR0_IRQ,
BXTWC_CHGR1_IRQ,
BXTWC_GPIO0_IRQ,
@@ -111,7 +112,8 @@ static const struct regmap_irq bxtwc_regmap_irqs_level2[] = {
REGMAP_IRQ_REG(BXTWC_THRM2_IRQ, 2, 0xff),
REGMAP_IRQ_REG(BXTWC_BCU_IRQ, 3, 0x1f),
REGMAP_IRQ_REG(BXTWC_ADC_IRQ, 4, 0xff),
- REGMAP_IRQ_REG(BXTWC_CHGR0_IRQ, 5, 0x3f),
+ REGMAP_IRQ_REG(BXTWC_USBC_IRQ, 5, BIT(5)),
+ REGMAP_IRQ_REG(BXTWC_CHGR0_IRQ, 5, 0x1f),
REGMAP_IRQ_REG(BXTWC_CHGR1_IRQ, 6, 0x1f),
REGMAP_IRQ_REG(BXTWC_GPIO0_IRQ, 7, 0xff),
REGMAP_IRQ_REG(BXTWC_GPIO1_IRQ, 8, 0x3f),
@@ -146,7 +148,7 @@ static struct resource adc_resources[] = {
};
static struct resource usbc_resources[] = {
- DEFINE_RES_IRQ_NAMED(BXTWC_CHGR0_IRQ, "USBC"),
+ DEFINE_RES_IRQ(BXTWC_USBC_IRQ),
};
static struct resource charger_resources[] = {
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mfd: intel_soc_pmic_bxtwc: fix usbc interrupt
2016-10-17 7:32 [PATCH] mfd: intel_soc_pmic_bxtwc: fix usbc interrupt Heikki Krogerus
@ 2016-10-26 12:47 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2016-10-26 12:47 UTC (permalink / raw)
To: Heikki Krogerus; +Cc: linux-kernel, Bin Gao
On Mon, 17 Oct 2016, Heikki Krogerus wrote:
> 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>
> ---
> drivers/mfd/intel_soc_pmic_bxtwc.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Applied, thanks.
> diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
> index 43e54b7..f9a8c52 100644
> --- a/drivers/mfd/intel_soc_pmic_bxtwc.c
> +++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
> @@ -86,6 +86,7 @@ enum bxtwc_irqs_level2 {
> BXTWC_THRM2_IRQ,
> BXTWC_BCU_IRQ,
> BXTWC_ADC_IRQ,
> + BXTWC_USBC_IRQ,
> BXTWC_CHGR0_IRQ,
> BXTWC_CHGR1_IRQ,
> BXTWC_GPIO0_IRQ,
> @@ -111,7 +112,8 @@ static const struct regmap_irq bxtwc_regmap_irqs_level2[] = {
> REGMAP_IRQ_REG(BXTWC_THRM2_IRQ, 2, 0xff),
> REGMAP_IRQ_REG(BXTWC_BCU_IRQ, 3, 0x1f),
> REGMAP_IRQ_REG(BXTWC_ADC_IRQ, 4, 0xff),
> - REGMAP_IRQ_REG(BXTWC_CHGR0_IRQ, 5, 0x3f),
> + REGMAP_IRQ_REG(BXTWC_USBC_IRQ, 5, BIT(5)),
> + REGMAP_IRQ_REG(BXTWC_CHGR0_IRQ, 5, 0x1f),
> REGMAP_IRQ_REG(BXTWC_CHGR1_IRQ, 6, 0x1f),
> REGMAP_IRQ_REG(BXTWC_GPIO0_IRQ, 7, 0xff),
> REGMAP_IRQ_REG(BXTWC_GPIO1_IRQ, 8, 0x3f),
> @@ -146,7 +148,7 @@ static struct resource adc_resources[] = {
> };
>
> static struct resource usbc_resources[] = {
> - DEFINE_RES_IRQ_NAMED(BXTWC_CHGR0_IRQ, "USBC"),
> + DEFINE_RES_IRQ(BXTWC_USBC_IRQ),
> };
>
> static struct resource charger_resources[] = {
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-26 12:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17 7:32 [PATCH] mfd: intel_soc_pmic_bxtwc: fix usbc interrupt Heikki Krogerus
2016-10-26 12:47 ` Lee Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.