1 /*
2  * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #include "hdf_mipi_csi_entry_test.h"
10 #include "hdf_log.h"
11 #include "mipi_csi_test.h"
12 
13 #define HDF_LOG_TAG hdf_mipi_csi_entry_test
14 
HdfMipiCsiEntry(HdfTestMsg * msg)15 int32_t HdfMipiCsiEntry(HdfTestMsg *msg)
16 {
17     int32_t ret;
18     struct MipiCsiTest *test = NULL;
19 
20     if (msg == NULL) {
21         HDF_LOGE("HdfMipiCsiEntry: msg is null!");
22         return HDF_ERR_INVALID_OBJECT;
23     }
24 
25     test = MipiCsiTestServiceGet();
26     if (test == NULL) {
27         HDF_LOGE("HdfMipiCsiEntry: test is null!");
28         return HDF_ERR_INVALID_OBJECT;
29     }
30 
31     HDF_LOGI("HdfMipiCsiEntry: call [doTest]!");
32     ret = test->doTest(test, msg->subCmd);
33     msg->result = (int8_t)ret;
34 
35     return ret;
36 }
37