18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 28c2ecf20Sopenharmony_ci/* Copyright(c) 2018-2019 Realtek Corporation 38c2ecf20Sopenharmony_ci */ 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#ifndef __RTW_DEBUG_H 68c2ecf20Sopenharmony_ci#define __RTW_DEBUG_H 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_cienum rtw_debug_mask { 98c2ecf20Sopenharmony_ci RTW_DBG_PCI = 0x00000001, 108c2ecf20Sopenharmony_ci RTW_DBG_TX = 0x00000002, 118c2ecf20Sopenharmony_ci RTW_DBG_RX = 0x00000004, 128c2ecf20Sopenharmony_ci RTW_DBG_PHY = 0x00000008, 138c2ecf20Sopenharmony_ci RTW_DBG_FW = 0x00000010, 148c2ecf20Sopenharmony_ci RTW_DBG_EFUSE = 0x00000020, 158c2ecf20Sopenharmony_ci RTW_DBG_COEX = 0x00000040, 168c2ecf20Sopenharmony_ci RTW_DBG_RFK = 0x00000080, 178c2ecf20Sopenharmony_ci RTW_DBG_REGD = 0x00000100, 188c2ecf20Sopenharmony_ci RTW_DBG_DEBUGFS = 0x00000200, 198c2ecf20Sopenharmony_ci RTW_DBG_PS = 0x00000400, 208c2ecf20Sopenharmony_ci RTW_DBG_BF = 0x00000800, 218c2ecf20Sopenharmony_ci RTW_DBG_WOW = 0x00001000, 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci RTW_DBG_ALL = 0xffffffff 248c2ecf20Sopenharmony_ci}; 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#ifdef CONFIG_RTW88_DEBUGFS 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_civoid rtw_debugfs_init(struct rtw_dev *rtwdev); 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#else 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_cistatic inline void rtw_debugfs_init(struct rtw_dev *rtwdev) {} 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#endif /* CONFIG_RTW88_DEBUGFS */ 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#ifdef CONFIG_RTW88_DEBUG 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci__printf(3, 4) 398c2ecf20Sopenharmony_civoid __rtw_dbg(struct rtw_dev *rtwdev, enum rtw_debug_mask mask, 408c2ecf20Sopenharmony_ci const char *fmt, ...); 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci#define rtw_dbg(rtwdev, a...) __rtw_dbg(rtwdev, ##a) 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci#else 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_cistatic inline void rtw_dbg(struct rtw_dev *rtwdev, enum rtw_debug_mask mask, 478c2ecf20Sopenharmony_ci const char *fmt, ...) {} 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci#endif /* CONFIG_RTW88_DEBUG */ 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci#define rtw_info(rtwdev, a...) dev_info(rtwdev->dev, ##a) 528c2ecf20Sopenharmony_ci#define rtw_warn(rtwdev, a...) dev_warn(rtwdev->dev, ##a) 538c2ecf20Sopenharmony_ci#define rtw_err(rtwdev, a...) dev_err(rtwdev->dev, ##a) 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci#endif 56