1 /* 2 * Copyright (C) 2021 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 __MIPI_TX_H__ 20 #define __MIPI_TX_H__ 21 22 #include "hi_osal.h" 23 #include "type.h" 24 #include "hi_mipi_tx.h" 25 26 #define mipi_tx_unused(x) (void)(x) 27 28 #define hi_mipi_tx_err(x...) \ 29 do { \ 30 osal_printk("%s(%d): ", __FUNCTION__, __LINE__); \ 31 osal_printk(x); \ 32 } while (0) 33 34 #define mipi_tx_check_null_ptr_return(ptr) \ 35 do { \ 36 if ((ptr) == NULL) { \ 37 hi_mipi_tx_err("NULL point \r\n"); \ 38 return (-1); \ 39 } \ 40 } while (0) 41 42 typedef struct { 43 combo_dev_cfg_t dev_cfg; 44 } mipi_tx_dev_ctx_t; 45 46 #endif 47