1 /****************************************************************************** 2 * 3 * Copyright(c) 2019 Realtek Corporation. 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms of version 2 of the GNU General Public License as 7 * published by the Free Software Foundation. 8 * 9 * This program is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 * more details. 13 * 14 *****************************************************************************/ 15 #ifndef _PHL_PS_DBG_CMD_H_ 16 #define _PHL_PS_DBG_CMD_H_ 17 #ifdef CONFIG_POWER_SAVE 18 #define PS_CNSL(max_buff_len, used_len, buff_addr, remain_len, fmt, ...)\ 19 do { \ 20 u32 *used_len_tmp = &(used_len); \ 21 if (*used_len_tmp < max_buff_len) \ 22 *used_len_tmp += _os_snprintf(buff_addr, remain_len, fmt, ##__VA_ARGS__);\ 23 } while (0) 24 25 void phl_ps_cmd_parser(struct phl_info_t *phl_info, char input[][MAX_ARGV], 26 u32 input_num, char *output, u32 out_len); 27 void phl_ps_dbg_dump(struct phl_info_t *phl_info, u32 *used, 28 char input[][MAX_ARGV], u32 input_num, char *output, u32 out_len); 29 30 void phl_ps_dbg_stop_ps(struct phl_info_t *phl_info, u32 *used, 31 char input[][MAX_ARGV], u32 input_num, char *output, u32 out_len); 32 void phl_ps_dbg_test_ps(struct phl_info_t *phl_info, u32 *used, 33 char input[][MAX_ARGV], u32 input_num, char *output, u32 out_len); 34 35 #endif 36 #endif /* _PHL_PS_DBG_CMD_H_ */ 37 38