1 /* 2 * Copyright (C) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 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 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #ifndef __FM11NT081D_H_ 20 #define __FM11NT081D_H_ 21 22 #include "hi_type.h" 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif /* __cplusplus */ 27 28 #define HINFC_DEVICE_NAME "hi_fm11nt081d" 29 #define HI_ID_NFC 'Y' 30 #define HAVE_UNLOCKED_IOCTL 1 31 32 #define NFC_MAX_CMD 2 33 #define NFC_READ _IOW(HI_ID_NFC, 0, int) 34 #define NFC_WRITE _IOR(HI_ID_NFC, 1, int) 35 36 #define NFC_DBG_FLAG 1 37 38 #ifdef NFC_DBG_FLAG 39 #define NFC_DBG(fmt, arg...) printk(KERN_INFO "nfc: " fmt "\n", ##arg) 40 #define NFC_INFO(fmt, arg...) printk(KERN_INFO "nfc: " fmt "\n", ##arg) 41 #define NFC_WARN(fmt, arg...) printk(KERN_WARNING "nfc: " fmt "\n", ##arg) 42 #define NFC_ERR(fmt, arg...) printk(KERN_ERR "nfc: " fmt "\n", ##arg) 43 #else 44 #define NFC_DBG(fmt, arg...) 45 #define NFC_INFO(fmt, arg...) 46 #define NFC_WARN(fmt, arg...) 47 #define NFC_ERR(fmt, arg...) 48 #endif 49 50 #ifdef __cplusplus 51 } 52 #endif /* __cplusplus */ 53 54 #endif 55