Skip to content

Commit 74fbc7d

Browse files
hongyansJiri Kosina
authored andcommitted
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>
1 parent f5d5827 commit 74fbc7d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/hid/intel-ish-hid/ipc/pci-ish.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ static int ish_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
117117
{
118118
int ret;
119119
struct ish_hw *hw;
120+
unsigned long irq_flag = 0;
120121
struct ishtp_device *ishtp;
121122
struct device *dev = &pdev->dev;
122123

@@ -156,8 +157,12 @@ static int ish_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
156157
pdev->dev_flags |= PCI_DEV_FLAGS_NO_D3;
157158

158159
/* request and enable interrupt */
160+
ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
161+
if (!pdev->msi_enabled && !pdev->msix_enabled)
162+
irq_flag = IRQF_SHARED;
163+
159164
ret = devm_request_irq(dev, pdev->irq, ish_irq_handler,
160-
IRQF_SHARED, KBUILD_MODNAME, ishtp);
165+
irq_flag, KBUILD_MODNAME, ishtp);
161166
if (ret) {
162167
dev_err(dev, "ISH: request IRQ %d failed\n", pdev->irq);
163168
return ret;

0 commit comments

Comments
 (0)