From 6824cec26ba364db72281990694ee596963d76d2 Mon Sep 17 00:00:00 2001 From: Vatsal Bucha Date: Tue, 31 Jul 2018 12:57:37 +0530 Subject: [PATCH] Asoc: swr: Handle MBHC and IRQ interrupts from tx slave Interrupts will be handled by slave driver. This needs slave pointer to store virtual interrupt and pass it as a parameter to handle_nested_irq. Change-Id: I356102a04b4fda7e5863f809cd848d7a82b82f36 Signed-off-by: Vatsal Bucha --- include/soc/soundwire.h | 3 ++- soc/swr-mstr-ctrl.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/soc/soundwire.h b/include/soc/soundwire.h index d2ebb7621476..28b3b30f8681 100644 --- a/include/soc/soundwire.h +++ b/include/soc/soundwire.h @@ -15,6 +15,7 @@ #include #include #include +#include extern struct bus_type soundwire_type; @@ -204,7 +205,7 @@ struct swr_device { struct device dev; unsigned long addr; u8 group_id; - u8 slave_irq; + struct irq_domain *slave_irq; }; static inline struct swr_device *to_swr_device(struct device *dev) diff --git a/soc/swr-mstr-ctrl.c b/soc/swr-mstr-ctrl.c index 68354b81367f..b2449e7e937d 100644 --- a/soc/swr-mstr-ctrl.c +++ b/soc/swr-mstr-ctrl.c @@ -1078,7 +1078,9 @@ static irqreturn_t swr_mstr_interrupt(int irq, void *dev) if (swr_dev->dev_num != devnum) continue; if (swr_dev->slave_irq) - handle_nested_irq(swr_dev->slave_irq); + handle_nested_irq( + irq_find_mapping( + swr_dev->slave_irq, 0)); } break; case SWRM_INTERRUPT_STATUS_NEW_SLAVE_ATTACHED: