diff mbox series

[v2,01/13] rtw89: 8852c: add 8852c empty files

Message ID 20220307060457.56789-2-pkshih@realtek.com
State New
Headers show
Series rtw89: generalize functions shared with 8852CE | expand

Commit Message

Ping-Ke Shih March 7, 2022, 6:04 a.m. UTC
Add these files, and then I can add specific chip::ops or chip::info along
with the existing chip.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/rtw8852c.c | 20 +++++++++++
 drivers/net/wireless/realtek/rtw89/rtw8852c.h | 12 +++++++
 .../net/wireless/realtek/rtw89/rtw8852ce.c    | 36 +++++++++++++++++++
 3 files changed, 68 insertions(+)
 create mode 100644 drivers/net/wireless/realtek/rtw89/rtw8852c.c
 create mode 100644 drivers/net/wireless/realtek/rtw89/rtw8852c.h
 create mode 100644 drivers/net/wireless/realtek/rtw89/rtw8852ce.c

Comments

Kalle Valo March 10, 2022, 4:45 p.m. UTC | #1
Ping-Ke Shih <pkshih@realtek.com> wrote:

> Add these files, and then I can add specific chip::ops or chip::info along
> with the existing chip.
> 
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>

13 patches applied to wireless-next.git, thanks.

0ac80e05ea32 rtw89: 8852c: add 8852c empty files
4a9e48accf2d rtw89: pci: add struct rtw89_pci_info
97d61bf94026 rtw89: pci: add V1 of PCI channel address
e4133f269eb7 rtw89: pci: use a struct to describe all registers address related to DMA channel
a8bdac120484 rtw89: read chip version depends on chip ID
2a7e54db40f0 rtw89: add power_{on/off}_func
2af64b4af48e rtw89: add hci_func_en_addr to support variant generation
e8955811c658 rtw89: add chip_info::{h2c,c2h}_reg to support more chips
ab8a56716b11 rtw89: add page_regs to handle v1 chips
79d099e022ae rtw89: 8852c: add chip::dle_mem
bdfbf06c2c28 rtw89: support DAV efuse reading operation
a82174c6a175 rtw89: 8852c: process efuse of phycap
ea37206459ac rtw89: 8852c: process logic efuse map
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852c.c b/drivers/net/wireless/realtek/rtw89/rtw8852c.c
new file mode 100644
index 0000000000000..cd0004b01ebc2
--- /dev/null
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852c.c
@@ -0,0 +1,20 @@ 
+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
+/* Copyright(c) 2019-2022  Realtek Corporation
+ */
+
+#include "rtw8852c.h"
+
+static const struct rtw89_chip_ops rtw8852c_chip_ops = {
+};
+
+const struct rtw89_chip_info rtw8852c_chip_info = {
+	.chip_id		= RTL8852C,
+	.ops			= &rtw8852c_chip_ops,
+	.fw_name		= "rtw89/rtw8852c_fw.bin",
+};
+EXPORT_SYMBOL(rtw8852c_chip_info);
+
+MODULE_FIRMWARE("rtw89/rtw8852c_fw.bin");
+MODULE_AUTHOR("Realtek Corporation");
+MODULE_DESCRIPTION("Realtek 802.11ax wireless 8852C driver");
+MODULE_LICENSE("Dual BSD/GPL");
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852c.h b/drivers/net/wireless/realtek/rtw89/rtw8852c.h
new file mode 100644
index 0000000000000..68a397223a814
--- /dev/null
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852c.h
@@ -0,0 +1,12 @@ 
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
+/* Copyright(c) 2019-2022  Realtek Corporation
+ */
+
+#ifndef __RTW89_8852C_H__
+#define __RTW89_8852C_H__
+
+#include "core.h"
+
+extern const struct rtw89_chip_info rtw8852c_chip_info;
+
+#endif
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852ce.c b/drivers/net/wireless/realtek/rtw89/rtw8852ce.c
new file mode 100644
index 0000000000000..ee700bba1eb10
--- /dev/null
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852ce.c
@@ -0,0 +1,36 @@ 
+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
+/* Copyright(c) 2020-2022  Realtek Corporation
+ */
+
+#include <linux/module.h>
+#include <linux/pci.h>
+
+#include "pci.h"
+#include "reg.h"
+#include "rtw8852c.h"
+
+static const struct rtw89_driver_info rtw89_8852ce_info = {
+	.chip = &rtw8852c_chip_info,
+};
+
+static const struct pci_device_id rtw89_8852ce_id_table[] = {
+	{
+		PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xc852),
+		.driver_data = (kernel_ulong_t)&rtw89_8852ce_info,
+	},
+	{},
+};
+MODULE_DEVICE_TABLE(pci, rtw89_8852ce_id_table);
+
+static struct pci_driver rtw89_8852ce_driver = {
+	.name		= "rtw89_8852ce",
+	.id_table	= rtw89_8852ce_id_table,
+	.probe		= rtw89_pci_probe,
+	.remove		= rtw89_pci_remove,
+	.driver.pm	= &rtw89_pm_ops,
+};
+module_pci_driver(rtw89_8852ce_driver);
+
+MODULE_AUTHOR("Realtek Corporation");
+MODULE_DESCRIPTION("Realtek 802.11ax wireless 8852CE driver");
+MODULE_LICENSE("Dual BSD/GPL");