diff mbox series

[v2] hid: remove NO_D3 flag for non Cherry Trail(CHT)

Message ID 1558573820-31133-1-git-send-email-hongyan.song@intel.com (mailing list archive)
State New, archived
Headers show
Series [v2] hid: remove NO_D3 flag for non Cherry Trail(CHT) | expand

Commit Message

Song, Hongyan May 23, 2019, 1:10 a.m. UTC
From: Song Hongyan <hongyan.song@intel.com>

The code base NO_D3 flag is especially set for CHT, which is a tablet
platform, it have PMC changes and do not need to enter D3.
The newer platforms, which need ISH to enter D3, if have this NO_D3
flag set they can never enter D3, so remove it.

Signed-off-by: Song Hongyan <hongyan.song@intel.com>
---
v2 changes: update the code comments format and patch header, patch comments.

 drivers/hid/intel-ish-hid/ipc/pci-ish.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
index ac0a179..ea444e4 100644
--- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c
+++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c
@@ -155,7 +155,10 @@  static int ish_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	/* mapping IO device memory */
 	hw->mem_addr = pcim_iomap_table(pdev)[0];
 	ishtp->pdev = pdev;
-	pdev->dev_flags |= PCI_DEV_FLAGS_NO_D3;
+
+	/* This NO_D3 flag is only for CHV and older platforms */
+	if (pdev->device == CHV_DEVICE_ID)
+		pdev->dev_flags |= PCI_DEV_FLAGS_NO_D3;
 
 	/* request and enable interrupt */
 	ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);