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 <vbucha@codeaurora.org>
This commit is contained in:
Vatsal Bucha
2018-07-31 12:57:37 +05:30
committed by Gerrit - the friendly Code Review server
parent ec5eab5556
commit 6824cec26b
2 changed files with 5 additions and 2 deletions

View File

@@ -15,6 +15,7 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/mod_devicetable.h> #include <linux/mod_devicetable.h>
#include <linux/irqdomain.h>
extern struct bus_type soundwire_type; extern struct bus_type soundwire_type;
@@ -204,7 +205,7 @@ struct swr_device {
struct device dev; struct device dev;
unsigned long addr; unsigned long addr;
u8 group_id; u8 group_id;
u8 slave_irq; struct irq_domain *slave_irq;
}; };
static inline struct swr_device *to_swr_device(struct device *dev) static inline struct swr_device *to_swr_device(struct device *dev)

View File

@@ -1078,7 +1078,9 @@ static irqreturn_t swr_mstr_interrupt(int irq, void *dev)
if (swr_dev->dev_num != devnum) if (swr_dev->dev_num != devnum)
continue; continue;
if (swr_dev->slave_irq) if (swr_dev->slave_irq)
handle_nested_irq(swr_dev->slave_irq); handle_nested_irq(
irq_find_mapping(
swr_dev->slave_irq, 0));
} }
break; break;
case SWRM_INTERRUPT_STATUS_NEW_SLAVE_ATTACHED: case SWRM_INTERRUPT_STATUS_NEW_SLAVE_ATTACHED: