blob: 0dafb82fa33b7090699273fbbba96b409defac95 [file] [log] [blame]
Furquan Shaikh23e88132020-10-08 23:44:20 -07001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include <acpi/acpi_device.h>
4#include <device/device.h>
5#include <device/pci.h>
6#include <device/pci_ids.h>
7
8static const char *cnvi_wifi_acpi_name(const struct device *dev)
9{
10 return "CNVW";
11}
12
13static struct device_operations cnvi_wifi_ops = {
14 .read_resources = pci_dev_read_resources,
15 .set_resources = pci_dev_set_resources,
16 .enable_resources = pci_dev_enable_resources,
17 .ops_pci = &pci_dev_ops_pci,
18 .scan_bus = scan_static_bus,
19 .acpi_name = cnvi_wifi_acpi_name,
20 .acpi_fill_ssdt = acpi_device_write_pci_dev,
21};
22
23static const unsigned short wifi_pci_device_ids[] = {
24 PCI_DEVICE_ID_INTEL_CML_LP_CNVI_WIFI,
25 PCI_DEVICE_ID_INTEL_CML_H_CNVI_WIFI,
26 PCI_DEVICE_ID_INTEL_CNL_LP_CNVI_WIFI,
27 PCI_DEVICE_ID_INTEL_CNL_H_CNVI_WIFI,
28 PCI_DEVICE_ID_INTEL_GLK_CNVI_WIFI,
29 PCI_DEVICE_ID_INTEL_ICL_CNVI_WIFI,
30 PCI_DEVICE_ID_INTEL_JSL_CNVI_WIFI_0,
31 PCI_DEVICE_ID_INTEL_JSL_CNVI_WIFI_1,
32 PCI_DEVICE_ID_INTEL_JSL_CNVI_WIFI_2,
33 PCI_DEVICE_ID_INTEL_JSL_CNVI_WIFI_3,
34 PCI_DEVICE_ID_INTEL_TGL_CNVI_WIFI_0,
35 PCI_DEVICE_ID_INTEL_TGL_CNVI_WIFI_1,
36 PCI_DEVICE_ID_INTEL_TGL_CNVI_WIFI_2,
37 PCI_DEVICE_ID_INTEL_TGL_CNVI_WIFI_3,
38 0
39};
40
41static const struct pci_driver pch_cnvi_wifi __pci_driver = {
42 .ops = &cnvi_wifi_ops,
43 .vendor = PCI_VENDOR_ID_INTEL,
44 .devices = wifi_pci_device_ids,
45};
46
47static const char *cnvi_bt_acpi_name(const struct device *dev)
48{
49 return "CNVB";
50}
51
52static struct device_operations cnvi_bt_ops = {
53 .read_resources = pci_dev_read_resources,
54 .set_resources = pci_dev_set_resources,
55 .enable_resources = pci_dev_enable_resources,
56 .ops_pci = &pci_dev_ops_pci,
57 .scan_bus = scan_static_bus,
58 .acpi_name = cnvi_bt_acpi_name,
59 .acpi_fill_ssdt = acpi_device_write_pci_dev,
60};
61
62static const unsigned short bt_pci_device_ids[] = {
63 PCI_DEVICE_ID_INTEL_TGL_CNVI_BT_0,
64 PCI_DEVICE_ID_INTEL_TGL_CNVI_BT_1,
65 PCI_DEVICE_ID_INTEL_TGL_CNVI_BT_2,
66 PCI_DEVICE_ID_INTEL_TGL_CNVI_BT_3,
67 0
68};
69
70static const struct pci_driver pch_cnvi_bt __pci_driver = {
71 .ops = &cnvi_bt_ops,
72 .vendor = PCI_VENDOR_ID_INTEL,
73 .devices = bt_pci_device_ids,
74};