commit 88928f66f7b38139ca156aa7c74a4cb990c4bdb7
Author: Nikhil Dasan <n-dasan@ti.com>
Date:   Mon Dec 11 18:02:41 2023 +0530

    UB953 UYVY Test Pattern
    
    Signed-off-by: Nikhil Dasan <n-dasan@ti.com>

diff --git a/sensor_drv/include/iss_sensors.h b/sensor_drv/include/iss_sensors.h
index 2224607..5f2301c 100755
--- a/sensor_drv/include/iss_sensors.h
+++ b/sensor_drv/include/iss_sensors.h
@@ -138,6 +138,7 @@ typedef enum
 #define SENSOR_ONSEMI_AR0233_UB953_MARS         "AR0233-UB953_MARS"
 #define SENSOR_ONSEMI_AR0820_UB953_LI         "AR0820-UB953_LI"
 #define UB9XX_RAW_TESTPAT                     "UB9xxx_RAW12_TESTPATTERN"
+#define UB953_UYVY_TESTPAT                     "UB953_UYVY_TESTPATTERN"
 #define UB96X_TESTPATTERN_UYVY                 "UB96x_UYVY_TESTPATTERN"
 #define GW_AR0233_UYVY                          "GW_AR0233_UYVY"
 #define SENSOR_OV2312_UB953_LI                  "OV2312-UB953_LI"
diff --git a/sensor_drv/src/concerto.mak b/sensor_drv/src/concerto.mak
index 14e9c5c..3d4b89a 100755
--- a/sensor_drv/src/concerto.mak
+++ b/sensor_drv/src/concerto.mak
@@ -10,6 +10,7 @@ CSOURCES    += ar0820/iss_sensor_ar0820.c
 CSOURCES    += ub9xx_raw_test_pattern/iss_sensor_raw_testpat.c
 CSOURCES    += ub9xx_yuv_test_pattern/iss_sensor_testpat.c
 CSOURCES    += gw_ar0233_yuv/iss_sensor_gw_ar0233.c
+CSOURCES    += ub953_UYVY_test_pattern/iss_sensor_UB953_UYVY_testpat.c
 
 IDIRS       += $(HOST_ROOT)/sensor_drv/include
 IDIRS       += $(VISION_APPS_PATH)/utils/remote_service/include
diff --git a/sensor_drv/src/iss_sensor_priv.h b/sensor_drv/src/iss_sensor_priv.h
index 24186ea..e37b81c 100755
--- a/sensor_drv/src/iss_sensor_priv.h
+++ b/sensor_drv/src/iss_sensor_priv.h
@@ -122,6 +122,7 @@ int32_t IssSensor_IMX390_Init();
 int32_t IssSensor_AR0233_Init();
 int32_t IssSensor_AR0820_Init();
 int32_t IssSensor_rawtestpat_Init();
+int32_t IssSensor_UB953_testpat_Init();
 int32_t IssSensor_testpat_Init();
 int32_t IssSensor_gw_ar0233_Init();
 
diff --git a/sensor_drv/src/iss_sensors.c b/sensor_drv/src/iss_sensors.c
index 093bc6c..4c9915e 100755
--- a/sensor_drv/src/iss_sensors.c
+++ b/sensor_drv/src/iss_sensors.c
@@ -637,6 +637,7 @@ int32_t IssSensor_Init()
     status |= IssSensor_AR0233_Init();
     status |= IssSensor_AR0820_Init();
     status |= IssSensor_rawtestpat_Init();
+    status |= IssSensor_UB953_testpat_Init();
     status |= IssSensor_testpat_Init();
     status |= IssSensor_gw_ar0233_Init();
 
