1 /* 2 * mipi_tx_dev.h 3 * 4 * hi35xx mipi_tx driver implement. 5 * 6 * Copyright (c) 2021 Huawei Device Co., Ltd. 7 * 8 * This software is licensed under the terms of the GNU General Public 9 * License version 2, as published by the Free Software Foundation, and 10 * may be copied, distributed, and modified under those terms. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 */ 18 19 #ifndef MIPI_TX_DEV_H 20 #define MIPI_TX_DEV_H 21 #include "hdf_base.h" 22 #include "mipi_dsi_if.h" 23 24 typedef struct { 25 struct DsiCmdDesc readCmd; 26 uint32_t readLen; 27 uint8_t *out; 28 } GetDsiCmdDescTag; 29 30 #define HI_MIPI_TX_IOC_MAGIC 't' 31 32 #define HI_MIPI_TX_SET_DEV_CFG _IOW(HI_MIPI_TX_IOC_MAGIC, 0x01, struct MipiCfg) 33 #define HI_MIPI_TX_SET_CMD _IOW(HI_MIPI_TX_IOC_MAGIC, 0x02, struct DsiCmdDesc) 34 #define HI_MIPI_TX_ENABLE _IO(HI_MIPI_TX_IOC_MAGIC, 0x03) 35 #define HI_MIPI_TX_GET_CMD _IOWR(HI_MIPI_TX_IOC_MAGIC, 0x04, GetDsiCmdDescTag) 36 #define HI_MIPI_TX_DISABLE _IO(HI_MIPI_TX_IOC_MAGIC, 0x05) 37 38 int32_t MipiDsiDevModuleInit(uint8_t id); 39 void MipiDsiDevModuleExit(uint8_t id); 40 41 #endif /* MIPI_TX_DEV_H */ 42