1 /* 2 * Copyright (C) 2022 Huawei Technologies Co., Ltd. 3 * Decription: function declaration for proc open,close session and invoke. 4 * 5 * This software is licensed under the terms of the GNU General Public 6 * License version 2, as published by the Free Software Foundation, and 7 * may be copied, distributed, and modified under those terms. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 */ 14 #ifndef TC_CLIENT_DRIVER_H 15 #define TC_CLIENT_DRIVER_H 16 17 #include <linux/list.h> 18 #include <linux/cdev.h> 19 #include "teek_ns_client.h" 20 21 struct dev_node { 22 struct class *driver_class; 23 struct cdev char_dev; 24 dev_t devt; 25 struct device *class_dev; 26 const struct file_operations *fops; 27 char *node_name; 28 }; 29 30 bool get_tz_init_flag(void); 31 struct tc_ns_dev_list *get_dev_list(void); 32 struct tc_ns_dev_file *tc_find_dev_file(unsigned int dev_file_id); 33 int tc_ns_client_open(struct tc_ns_dev_file **dev_file, uint8_t kernel_api); 34 int tc_ns_client_close(struct tc_ns_dev_file *dev); 35 int is_agent_alive(unsigned int agent_id); 36 37 #ifdef CONFIG_ACPI 38 int get_acpi_tz_irq(void); 39 #endif 40 41 #endif 42