diff --git a/sensor_drv/src/ub953_UYVY_test_pattern/UB953_UYVY_testpat_serdes_config.h b/sensor_drv/src/ub953_UYVY_test_pattern/UB953_UYVY_testpat_serdes_config.h
new file mode 100644
index 0000000..53ff1e6
--- /dev/null
+++ b/sensor_drv/src/ub953_UYVY_test_pattern/UB953_UYVY_testpat_serdes_config.h
@@ -0,0 +1,130 @@
+/*
+ *
+ * Copyright (c) 2020 Texas Instruments Incorporated
+ *
+ * All rights reserved not granted herein.
+ *
+ * Limited License.
+ *
+ * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
+ * license under copyrights and patents it now or hereafter owns or controls to make,
+ * have made, use, import, offer to sell and sell ("Utilize") this software subject to the
+ * terms herein.  With respect to the foregoing patent license, such license is granted
+ * solely to the extent that any such patent is necessary to Utilize the software alone.
+ * The patent license shall not apply to any combinations which include this software,
+ * other than combinations with devices manufactured by or for TI ("TI Devices").
+ * No hardware patent is licensed hereunder.
+ *
+ * Redistributions must preserve existing copyright notices and reproduce this license
+ * (including the above copyright notice and the disclaimer and (if applicable) source
+ * code license limitations below) in the documentation and/or other materials provided
+ * with the distribution
+ *
+ * Redistribution and use in binary form, without modification, are permitted provided
+ * that the following conditions are met:
+ *
+ * *       No reverse engineering, decompilation, or disassembly of this software is
+ * permitted with respect to any software provided in binary form.
+ *
+ * *       any redistribution and use are licensed by TI for use only with TI Devices.
+ *
+ * *       Nothing shall obligate TI to provide you with source code for the software
+ * licensed and provided to you in object code.
+ *
+ * If software source code is provided to you, modification and redistribution of the
+ * source code are permitted provided that the following conditions are met:
+ *
+ * *       any redistribution and use of the source code, including any resulting derivative
+ * works, are licensed by TI for use only with TI Devices.
+ *
+ * *       any redistribution and use of any object code compiled from the source code
+ * and any resulting derivative works, are licensed by TI for use only with TI Devices.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of its suppliers
+ *
+ * may be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * DISCLAIMER.
+ *
+ * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+#ifndef _TESTPAT_UB953_SERDES_H_
+#define _TESTPAT_UB953_SERDES_H_
+
+/**
+7-bit Alias addresses for sensor and serializer
+Physical addresses must be programmed in UB9xx config
+SoC will communicate with the devices using alias adresses 
+*/
+#define TESTPAT_OUT_WIDTH           (640U)
+#define TESTPAT_OUT_HEIGHT          (480U)
+#define TESTPAT_TOTAL_LINES         (TESTPAT_OUT_HEIGHT+45)
+
+#define TESTPAT_DES_CFG_SIZE    (39U)
+
+#define TESTPAT_OUT_BYTES_PER_LINE (TESTPAT_OUT_WIDTH * 2 )
+
+#define TESTPAT_BPLN_HIGH ((TESTPAT_OUT_BYTES_PER_LINE & 0xFF00)>>8)
+#define TESTPAT_BPLN_LOW  (TESTPAT_OUT_BYTES_PER_LINE & 0x00FF)
+
+#define TESTPAT_OUT_HEIGHT_HIGH ((TESTPAT_OUT_HEIGHT & 0xFF00)>>8)
+#define TESTPAT_OUT_HEIGHT_LOW  (TESTPAT_OUT_HEIGHT & 0x00FF)
+
+#define TESTPAT_TOTAL_LINES_HIGH ((TESTPAT_TOTAL_LINES & 0xFF00)>>8)
+#define TESTPAT_TOTAL_LINES_LOW  (TESTPAT_TOTAL_LINES & 0x00FF)
+
+I2cParams ub953SerCfg_UYVYTESTPAT[TESTPAT_DES_CFG_SIZE] = {
+    {0x01, 0x01, 0x80},
+    {0x02, 0x72, 0x10},
+    {0x06, 0x41, 0x1F},
+    {0x07, 0x25, 0x1F},
+    {0x0D, 0x03, 0x10},
+    {0xB0, 0x02, 0x1},                // IA_AUTO_INC=1
+    {0xB1, 0x01, 0x1},                // PGEN_CTL
+    {0xB2, 0x01, 0x1},                // PGEN_ENABLE=1
+    {0xB2, 0x34, 0x1},                // PGEN_CFG
+    {0xB2, 0x1E, 0x1},                // PGEN_CSI_DI
+    {0xB2, TESTPAT_BPLN_HIGH, 0x1},                // PGEN_LINE_SIZE1
+    {0xB2, TESTPAT_BPLN_LOW, 0x1},                // PGEN_LINE_SIZE0
+    {0xB2, 0x00, 0x1},                // PGEN_BAR_SIZE1
+    {0xB2, 0xA0, 0x1},                // PGEN_BAR_SIZE0
+    {0xB2, TESTPAT_OUT_HEIGHT_HIGH, 0x1},                // PGEN_ACT_LPF1
+    {0xB2, TESTPAT_OUT_HEIGHT_LOW, 0x1},                // PGEN_ACT_LPF0
+    {0xB2, TESTPAT_TOTAL_LINES_HIGH, 0x1},                // PGEN_TOT_LPF1
+    {0xB2, TESTPAT_TOTAL_LINES_LOW, 0x1},                // PGEN_TOT_LPF0
+    {0xB2, 0x18, 0x1},                // PGEN_LINE_PD1
+    {0xB2, 0xCD, 0x1},                // PGEN_LINE_PD0
+    {0xB2, 0x21, 0x1},                // PGEN_VBP
+    {0xB2, 0x0A, 0x1},                // PGEN_VFP
+    {0xB2, 0xAA, 0x1},                // PGEN_COLOR0
+    {0xB2, 0x33, 0x1},                // PGEN_COLOR1
+    {0xB2, 0xF0, 0x1},                // PGEN_COLOR2
+    {0xB2, 0x7F, 0x1},                // PGEN_COLOR3
+    {0xB2, 0x55, 0x1},                // PGEN_COLOR4
+    {0xB2, 0xCC, 0x1},                // PGEN_COLOR5
+    {0xB2, 0x0F, 0x1},                // PGEN_COLOR6
+    {0xB2, 0x80, 0x1},                // PGEN_COLOR7
+    {0xB2, 0x00, 0x1},                // PGEN_COLOR8
+    {0xB2, 0x00, 0x1},                // PGEN_COLOR9
+    {0xB2, 0x00, 0x1},                // PGEN_COLOR10
+    {0xB2, 0x00, 0x1},                // PGEN_COLOR11
+    {0xB2, 0x00, 0x1},                // PGEN_COLOR12
+    {0xB2, 0x00, 0x1},                // PGEN_COLOR13
+    {0xB2, 0x00, 0x1},                // PGEN_COLOR14
+    {0xB2, 0x00, 0x1},                // Reserved
+    {0xFFFF, 0x00, 0x0} /*End of script */
+};
+
+#endif /* _TESTPAT_UB953_SERDES_H_ */
+
diff --git a/sensor_drv/src/ub953_UYVY_test_pattern/iss_sensor_UB953_UYVY_testpat.c b/sensor_drv/src/ub953_UYVY_test_pattern/iss_sensor_UB953_UYVY_testpat.c
new file mode 100644
index 0000000..5171827
--- /dev/null
+++ b/sensor_drv/src/ub953_UYVY_test_pattern/iss_sensor_UB953_UYVY_testpat.c
@@ -0,0 +1,279 @@
+/*
+ *
+ * Copyright (c) 2020 Texas Instruments Incorporated
+ *
+ * All rights reserved not granted herein.
+ *
+ * Limited License.
+ *
+ * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
+ * license under copyrights and patents it now or hereafter owns or controls to make,
+ * have made, use, import, offer to sell and sell ("Utilize") this software subject to the
+ * terms herein.  With respect to the foregoing patent license, such license is granted
+ * solely to the extent that any such patent is necessary to Utilize the software alone.
+ * The patent license shall not apply to any combinations which include this software,
+ * other than combinations with devices manufactured by or for TI ("TI Devices").
+ * No hardware patent is licensed hereunder.
+ *
+ * Redistributions must preserve existing copyright notices and reproduce this license
+ * (including the above copyright notice and the disclaimer and (if applicable) source
+ * code license limitations below) in the documentation and/or other materials provided
+ * with the distribution
+ *
+ * Redistribution and use in binary form, without modification, are permitted provided
+ * that the following conditions are met:
+ *
+ * *       No reverse engineering, decompilation, or disassembly of this software is
+ * permitted with respect to any software provided in binary form.
+ *
+ * *       any redistribution and use are licensed by TI for use only with TI Devices.
+ *
+ * *       Nothing shall obligate TI to provide you with source code for the software
+ * licensed and provided to you in object code.
+ *
+ * If software source code is provided to you, modification and redistribution of the
+ * source code are permitted provided that the following conditions are met:
+ *
+ * *       any redistribution and use of the source code, including any resulting derivative
+ * works, are licensed by TI for use only with TI Devices.
+ *
+ * *       any redistribution and use of any object code compiled from the source code
+ * and any resulting derivative works, are licensed by TI for use only with TI Devices.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of its suppliers
+ *
+ * may be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * DISCLAIMER.
+ *
+ * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+#include "iss_sensor_UB953_UYVY_testpat.h"
+#include "UB953_UYVY_testpat_serdes_config.h"
+
+static IssSensor_CreateParams  testpat_CreatePrms = {
+    UB953_UYVY_TESTPAT,     /*sensor name*/
+    0x6,                             /*i2cInstId*/
+    {
+        SENSOR_0_I2C_ALIAS, SENSOR_1_I2C_ALIAS, SENSOR_2_I2C_ALIAS, SENSOR_3_I2C_ALIAS,
+        SENSOR_4_I2C_ALIAS, SENSOR_5_I2C_ALIAS, SENSOR_6_I2C_ALIAS, SENSOR_7_I2C_ALIAS,
+        SENSOR_8_I2C_ALIAS, SENSOR_9_I2C_ALIAS, SENSOR_10_I2C_ALIAS, SENSOR_11_I2C_ALIAS
+    },/*i2cAddrSensor*/
+    {
+        SER_0_I2C_ALIAS, SER_1_I2C_ALIAS, SER_2_I2C_ALIAS, SER_3_I2C_ALIAS,
+        SER_4_I2C_ALIAS, SER_5_I2C_ALIAS, SER_6_I2C_ALIAS, SER_7_I2C_ALIAS,
+        SER_8_I2C_ALIAS, SER_9_I2C_ALIAS, SER_10_I2C_ALIAS, SER_11_I2C_ALIAS
+    },/*i2cAddrSer*/
+    /*IssSensor_Info*/
+    {
+        {
+            TESTPAT_OUT_WIDTH,               /*width*/
+            TESTPAT_OUT_HEIGHT,              /*height*/
+            1,                              /*num_exposures*/
+            vx_false_e,                     /*line_interleaved*/
+            {
+                {VX_DF_IMAGE_UYVY, 7},    /*dataFormat and MSB [0]*/
+            },
+            0,                              /*meta_height_before*/
+            0,                              /*meta_height_after*/
+        },
+        ISS_SENSOR_TESTPAT_FEATURES,     /*features*/
+        ALGORITHMS_ISS_AEWB_MODE_NONE,  /*aewbMode*/
+        30,                             /*fps*/
+        4,                              /*numDataLanes*/
+        {1, 2, 3, 4},                   /*dataLanesMap*/
+        {0, 0, 0, 0},                   /*dataLanesPolarity*/
+        CSIRX_LANE_BAND_SPEED_1350_TO_1500_MBPS, /*csi_laneBandSpeed*/
+    },
+    12,                                  /*numChan*/
+    960,                                /*dccId*/
+};
+
+static IssSensorFxns           testpat_SensorFxns = {
+    testpat_Probe,
+    testpat_Config,
+    testpat_StreamOn,
+    testpat_StreamOff,
+    testpat_PowerOn,
+    testpat_PowerOff,
+    testpat_GetExpParams,
+    testpat_SetAeParams,
+    testpat_GetDccParams,
+    testpat_InitAewbConfig,
+    testpat_GetIspConfig,
+    testpat_ReadWriteReg,
+    testpat_GetExpPrgFxn,
+    testpat_deinit,
+    NULL,
+    NULL
+};
+
+static IssSensorIntfParams     testpat_SensorIntfPrms = {
+    0,             /*sensorBroadcast*/
+    0,             /*enableFsin*/
+    0,               /*numCamerasStreaming*/
+};
+
+IssSensorConfig     testpat_UB953SensorConfig = {
+    NULL,     /*desCfgPreScript*/
+    ub953SerCfg_UYVYTESTPAT,      /*serCfgPreScript*/
+    NULL,      /*sensorCfgPreScript*/
+    NULL,        /*desCfgPostScript*/
+    NULL,                    /*serCfgPostScript*/
+    NULL,                    /*sensorCfgPostScript*/
+};
+
+IssSensors_Handle testpat_UB953SensorHandle = {
+    1,                                 /*isUsed*/
+    &testpat_CreatePrms,                /*CreatePrms*/
+    &testpat_SensorFxns,                /*SensorFxns*/
+    &testpat_SensorIntfPrms,            /*SensorIntfPrms*/
+};
+
+/*
+ * \brief DCC Parameters of UYVYTESTPAT
+ */
+IssCapture_CmplxIoLaneCfg           testpat_Csi2CmplxIoLaneCfg;
+
+extern IssSensors_Handle * gIssSensorTable[ISS_SENSORS_MAX_SUPPORTED_SENSOR];
+
+int32_t IssSensor_UB953_testpat_Init()
+{
+    int32_t status;
+    status = IssSensor_Register(&testpat_UB953SensorHandle);
+    if(0 != status)
+    {
+        printf("IssSensor_testpat_Init failed \n");
+    }
+
+    return status;
+}
+
+/*******************************************************************************
+ *  Local Functions Definition
+ *******************************************************************************
+ */
+
+static int32_t testpat_Probe(uint32_t chId, void *pSensorHdl)
+{
+    int32_t status = 0;
+    /*
+        Probe is used only for auto-detecting cameras connected to an FPD Link port. 
+        UB97x test pattern is not a camera therefore it must not be auto-detected. 
+        To generate test pattern, users can manually select this source from the
+        application menu.
+    */
+
+    return (status);
+}
+
+static int32_t testpat_Config(uint32_t chId, void *pSensorHdl, uint32_t sensor_features_requested)
+{
+    int32_t status = 0;
+    uint32_t i2cInstId;
+    uint16_t sensor_cfg_script_len = 0;
+    I2cParams *sensorCfg = NULL;
+    I2cParams *serCfg = NULL;
+    IssSensors_Handle * pSenHandle = (IssSensors_Handle*)pSensorHdl;
+    IssSensor_CreateParams * pCreatePrms;
+
+    assert(NULL != pSenHandle);
+    pCreatePrms = pSenHandle->createPrms;
+    assert(NULL != pCreatePrms);
+
+    i2cInstId = pCreatePrms->i2cInstId;
+
+    serCfg = testpat_UB953SensorConfig.serCfgPreScript;
+
+    status = ub953_cfgScript(i2cInstId, pCreatePrms->i2cAddrSer[chId], serCfg);
+    if(0 != status)
+    {
+        printf("Error : UB953 config failed for camera # %d \n", chId);
+    }
+    return (status);
+}
+
+static int32_t testpat_StreamOn(uint32_t chId, void *pSensorHdl)
+{
+    int32_t status = 0;
+
+    status = enableUB960Streaming(chId);
+    return (status);
+}
+
+static int32_t testpat_StreamOff(uint32_t chId, void *pSensorHdl)
+{
+    int32_t status = 0;
+    status |= disableUB960Streaming(chId);
+    return (status);
+}
+
+static int32_t testpat_PowerOn(uint32_t chId, void *pSensorHdl)
+{
+    int32_t status = 0;
+
+    printf("IMX390_PowerOn : chId = 0x%x \n", chId);
+    return status;
+}
+
+static int32_t testpat_PowerOff(uint32_t chId, void *pSensorHdl)
+{
+    return (0);
+}
+
+static int32_t testpat_SetAeParams(void *pSensorHdl, uint32_t chId, IssSensor_ExposureParams *pExpPrms)
+{
+    int32_t status = 0;
+    return (status);
+}
+
+static int32_t testpat_GetDccParams(uint32_t chId, void *pSensorHdl, IssSensor_DccParams *pDccPrms)
+{
+    int32_t status = 0;
+    return (status);
+}
+
+static int32_t testpat_GetExpParams(uint32_t chId, void *pSensorHdl, IssSensor_ExposureParams *pExpPrms)
+{
+    int32_t status = 0;
+    return (status);
+}
+
+static void testpat_InitAewbConfig(uint32_t chId, void *pSensorHdl)
+{
+    return;
+}
+
+static void testpat_GetIspConfig (uint32_t chId, void *pSensorHdl)
+{
+    return;
+}
+
+static void testpat_deinit (uint32_t chId, void *pSensorHdl)
+{
+    return;
+}
+
+static int32_t testpat_ReadWriteReg (uint32_t chId, void *pSensorHdl, uint32_t readWriteFlag, I2cParams *pReg)
+{
+    int32_t status = 0;
+    return (status);
+}
+
+static int32_t testpat_GetExpPrgFxn(uint32_t chId, void *pSensorHdl, IssAeDynamicParams *p_ae_dynPrms)
+{
+    int32_t  status = 0;
+    return (status);
+}
+
diff --git a/sensor_drv/src/ub953_UYVY_test_pattern/iss_sensor_UB953_UYVY_testpat.h b/sensor_drv/src/ub953_UYVY_test_pattern/iss_sensor_UB953_UYVY_testpat.h
new file mode 100644
index 0000000..33e4257
--- /dev/null
+++ b/sensor_drv/src/ub953_UYVY_test_pattern/iss_sensor_UB953_UYVY_testpat.h
@@ -0,0 +1,92 @@
+/*
+ *
+ * Copyright (c) 2020 Texas Instruments Incorporated
+ *
+ * All rights reserved not granted herein.
+ *
+ * Limited License.
+ *
+ * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
+ * license under copyrights and patents it now or hereafter owns or controls to make,
+ * have made, use, import, offer to sell and sell ("Utilize") this software subject to the
+ * terms herein.  With respect to the foregoing patent license, such license is granted
+ * solely to the extent that any such patent is necessary to Utilize the software alone.
+ * The patent license shall not apply to any combinations which include this software,
+ * other than combinations with devices manufactured by or for TI ("TI Devices").
+ * No hardware patent is licensed hereunder.
+ *
+ * Redistributions must preserve existing copyright notices and reproduce this license
+ * (including the above copyright notice and the disclaimer and (if applicable) source
+ * code license limitations below) in the documentation and/or other materials provided
+ * with the distribution
+ *
+ * Redistribution and use in binary form, without modification, are permitted provided
+ * that the following conditions are met:
+ *
+ * *       No reverse engineering, decompilation, or disassembly of this software is
+ * permitted with respect to any software provided in binary form.
+ *
+ * *       any redistribution and use are licensed by TI for use only with TI Devices.
+ *
+ * *       Nothing shall obligate TI to provide you with source code for the software
+ * licensed and provided to you in object code.
+ *
+ * If software source code is provided to you, modification and redistribution of the
+ * source code are permitted provided that the following conditions are met:
+ *
+ * *       any redistribution and use of the source code, including any resulting derivative
+ * works, are licensed by TI for use only with TI Devices.
+ *
+ * *       any redistribution and use of any object code compiled from the source code
+ * and any resulting derivative works, are licensed by TI for use only with TI Devices.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of its suppliers
+ *
+ * may be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * DISCLAIMER.
+ *
+ * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+#include <iss_sensors.h>
+#include <iss_sensor_priv.h>
+#include <iss_sensor_if.h>
+
+/*******************************************************************************
+ *  Defines
+ *******************************************************************************
+ */
+
+#define ISS_SENSOR_TESTPAT_FEATURES      (ISS_SENSOR_FEATURE_DCC_SUPPORTED)
+
+/*******************************************************************************
+ *  Local Functions Declarations
+ *******************************************************************************
+ */
+
+static int32_t testpat_Probe(uint32_t chId, void *pSensorHdl);
+static int32_t testpat_Config(uint32_t chId, void *pSensorHdl, uint32_t sensor_features_requested);
+static int32_t testpat_StreamOn(uint32_t chId, void *pSensorHdl);
+static int32_t testpat_StreamOff(uint32_t chId, void *pSensorHdl);
+static int32_t testpat_PowerOn(uint32_t chId, void *pSensorHdl);
+static int32_t testpat_PowerOff(uint32_t chId, void *pSensorHdl);
+static int32_t testpat_GetExpParams(uint32_t chId, void *pSensorHdl, IssSensor_ExposureParams *pExpPrms);
+static int32_t testpat_SetAeParams(void *pSensorHdl, uint32_t chId, IssSensor_ExposureParams *pExpPrms);
+static int32_t testpat_GetDccParams(uint32_t chId, void *pSensorHdl, IssSensor_DccParams *pDccPrms);
+static void testpat_InitAewbConfig(uint32_t chId, void *pSensorHdl);
+static void testpat_GetIspConfig (uint32_t chId, void *pSensorHdl);
+static void testpat_deinit (uint32_t chId, void *pSensorHdl);
+static int32_t testpat_ReadWriteReg (uint32_t chId, void *pSensorHdl, uint32_t readWriteFlag, I2cParams *pReg);
+static int32_t testpat_GetExpPrgFxn(uint32_t chId, void *pSensorHdl, IssAeDynamicParams *p_ae_dynPrms);
+
