summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorSong Hongyan <hongyan.song@intel.com>2018-12-11 09:58:23 +0800
committerJiri Kosina <jkosina@suse.cz>2018-12-19 19:59:01 +0100
commit74fbc7d371d9a438b8e39d926d9d5012d2f762c4 (patch)
tree903758c649f326fda946121342a24a3aabb6eaa4 /drivers/hid
parentf5d582777bcb1c7ff19a5a2343f66ea01de401c6 (diff)
downloadlinux-74fbc7d371d9a438b8e39d926d9d5012d2f762c4.tar.bz2
HID: intel-ish-hid: add MSI interrupt support
Now ish hid ipc only support sideband interrupt but on some platforms they use MSI interrupt. In order to make the interrupt type coverage all the scenario add single MSI interrupt support, it can match all interrupt types. Signed-off-by: Song Hongyan <hongyan.song@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/intel-ish-hid/ipc/pci-ish.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
index 8793cc49f855..a6e1ee744f4d 100644
--- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
+++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
@@ -117,6 +117,7 @@ static int ish_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
int ret;
struct ish_hw *hw;
+ unsigned long irq_flag = 0;
struct ishtp_device *ishtp;
struct device *dev = &pdev->dev;
@@ -156,8 +157,12 @@ static int ish_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
pdev->dev_flags |= PCI_DEV_FLAGS_NO_D3;
/* request and enable interrupt */
+ ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
+ if (!pdev->msi_enabled && !pdev->msix_enabled)
+ irq_flag = IRQF_SHARED;
+
ret = devm_request_irq(dev, pdev->irq, ish_irq_handler,
- IRQF_SHARED, KBUILD_MODNAME, ishtp);
+ irq_flag, KBUILD_MODNAME, ishtp);
if (ret) {
dev_err(dev, "ISH: request IRQ %d failed\n", pdev->irq);
return ret;