aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDaniel Hillenbrand <codeworkx@cyanogenmod.org>2013-05-25 10:53:54 +0200
committerDaniel Hillenbrand <codeworkx@cyanogenmod.org>2013-05-25 10:53:54 +0200
commit05f0203060035bd2cb8c8f98b8b466b934b1c45b (patch)
tree051a8c9d1a431b27fb5d4fecaf5417487857a400 /drivers
parentab6dfccd8d126b50059d39d031cfa1ddc8f32b84 (diff)
downloadkernel_samsung_smdk4412-05f0203060035bd2cb8c8f98b8b466b934b1c45b.zip
kernel_samsung_smdk4412-05f0203060035bd2cb8c8f98b8b466b934b1c45b.tar.gz
kernel_samsung_smdk4412-05f0203060035bd2cb8c8f98b8b466b934b1c45b.tar.bz2
u1: import from CyanogenMod/android_kernel_samsung_smdk4210
Change-Id: I9629a4060538c9c4c6a43a86a56826cd7123d1b5
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/keyboard/cypress/cypress-touchkey.c309
-rw-r--r--drivers/input/touchscreen/mxt224_u1.c8
-rw-r--r--drivers/media/video/Makefile2
-rw-r--r--drivers/media/video/m5mo.c11
-rw-r--r--drivers/media/video/m5mo.h8
-rw-r--r--drivers/media/video/s5k5bafx-v2.c323
-rw-r--r--drivers/media/video/s5k5bafx-v2.h55
-rw-r--r--drivers/media/video/s5k5bafx.c141
-rw-r--r--[-rwxr-xr-x]drivers/media/video/s5k5bafx.h12
-rw-r--r--drivers/media/video/s5k5bafx_regs-p8.h3
-rw-r--r--drivers/media/video/s5k5bafx_setfile.h1495
-rwxr-xr-xdrivers/media/video/s5k5bafx_setfile_lgt.h1495
-rw-r--r--drivers/media/video/samsung/fimc/fimc_capture_u1.c28
-rw-r--r--drivers/media/video/samsung/fimc/fimc_dev_u1.c6
-rw-r--r--drivers/media/video/samsung/mali/platform/mali_platform.h2
-rw-r--r--drivers/media/video/samsung/mali/platform/orion-m400/mali_platform_dvfs.c444
-rw-r--r--drivers/motor/max8997_vibrator.c91
-rw-r--r--drivers/video/samsung/mdnie_table_u1.h17
18 files changed, 4041 insertions, 409 deletions
diff --git a/drivers/input/keyboard/cypress/cypress-touchkey.c b/drivers/input/keyboard/cypress/cypress-touchkey.c
index f29fbb0..6ccd693 100644
--- a/drivers/input/keyboard/cypress/cypress-touchkey.c
+++ b/drivers/input/keyboard/cypress/cypress-touchkey.c
@@ -66,7 +66,7 @@ static int touchkey_keycode[] = { 0,
KEY_MENU, KEY_ENTER, KEY_BACK, KEY_END,
#elif defined(TK_USE_4KEY_TYPE_NA)
- KEY_SEARCH, KEY_BACK, KEY_HOMEPAGE, KEY_MENU,
+ KEY_SEARCH, KEY_BACK, KEY_HOME, KEY_MENU,
#elif defined(TK_USE_2KEY_TYPE_M0)
KEY_BACK, KEY_MENU,
@@ -161,10 +161,10 @@ static ssize_t brightness_control(struct device *dev,
int data;
if (sscanf(buf, "%d\n", &data) == 1) {
- printk(KERN_ERR "[TouchKey] touch_led_brightness: %d\n", data);
+ pr_err("[TouchKey] touch_led_brightness: %d\n", data);
change_touch_key_led_voltage(data);
} else {
- printk(KERN_ERR "[TouchKey] touch_led_brightness Error\n");
+ pr_err("[TouchKey] touch_led_brightness Error\n");
}
return size;
@@ -191,7 +191,7 @@ static int i2c_touchkey_read(struct i2c_client *client,
if ((client == NULL) || !(touchkey_enable == 1)
|| !touchkey_probe) {
- printk(KERN_ERR "[TouchKey] touchkey is not enabled. %d\n",
+ pr_err("[TouchKey] touchkey is not enabled. %d\n",
__LINE__);
return -ENODEV;
}
@@ -210,7 +210,7 @@ static int i2c_touchkey_read(struct i2c_client *client,
if (err >= 0)
return 0;
- printk(KERN_ERR "[TouchKey] %s %d i2c transfer error\n",
+ pr_err("[TouchKey] %s %d i2c transfer error\n",
__func__, __LINE__);
mdelay(10);
}
@@ -229,7 +229,7 @@ static int i2c_touchkey_write(struct i2c_client *client,
if ((client == NULL) || !(touchkey_enable == 1)
|| !touchkey_probe) {
- printk(KERN_ERR "[TouchKey] touchkey is not enabled. %d\n",
+ pr_err("[TouchKey] touchkey is not enabled. %d\n",
__LINE__);
return -ENODEV;
}
@@ -249,7 +249,7 @@ static int i2c_touchkey_write(struct i2c_client *client,
if (err >= 0)
return 0;
- printk(KERN_DEBUG "[TouchKey] %s %d i2c transfer error\n",
+ pr_debug("[TouchKey] %s %d i2c transfer error\n",
__func__, __LINE__);
mdelay(10);
}
@@ -272,11 +272,10 @@ static int touchkey_autocalibration(struct touchkey_i2c *tkey_i2c)
while (retry < 3) {
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 4);
if (ret < 0) {
- printk(KERN_ERR "[TouchKey]i2c read fail.\n");
+ pr_err("[TouchKey]i2c read fail.\n");
return ret;
}
- printk(KERN_DEBUG
- "[TouchKey] data[0]=%x data[1]=%x data[2]=%x data[3]=%x\n",
+ pr_debug("[TouchKey] data[0]=%x data[1]=%x data[2]=%x data[3]=%x\n",
data[0], data[1], data[2], data[3]);
/* Send autocal Command */
@@ -291,24 +290,23 @@ static int touchkey_autocalibration(struct touchkey_i2c *tkey_i2c)
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 6);
if ((data[5] & TK_BIT_AUTOCAL)) {
- printk(KERN_DEBUG "[Touchkey] autocal Enabled\n");
+ pr_debug("[Touchkey] autocal Enabled\n");
break;
} else
- printk(KERN_DEBUG
- "[Touchkey] autocal disabled, retry %d\n",
+ pr_debug("[Touchkey] autocal disabled, retry %d\n",
retry);
retry = retry + 1;
}
if (retry == 3)
- printk(KERN_DEBUG "[Touchkey] autocal failed\n");
+ pr_debug("[Touchkey] autocal failed\n");
return count;
}
#endif
-#ifdef CONFIG_TARGET_LOCALE_NAATT
+#if 0 /* CONFIG_TARGET_LOCALE_NAATT */
static ssize_t set_touchkey_autocal_testmode(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t size)
@@ -319,7 +317,7 @@ static ssize_t set_touchkey_autocal_testmode(struct device *dev,
int on_off;
if (sscanf(buf, "%d\n", &on_off) == 1) {
- printk(KERN_ERR "[TouchKey] Test Mode : %d\n", on_off);
+ pr_err("[TouchKey] Test Mode : %d\n", on_off);
if (on_off == 1) {
set_data = 0x40;
@@ -335,7 +333,7 @@ static ssize_t set_touchkey_autocal_testmode(struct device *dev,
#endif
}
} else {
- printk(KERN_ERR "[TouchKey] touch_led_brightness Error\n");
+ pr_err("[TouchKey] touch_led_brightness Error\n");
}
return count;
@@ -350,24 +348,24 @@ static ssize_t touchkey_raw_data0_show(struct device *dev,
u8 data[26] = { 0, };
int ret;
- printk(KERN_DEBUG "called %s\n", __func__);
+ pr_debug("called %s\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 26);
#if defined(CONFIG_TARGET_LOCALE_NA)
- printk(KERN_DEBUG "called %s data[18] =%d,data[19] = %d\n", __func__,
+ pr_debug("called %s data[18] =%d,data[19] = %d\n", __func__,
data[18], data[19]);
raw_data0 = ((0x00FF & data[18]) << 8) | data[19];
#elif defined(CONFIG_MACH_M0) || defined(CONFIG_MACH_C1)\
|| defined(CONFIG_MACH_M3)\
|| defined(CONFIG_MACH_T0)
- printk(KERN_DEBUG "called %s data[16] =%d,data[17] = %d\n", __func__,
+ pr_debug("called %s data[16] =%d,data[17] = %d\n", __func__,
data[16], data[17]);
raw_data0 = ((0x00FF & data[16]) << 8) | data[17]; /* menu*/
#elif defined(CONFIG_MACH_Q1_BD)
- printk(KERN_DEBUG "called %s data[16] =%d,data[17] = %d\n", __func__,
+ pr_debug("called %s data[16] =%d,data[17] = %d\n", __func__,
data[16], data[17]);
raw_data0 = ((0x00FF & data[14]) << 8) | data[15];
#else
- printk(KERN_DEBUG "called %s data[18] =%d,data[19] = %d\n", __func__,
+ pr_debug("called %s data[18] =%d,data[19] = %d\n", __func__,
data[10], data[11]);
raw_data0 = ((0x00FF & data[10]) << 8) | data[11];
#endif
@@ -381,24 +379,24 @@ static ssize_t touchkey_raw_data1_show(struct device *dev,
u8 data[26] = { 0, };
int ret;
- printk(KERN_DEBUG "called %s\n", __func__);
+ pr_debug("called %s\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 26);
#if defined(CONFIG_TARGET_LOCALE_NA)
- printk(KERN_DEBUG "called %s data[20] =%d,data[21] = %d\n", __func__,
+ pr_debug("called %s data[20] =%d,data[21] = %d\n", __func__,
data[20], data[21]);
raw_data1 = ((0x00FF & data[20]) << 8) | data[21];
#elif defined(CONFIG_MACH_M0) || defined(CONFIG_MACH_C1)\
|| defined(CONFIG_MACH_M3)\
|| defined(CONFIG_MACH_T0)
- printk(KERN_DEBUG "called %s data[14] =%d,data[15] = %d\n", __func__,
+ pr_debug("called %s data[14] =%d,data[15] = %d\n", __func__,
data[14], data[15]);
raw_data1 = ((0x00FF & data[14]) << 8) | data[15]; /*back*/
#elif defined(CONFIG_MACH_Q1_BD)
- printk(KERN_DEBUG "called %s data[14] =%d,data[15] = %d\n", __func__,
+ pr_debug("called %s data[14] =%d,data[15] = %d\n", __func__,
data[14], data[15]);
raw_data1 = ((0x00FF & data[16]) << 8) | data[17];
#else
- printk(KERN_DEBUG "called %s data[20] =%d,data[21] = %d\n", __func__,
+ pr_debug("called %s data[20] =%d,data[21] = %d\n", __func__,
data[12], data[13]);
raw_data1 = ((0x00FF & data[12]) << 8) | data[13];
#endif /* CONFIG_TARGET_LOCALE_NA */
@@ -412,14 +410,14 @@ static ssize_t touchkey_raw_data2_show(struct device *dev,
u8 data[26] = { 0, };
int ret;
- printk(KERN_DEBUG "called %s\n", __func__);
+ pr_debug("called %s\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 26);
#if defined(CONFIG_TARGET_LOCALE_NA)
- printk(KERN_DEBUG "called %s data[22] =%d,data[23] = %d\n", __func__,
+ pr_debug("called %s data[22] =%d,data[23] = %d\n", __func__,
data[22], data[23]);
raw_data2 = ((0x00FF & data[22]) << 8) | data[23];
#else
- printk(KERN_DEBUG "called %s data[22] =%d,data[23] = %d\n", __func__,
+ pr_debug("called %s data[22] =%d,data[23] = %d\n", __func__,
data[14], data[15]);
raw_data2 = ((0x00FF & data[14]) << 8) | data[15];
#endif /* CONFIG_TARGET_LOCALE_NA */
@@ -433,14 +431,14 @@ static ssize_t touchkey_raw_data3_show(struct device *dev,
u8 data[26] = { 0, };
int ret;
- printk(KERN_DEBUG "called %s\n", __func__);
+ pr_debug("called %s\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 26);
#if defined(CONFIG_TARGET_LOCALE_NA)
- printk(KERN_DEBUG "called %s data[24] =%d,data[25] = %d\n", __func__,
+ pr_debug("called %s data[24] =%d,data[25] = %d\n", __func__,
data[24], data[25]);
raw_data3 = ((0x00FF & data[24]) << 8) | data[25];
#else
- printk(KERN_DEBUG "called %s data[24] =%d,data[25] = %d\n", __func__,
+ pr_debug("called %s data[24] =%d,data[25] = %d\n", __func__,
data[16], data[17]);
raw_data3 = ((0x00FF & data[16]) << 8) | data[17];
#endif /* CONFIG_TARGET_LOCALE_NA */
@@ -458,9 +456,9 @@ static ssize_t touchkey_idac0_show(struct device *dev,
return 0;
#endif
- printk(KERN_DEBUG "called %s\n", __func__);
+ pr_debug("called %s\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 10);
- printk(KERN_DEBUG "called %s data[6] =%d\n", __func__, data[6]);
+ pr_debug("called %s data[6] =%d\n", __func__, data[6]);
idac0 = data[6];
return sprintf(buf, "%d\n", idac0);
}
@@ -476,9 +474,9 @@ static ssize_t touchkey_idac1_show(struct device *dev,
return 0;
#endif
- printk(KERN_DEBUG "called %s\n", __func__);
+ pr_debug("called %s\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 10);
- printk(KERN_DEBUG "called %s data[7] = %d\n", __func__, data[7]);
+ pr_debug("called %s data[7] = %d\n", __func__, data[7]);
idac1 = data[7];
return sprintf(buf, "%d\n", idac1);
}
@@ -494,9 +492,9 @@ static ssize_t touchkey_idac2_show(struct device *dev,
return 0;
#endif
- printk(KERN_DEBUG "called %s\n", __func__);
+ pr_debug("called %s\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 10);
- printk(KERN_DEBUG "called %s data[8] =%d\n", __func__, data[8]);
+ pr_debug("called %s data[8] =%d\n", __func__, data[8]);
idac2 = data[8];
return sprintf(buf, "%d\n", idac2);
}
@@ -512,9 +510,9 @@ static ssize_t touchkey_idac3_show(struct device *dev,
return 0;
#endif
- printk(KERN_DEBUG "called %s\n", __func__);
+ pr_debug("called %s\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 10);
- printk(KERN_DEBUG "called %s data[9] = %d\n", __func__, data[9]);
+ pr_debug("called %s data[9] = %d\n", __func__, data[9]);
idac3 = data[9];
return sprintf(buf, "%d\n", idac3);
}
@@ -526,9 +524,9 @@ static ssize_t touchkey_threshold_show(struct device *dev,
u8 data[10];
int ret;
- printk(KERN_DEBUG "called %s\n", __func__);
+ pr_debug("called %s\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 10);
- printk(KERN_DEBUG "called %s data[4] = %d\n", __func__, data[4]);
+ pr_debug("called %s data[4] = %d\n", __func__, data[4]);
touchkey_threshold = data[4];
return sprintf(buf, "%d\n", touchkey_threshold);
}
@@ -546,13 +544,12 @@ static int touchkey_firmware_update(struct touchkey_i2c *tkey_i2c)
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 3);
if (ret < 0) {
- printk(KERN_DEBUG
- "[TouchKey] i2c read fail. do not excute firm update.\n");
+ pr_debug("[TouchKey] i2c read fail. do not excute firm update.\n");
data[1] = 0;
data[2] = 0;
}
- printk(KERN_ERR "%s F/W version: 0x%x, Module version:0x%x\n", __func__,
+ pr_err("%s F/W version: 0x%x, Module version:0x%x\n", __func__,
data[1], data[2]);
tkey_i2c->firmware_ver = data[1];
@@ -566,39 +563,34 @@ static int touchkey_firmware_update(struct touchkey_i2c *tkey_i2c)
if ((tkey_i2c->firmware_ver < TK_FIRMWARE_VER) &&
(tkey_i2c->module_ver == TK_MODULE_VER)) {
#endif
- printk(KERN_DEBUG "[TouchKey] firmware auto update excute\n");
+ pr_debug("[TouchKey] firmware auto update excute\n");
tkey_i2c->update_status = TK_UPDATE_DOWN;
while (retry--) {
if (ISSP_main(tkey_i2c) == 0) {
- printk(KERN_DEBUG
- "[TouchKey]firmware update succeeded\n");
+ pr_debug("[TouchKey]firmware update succeeded\n");
tkey_i2c->update_status = TK_UPDATE_PASS;
msleep(50);
break;
}
msleep(50);
- printk(KERN_DEBUG
- "[TouchKey] firmware update failed. retry\n");
+ pr_debug("[TouchKey] firmware update failed. retry\n");
}
if (retry <= 0) {
tkey_i2c->pdata->power_on(0);
tkey_i2c->update_status = TK_UPDATE_FAIL;
- printk(KERN_DEBUG
- "[TouchKey] firmware update failed.\n");
+ pr_debug("[TouchKey] firmware update failed.\n");
}
ret = touchkey_i2c_check(tkey_i2c);
if (ret < 0) {
- printk(KERN_DEBUG
- "[TouchKey] i2c read fail.\n");
+ pr_debug("[TouchKey] i2c read fail.\n");
return TK_UPDATE_FAIL;
}
#if defined(CONFIG_TARGET_LOCALE_KOR)
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 3);
if (ret < 0) {
- printk(KERN_DEBUG
- "[TouchKey] i2c read fail. do not excute firm update.\n");
+ pr_debug("[TouchKey] i2c read fail. do not excute firm update.\n");
}
tkey_i2c->firmware_ver = data[1];
tkey_i2c->module_ver = data[2];
@@ -606,13 +598,10 @@ static int touchkey_firmware_update(struct touchkey_i2c *tkey_i2c)
printk(KERN_DEBUG "[TouchKey] firm ver = %d, module ver = %d\n",
tkey_i2c->firmware_ver, tkey_i2c->module_ver);
} else {
- printk(KERN_DEBUG
- "[TouchKey] firmware auto update do not excute\n");
- printk(KERN_DEBUG
- "[TouchKey] firmware_ver(banary=%d, current=%d)\n",
+ pr_debug("[TouchKey] firmware auto update do not excute\n");
+ pr_debug("[TouchKey] firmware_ver(banary=%d, current=%d)\n",
TK_FIRMWARE_VER, tkey_i2c->firmware_ver);
- printk(KERN_DEBUG
- "[TouchKey] module_ver(banary=%d, current=%d)\n",
+ pr_debug("[TouchKey] module_ver(banary=%d, current=%d)\n",
TK_MODULE_VER, tkey_i2c->module_ver);
}
enable_irq(tkey_i2c->irq);
@@ -627,12 +616,11 @@ static int touchkey_firmware_update(struct touchkey_i2c *tkey_i2c)
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 3);
if (ret < 0) {
- printk(KERN_DEBUG
- "[TouchKey] i2c read fail. do not excute firm update.\n");
+ pr_debug("[TouchKey] i2c read fail. do not excute firm update.\n");
return ret;
}
- printk(KERN_ERR "%s F/W version: 0x%x, Module version:0x%x\n", __func__,
+ pr_err("%s F/W version: 0x%x, Module version:0x%x\n", __func__,
data[1], data[2]);
retry = 3;
@@ -643,12 +631,11 @@ static int touchkey_firmware_update(struct touchkey_i2c *tkey_i2c)
tkey_i2c->update_status = TK_UPDATE_DOWN;
while (retry--) {
if (ISSP_main(tkey_i2c) == 0) {
- printk(KERN_ERR
- "[TOUCHKEY]Touchkey_update succeeded\n");
+ pr_err("[TOUCHKEY]Touchkey_update succeeded\n");
tkey_i2c->update_status = TK_UPDATE_PASS;
break;
}
- printk(KERN_ERR "touchkey_update failed...retry...\n");
+ pr_err("touchkey_update failed...retry...\n");
}
if (retry <= 0) {
tkey_i2c->pdata->power_on(0);
@@ -657,11 +644,9 @@ static int touchkey_firmware_update(struct touchkey_i2c *tkey_i2c)
}
} else {
if (tkey_i2c->firmware_ver >= 0x0A) {
- printk(KERN_ERR
- "[TouchKey] Not F/W update. Cypess touch-key F/W version is latest\n");
+ pr_err("[TouchKey] Not F/W update. Cypess touch-key F/W version is latest\n");
} else {
- printk(KERN_ERR
- "[TouchKey] Not F/W update. Cypess touch-key version(module or F/W) is not valid\n");
+ pr_err("[TouchKey] Not F/W update. Cypess touch-key version(module or F/W) is not valid\n");
}
}
return ret;
@@ -687,8 +672,7 @@ static irqreturn_t touchkey_interrupt(int irq, void *dev_id)
if (!ret)
break;
else {
- printk(KERN_DEBUG
- "[TouchKey] i2c read failed, ret:%d, retry: %d\n",
+ pr_debug("[TouchKey] i2c read failed, ret:%d, retry: %d\n",
ret, retry);
continue;
}
@@ -702,7 +686,7 @@ static irqreturn_t touchkey_interrupt(int irq, void *dev_id)
pressed = !(data[0] & TK_BIT_PRESS_EV);
if (keycode_type <= 0 || keycode_type >= touchkey_count) {
- printk(KERN_DEBUG "[Touchkey] keycode_type err\n");
+ pr_debug("[Touchkey] keycode_type err\n");
return IRQ_HANDLED;
}
@@ -735,13 +719,13 @@ static irqreturn_t touchkey_interrupt(int irq, void *dev_id)
}
if (get_tsp_status() && pressed)
- printk(KERN_DEBUG "[TouchKey] touchkey pressed but don't send event because touch is pressed.\n");
+ pr_debug("[TouchKey] touchkey pressed but don't send event because touch is pressed.\n");
else {
input_report_key(tkey_i2c->input_dev,
touchkey_keycode[keycode_type], pressed);
input_sync(tkey_i2c->input_dev);
#if !defined(CONFIG_SAMSUNG_PRODUCT_SHIP)
- printk(KERN_DEBUG "[TouchKey] keycode:%d pressed:%d\n",
+ pr_debug("[TouchKey] keycode:%d pressed:%d\n",
touchkey_keycode[keycode_type], pressed);
#else
pr_debug("[TouchKey] pressed:%d\n",
@@ -750,10 +734,10 @@ static irqreturn_t touchkey_interrupt(int irq, void *dev_id)
#if defined(CONFIG_TARGET_LOCALE_KOR)
if (g_debug_tkey == true) {
- printk(KERN_DEBUG "[TouchKey] keycode[%d]=%d pressed:%d\n",
+ pr_debug("[TouchKey] keycode[%d]=%d pressed:%d\n",
keycode_type, touchkey_keycode[keycode_type], pressed);
} else {
- printk(KERN_DEBUG "[TouchKey] pressed:%d\n", pressed);
+ pr_debug("[TouchKey] pressed:%d\n", pressed);
}
#endif
}
@@ -772,7 +756,7 @@ static irqreturn_t touchkey_interrupt(int irq, void *dev_id)
#if 0
if (gpio_get_value(_3_GPIO_TOUCH_INT)) {
- printk(KERN_DEBUG "[TouchKey] Unknown state.\n", __func__);
+ pr_debug("[TouchKey] Unknown state.\n", __func__);
return IRQ_HANDLED;
}
#endif
@@ -796,8 +780,7 @@ static irqreturn_t touchkey_interrupt(int irq, void *dev_id)
if (!ret)
break;
else {
- printk(KERN_DEBUG
- "[TouchKey] i2c read failed, ret:%d, retry: %d\n",
+ pr_debug("[TouchKey] i2c read failed, ret:%d, retry: %d\n",
ret, retry);
continue;
}
@@ -838,7 +821,7 @@ static irqreturn_t touchkey_interrupt(int irq, void *dev_id)
pressed = !(data[0] & TK_BIT_PRESS_EV);
if (keycode_type <= 0 || keycode_type >= touchkey_count) {
- printk(KERN_DEBUG "[Touchkey] keycode_type err\n");
+ pr_debug("[Touchkey] keycode_type err\n");
return IRQ_HANDLED;
}
@@ -847,7 +830,7 @@ static irqreturn_t touchkey_interrupt(int irq, void *dev_id)
}
if (get_tsp_status() && pressed)
- printk(KERN_DEBUG "[TouchKey] touchkey pressed"
+ pr_debug("[TouchKey] touchkey pressed"
" but don't send event because touch is pressed.\n");
else {
input_report_key(touchkey_driver->input_dev,
@@ -861,14 +844,14 @@ static irqreturn_t touchkey_interrupt(int irq, void *dev_id)
printk(KERN_DEBUG "search key sensitivity = %d\n",
search_sensitivity);
if (keycode_type == 2)
- printk(KERN_DEBUG "back key sensitivity = %d\n",
+ pr_debug("back key sensitivity = %d\n",
back_sensitivity);
#ifdef CONFIG_TARGET_LOCALE_NA
if (keycode_type == 3)
- printk(KERN_DEBUG "home key sensitivity = %d\n",
+ pr_debug("home key sensitivity = %d\n",
home_sensitivity);
if (keycode_type == 4)
- printk(KERN_DEBUG "menu key sensitivity = %d\n",
+ pr_debug("menu key sensitivity = %d\n",
menu_sensitivity);
#endif
@@ -888,7 +871,7 @@ static int sec_touchkey_early_suspend(struct early_suspend *h)
disable_irq(tkey_i2c->irq);
ret = cancel_work_sync(&tkey_i2c->update_work);
if (ret) {
- printk(KERN_DEBUG "[Touchkey] enable_irq ret=%d\n", ret);
+ pr_debug("[Touchkey] enable_irq ret=%d\n", ret);
enable_irq(tkey_i2c->irq);
}
@@ -901,9 +884,9 @@ static int sec_touchkey_early_suspend(struct early_suspend *h)
touchkey_enable = 0;
set_touchkey_debug('S');
- printk(KERN_DEBUG "[TouchKey] sec_touchkey_early_suspend\n");
+ pr_debug("[TouchKey] sec_touchkey_early_suspend\n");
if (touchkey_enable < 0) {
- printk(KERN_DEBUG "[TouchKey] ---%s---touchkey_enable: %d\n",
+ pr_debug("[TouchKey] ---%s---touchkey_enable: %d\n",
__func__, touchkey_enable);
return 0;
}
@@ -926,13 +909,13 @@ static int sec_touchkey_late_resume(struct early_suspend *h)
#endif
set_touchkey_debug('R');
- printk(KERN_DEBUG "[TouchKey] sec_touchkey_late_resume\n");
+ pr_debug("[TouchKey] sec_touchkey_late_resume\n");
/* enable ldo11 */
tkey_i2c->pdata->power_on(1);
if (touchkey_enable < 0) {
- printk(KERN_DEBUG "[TouchKey] ---%s---touchkey_enable: %d\n",
+ pr_debug("[TouchKey] ---%s---touchkey_enable: %d\n",
__func__, touchkey_enable);
return 0;
}
@@ -949,7 +932,7 @@ static int sec_touchkey_late_resume(struct early_suspend *h)
touchled_cmd_reversed = 0;
i2c_touchkey_write(tkey_i2c->client,
(u8 *) &touchkey_led_status, 1);
- printk(KERN_DEBUG "[Touchkey] LED returned on\n");
+ pr_debug("[Touchkey] LED returned on\n");
}
#ifdef TEST_JIG_MODE
i2c_touchkey_write(tkey_i2c->client, &get_touch, 1);
@@ -968,7 +951,7 @@ static int touchkey_i2c_check(struct touchkey_i2c *tkey_i2c)
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 3);
if (ret < 0) {
- printk(KERN_ERR "[TouchKey] module version read fail\n");
+ pr_err("[TouchKey] module version read fail\n");
return ret;
}
@@ -1000,8 +983,8 @@ static ssize_t touch_version_read(struct device *dev,
count = sprintf(buf, "0x%x\n", data[1]);
- printk(KERN_DEBUG "[TouchKey] touch_version_read 0x%x\n", data[1]);
- printk(KERN_DEBUG "[TouchKey] module_version_read 0x%x\n", data[2]);
+ pr_debug("[TouchKey] touch_version_read 0x%x\n", data[1]);
+ pr_debug("[TouchKey] module_version_read 0x%x\n", data[2]);
return count;
}
@@ -1023,16 +1006,15 @@ void touchkey_update_func(struct work_struct *work)
#if defined(CONFIG_TARGET_LOCALE_NAATT)
char data[3];
i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 3);
- printk(KERN_DEBUG "[%s] F/W version: 0x%x, Module version:0x%x\n",
+ pr_debug("[Touchkey] %s: F/W version: 0x%x, Module version:0x%x\n",
__func__, data[1], data[2]);
#endif
tkey_i2c->update_status = TK_UPDATE_DOWN;
- printk(KERN_DEBUG "[TouchKey] %s start\n", __func__);
+ pr_debug("[Touchkey] %s: start\n", __func__);
touchkey_enable = 0;
while (retry--) {
if (ISSP_main(tkey_i2c) == 0) {
- printk(KERN_DEBUG
- "[TouchKey] touchkey_update succeeded\n");
+ pr_debug("[TouchKey] touchkey_update succeeded\n");
msleep(50);
touchkey_enable = 1;
#if defined(TK_HAS_AUTOCAL)
@@ -1111,13 +1093,13 @@ static ssize_t touchkey_led_control(struct device *dev,
#endif
ret = sscanf(buf, "%d", &data);
if (ret != 1) {
- printk(KERN_DEBUG "[TouchKey] %s, %d err\n",
+ printk(KERN_DEBUG "[Touchkey] %s: %d err\n",
__func__, __LINE__);
return size;
}
if (data != 1 && data != 2) {
- printk(KERN_DEBUG "[TouchKey] %s wrong cmd %x\n",
+ printk(KERN_DEBUG "[Touchkey] %s: wrong cmd %x\n",
__func__, data);
return size;
}
@@ -1151,11 +1133,11 @@ static ssize_t touchkey_led_control(struct device *dev,
}
if (ret == -ENODEV) {
- printk(KERN_DEBUG"[Touchkey] error to write i2c\n");
+ pr_err("[Touchkey] error to write i2c\n");
touchled_cmd_reversed = 1;
}
- pr_debug("[TouchKey] %s touchkey_led_status=%d\n", __func__, data);
+ pr_debug("[Touchkey] %s: touchkey_led_status=%d\n", __func__, data);
touchkey_led_status = data;
return size;
@@ -1182,10 +1164,10 @@ static ssize_t touch_led_force_disable_store(struct device *dev,
ret = sscanf(buf, "%d\n", &data);
if (unlikely(ret != 1)) {
- pr_err("[Touchkey] %s err\n", __func__);
+ pr_err("[Touchkey] %s: err\n", __func__);
return -EINVAL;
}
- pr_info("[Touchkey] %s value=%d\n", __func__, data);
+ pr_info("[Touchkey] %s: value=%d\n", __func__, data);
if (data == 1) {
i2c_touchkey_write(tkey_i2c->client, (u8 *) &ledCmd[1], 1);
@@ -1218,10 +1200,10 @@ static ssize_t touch_led_timeout_store(struct device *dev,
ret = sscanf(buf, "%d\n", &data);
if (unlikely(ret != 1)) {
- pr_err("[TouchKey] %s err\n", __func__);
+ pr_err("[Touchkey] %s: err\n", __func__);
return -EINVAL;
}
- pr_info("[TouchKey] %s new timeout=%d\n", __func__, data);
+ pr_info("[Touchkey] %s: new timeout=%d\n", __func__, data);
touch_led_timeout = data;
return size;
@@ -1241,7 +1223,7 @@ void touch_led_timedout_work(struct work_struct *work)
if (touch_led_timeout != 0)
{
- pr_debug("[TouchKey] %s disabling touchled\n", __func__);
+ pr_debug("[Touchkey] %s: disabling touchled\n", __func__);
i2c_touchkey_write(tkey_i2c->client, (u8 *) &ledCmd[1], 1);
touchkey_led_status = TK_CMD_LED_OFF;
}
@@ -1254,21 +1236,21 @@ void touchscreen_state_report(int state)
if (touch_led_disabled == 0) {
if (state == 1) {
if(touchkey_led_status == TK_CMD_LED_OFF) {
- pr_debug("[TouchKey] %s enable touchleds\n", __func__);
+ pr_debug("[Touchkey] %s: enable touchleds\n", __func__);
i2c_touchkey_write(tkey_i2c_local->client, (u8 *) &ledCmd[0], 1);
touchkey_led_status = TK_CMD_LED_ON;
} else {
if (timer_pending(&touch_led_timer) == 1) {
- pr_debug("[TouchKey] %s mod_timer\n", __func__);
+ pr_debug("[Touchkey] %s: mod_timer\n", __func__);
mod_timer(&touch_led_timer, jiffies + (HZ * touch_led_timeout));
}
}
} else if (state == 0) {
if (timer_pending(&touch_led_timer) == 1) {
- pr_debug("[TouchKey] %s mod_timer\n", __func__);
+ pr_debug("[Touchkey] %s: mod_timer\n", __func__);
mod_timer(&touch_led_timer, jiffies + (HZ * touch_led_timeout));
} else if (touchkey_led_status == TK_CMD_LED_ON){
- pr_debug("[TouchKey] %s add_timer\n", __func__);
+ pr_debug("[Touchkey] %s: add_timer\n", __func__);
touch_led_timer.expires = jiffies + (HZ * touch_led_timeout);
add_timer(&touch_led_timer);
}
@@ -1276,7 +1258,7 @@ void touchscreen_state_report(int state)
}
}
-#if defined(TK_USE_4KEY)
+#if defined(TK_USE_4KEY) || defined(CONFIG_TARGET_LOCALE_NAATT) || defined(CONFIG_TARGET_LOCALE_NA)
static ssize_t touchkey_menu_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
@@ -1284,20 +1266,20 @@ static ssize_t touchkey_menu_show(struct device *dev,
u8 data[18] = { 0, };
int ret;
- printk(KERN_DEBUG "called %s\n", __func__);
+ pr_debug("[Touchkey] %s called\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 18);
#ifdef CONFIG_TARGET_LOCALE_NA
if (tkey_i2c->module_ver < 8) {
- printk(KERN_DEBUG "called %s data[12] =%d,data[13] = %d\n",
+ pr_debug("[Touchkey] %s: data[12] =%d,data[13] = %d\n",
__func__, data[12], data[13]);
menu_sensitivity = ((0x00FF & data[12]) << 8) | data[13];
} else {
- printk(KERN_DEBUG "called %s data[17] =%d\n", __func__,
+ pr_debug("[Touchkey] %s: data[17] =%d\n", __func__,
data[17]);
menu_sensitivity = data[17];
}
#else
- printk(KERN_DEBUG "called %s data[10] =%d,data[11] = %d\n", __func__,
+ pr_debug("[Touchkey] %s: data[10] =%d,data[11] = %d\n", __func__,
data[10], data[11]);
menu_sensitivity = ((0x00FF & data[10]) << 8) | data[11];
#endif /* CONFIG_TARGET_LOCALE_NA */
@@ -1311,20 +1293,20 @@ static ssize_t touchkey_home_show(struct device *dev,
u8 data[18] = { 0, };
int ret;
- printk(KERN_DEBUG "called %s\n", __func__);
+ pr_debug("[TouchKey] %s called\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 18);
#ifdef CONFIG_TARGET_LOCALE_NA
if (tkey_i2c->module_ver < 8) {
- printk(KERN_DEBUG "called %s data[10] =%d,data[11] = %d\n",
+ pr_debug("[Touchkey] %s: data[10] =%d,data[11] = %d\n",
__func__, data[10], data[11]);
home_sensitivity = ((0x00FF & data[10]) << 8) | data[11];
} else {
- printk(KERN_DEBUG "called %s data[15] =%d\n", __func__,
+ pr_debug("[Touchkey] %s: data[15] =%d\n", __func__,
data[15]);
home_sensitivity = data[15];
}
#else
- printk(KERN_DEBUG "called %s data[12] =%d,data[13] = %d\n", __func__,
+ pr_debug("[Touchkey] %s: data[12] =%d,data[13] = %d\n", __func__,
data[12], data[13]);
home_sensitivity = ((0x00FF & data[12]) << 8) | data[13];
#endif /* CONFIG_TARGET_LOCALE_NA */
@@ -1338,20 +1320,20 @@ static ssize_t touchkey_back_show(struct device *dev,
u8 data[18] = { 0, };
int ret;
- printk(KERN_DEBUG "called %s\n", __func__);
+ pr_debug("[TouchKey] %s called\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 18);
#ifdef CONFIG_TARGET_LOCALE_NA
if (tkey_i2c->module_ver < 8) {
- printk(KERN_DEBUG "called %s data[8] =%d,data[9] = %d\n",
+ pr_debug("[Touchkey] %s: data[8] =%d,data[9] = %d\n",
__func__, data[8], data[9]);
back_sensitivity = ((0x00FF & data[8]) << 8) | data[9];
} else {
- printk(KERN_DEBUG "called %s data[13] =%d\n", __func__,
+ pr_debug("[Touchkey] %s: data[13] =%d\n", __func__,
data[13]);
back_sensitivity = data[13];
}
#else
- printk(KERN_DEBUG "called %s data[14] =%d,data[15] = %d\n", __func__,
+ pr_debug("[Touchkey] %s: data[14] =%d,data[15] = %d\n", __func__,
data[14], data[15]);
back_sensitivity = ((0x00FF & data[14]) << 8) | data[15];
#endif /* CONFIG_TARGET_LOCALE_NA */
@@ -1365,20 +1347,20 @@ static ssize_t touchkey_search_show(struct device *dev,
u8 data[18] = { 0, };
int ret;
- printk(KERN_DEBUG "called %s\n", __func__);
+ pr_debug("[TouchKey] %s called\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 18);
#ifdef CONFIG_TARGET_LOCALE_NA
if (tkey_i2c->module_ver < 8) {
- printk(KERN_DEBUG "called %s data[6] =%d,data[7] = %d\n",
+ pr_debug("[Touchkey] %s: data[6] =%d,data[7] = %d\n",
__func__, data[6], data[7]);
search_sensitivity = ((0x00FF & data[6]) << 8) | data[7];
} else {
- printk(KERN_DEBUG "called %s data[11] =%d\n", __func__,
+ pr_debug("[Touchkey] %s: data[11] =%d\n", __func__,
data[11]);
search_sensitivity = data[11];
}
#else
- printk(KERN_DEBUG "called %s data[16] =%d,data[17] = %d\n", __func__,
+ pr_debug("[Touchkey] %s: data[16] =%d,data[17] = %d\n", __func__,
data[16], data[17]);
search_sensitivity = ((0x00FF & data[16]) << 8) | data[17];
#endif /* CONFIG_TARGET_LOCALE_NA */
@@ -1397,13 +1379,13 @@ static ssize_t touchkey_menu_show(struct device *dev,
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 14);
- printk(KERN_DEBUG "called %s data[13] =%d\n", __func__, data[13]);
+ pr_debug("[Touchkey] %s: data[13] =%d\n", __func__, data[13]);
menu_sensitivity = data[13];
#else
u8 data[10];
int ret;
- printk(KERN_DEBUG "called %s\n", __func__);
+ pr_debug("[TouchKey] %s called\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 10);
menu_sensitivity = data[7];
#endif
@@ -1422,13 +1404,13 @@ static ssize_t touchkey_back_show(struct device *dev,
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 14);
- printk(KERN_DEBUG "called %s data[11] =%d\n", __func__, data[11]);
+ pr_debug("[Touchkey] %s: data[11] =%d\n", __func__, data[11]);
back_sensitivity = data[11];
#else
u8 data[10];
int ret;
- printk(KERN_DEBUG "called %s\n", __func__);
+ pr_debug("[TouchKey] %s called\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 10);
back_sensitivity = data[9];
#endif
@@ -1459,7 +1441,7 @@ static ssize_t autocalibration_status(struct device *dev,
int ret;
struct touchkey_i2c *tkey_i2c = dev_get_drvdata(dev);
- printk(KERN_DEBUG "[Touchkey] %s\n", __func__);
+ pr_debug("[Touchkey] %s\n", __func__);
ret = i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 6);
if ((data[5] & TK_BIT_AUTOCAL))
@@ -1505,20 +1487,19 @@ static ssize_t set_touchkey_update_show(struct device *dev,
while (retry--) {
if (ISSP_main(tkey_i2c) == 0) {
- printk(KERN_ERR
- "[TouchKey]Touchkey_update succeeded\n");
+ pr_err("[TouchKey] Touchkey_update succeeded\n");
tkey_i2c->update_status = TK_UPDATE_PASS;
count = 1;
msleep(50);
break;
}
- printk(KERN_ERR "touchkey_update failed... retry...\n");
+ pr_err("[TouchKey] touchkey_update failed... retry...\n");
}
if (retry <= 0) {
/* disable ldo11 */
tkey_i2c->pdata->power_on(0);
count = 0;
- printk(KERN_ERR "[TouchKey]Touchkey_update fail\n");
+ pr_err("[TouchKey] Touchkey_update fail\n");
tkey_i2c->update_status = TK_UPDATE_FAIL;
enable_irq(tkey_i2c->irq);
return count;
@@ -1549,8 +1530,8 @@ static ssize_t set_touchkey_firm_version_read_show(struct device *dev,
i2c_touchkey_read(tkey_i2c->client, KEYCODE_REG, data, 3);
count = sprintf(buf, "0x%x\n", data[1]);
- printk(KERN_DEBUG "[TouchKey] touch_version_read 0x%x\n", data[1]);
- printk(KERN_DEBUG "[TouchKey] module_version_read 0x%x\n", data[2]);
+ pr_debug("[TouchKey] touch_version_read 0x%x\n", data[1]);
+ pr_debug("[TouchKey] module_version_read 0x%x\n", data[2]);
return count;
}
@@ -1561,8 +1542,7 @@ static ssize_t set_touchkey_firm_status_show(struct device *dev,
struct touchkey_i2c *tkey_i2c = dev_get_drvdata(dev);
int count = 0;
- printk(KERN_DEBUG
- "[TouchKey] touch_update_read: update_status %d\n",
+ pr_debug("[TouchKey] touch_update_read: update_status %d\n",
tkey_i2c->update_status);
if (tkey_i2c->update_status == TK_UPDATE_PASS)
@@ -1606,7 +1586,7 @@ static DEVICE_ATTR(touchkey_brightness, S_IRUGO | S_IWUSR | S_IWGRP, NULL,
brightness_control);
#endif
-#if defined(CONFIG_TARGET_LOCALE_NAATT)
+#if 0 /* #if defined(CONFIG_TARGET_LOCALE_NAATT) */
static DEVICE_ATTR(touchkey_autocal_start, S_IRUGO | S_IWUSR | S_IWGRP, NULL,
set_touchkey_autocal_testmode);
#endif
@@ -1645,7 +1625,7 @@ static struct attribute *touchkey_attributes[] = {
#ifdef LED_LDO_WITH_REGULATOR
&dev_attr_touchkey_brightness.attr,
#endif
-#if defined(CONFIG_TARGET_LOCALE_NAATT)
+#if 0/* defined(CONFIG_TARGET_LOCALE_NAATT) */
&dev_attr_touchkey_autocal_start.attr,
#endif
#if defined(TK_HAS_AUTOCAL)
@@ -1682,7 +1662,7 @@ static int i2c_touchkey_probe(struct i2c_client *client,
int i;
int ret;
- printk(KERN_DEBUG "[TouchKey] i2c_touchkey_probe\n");
+ pr_debug("[TouchKey] i2c_touchkey_probe\n");
if (pdata == NULL) {
printk(KERN_ERR "%s: no pdata\n", __func__);
@@ -1692,7 +1672,7 @@ static int i2c_touchkey_probe(struct i2c_client *client,
/*Check I2C functionality */
ret = i2c_check_functionality(client->adapter, I2C_FUNC_I2C);
if (ret == 0) {
- printk(KERN_ERR "[Touchkey] No I2C functionality found\n");
+ pr_err("[Touchkey] No I2C functionality found\n");
ret = -ENODEV;
return ret;
}
@@ -1700,7 +1680,7 @@ static int i2c_touchkey_probe(struct i2c_client *client,
/*Obtain kernel memory space for touchkey i2c */
tkey_i2c = kzalloc(sizeof(struct touchkey_i2c), GFP_KERNEL);
if (NULL == tkey_i2c) {
- printk(KERN_ERR "[Touchkey] failed to allocate tkey_i2c.\n");
+ pr_err("[Touchkey] failed to allocate tkey_i2c.\n");
return -ENOMEM;
}
tkey_i2c_local = tkey_i2c;
@@ -1708,7 +1688,7 @@ static int i2c_touchkey_probe(struct i2c_client *client,
input_dev = input_allocate_device();
if (!input_dev) {
- printk(KERN_ERR "[Touchkey] failed to allocate input device\n");
+ pr_err("[Touchkey] failed to allocate input device\n");
kfree(tkey_i2c);
return -ENOMEM;
}
@@ -1737,7 +1717,7 @@ static int i2c_touchkey_probe(struct i2c_client *client,
ret = input_register_device(input_dev);
if (ret) {
- printk(KERN_ERR "[Touchkey] failed to register input device\n");
+ pr_err("[Touchkey] failed to register input device\n");
input_free_device(input_dev);
kfree(tkey_i2c);
return err;
@@ -1755,27 +1735,24 @@ static int i2c_touchkey_probe(struct i2c_client *client,
tkey_i2c->dev = device_create(sec_class, NULL, 0, NULL, "sec_touchkey");
if (IS_ERR(tkey_i2c->dev)) {
- printk(KERN_ERR "Failed to create device(tkey_i2c->dev)!\n");
+ pr_err("[TouchKey] Failed to create device(tkey_i2c->dev)!\n");
input_unregister_device(input_dev);
} else {
dev_set_drvdata(tkey_i2c->dev, tkey_i2c);
ret = sysfs_create_group(&tkey_i2c->dev->kobj,
&touchkey_attr_group);
if (ret) {
- printk(KERN_ERR
- "[TouchKey]: failed to create sysfs group\n");
+ pr_err("[TouchKey]: failed to create sysfs group\n");
}
}
#if defined(CONFIG_MACH_M0) || defined(CONFIG_MACH_C1)
gpio_request(GPIO_OLED_DET, "OLED_DET");
ret = gpio_get_value(GPIO_OLED_DET);
- printk(KERN_DEBUG
- "[TouchKey] OLED_DET = %d\n", ret);
+ pr_debug("[TouchKey] OLED_DET = %d\n", ret);
if (ret == 0) {
- printk(KERN_DEBUG
- "[TouchKey] device wasn't connected to board\n");
+ pr_debug("[TouchKey] device wasn't connected to board\n");
input_unregister_device(input_dev);
touchkey_probe = false;
@@ -1784,7 +1761,7 @@ static int i2c_touchkey_probe(struct i2c_client *client,
#else
ret = touchkey_i2c_check(tkey_i2c);
if (ret < 0) {
- printk(KERN_DEBUG"[TouchKey] probe failed\n");
+ pr_debug("[TouchKey] probe failed\n");
input_unregister_device(input_dev);
touchkey_probe = false;
return -EBUSY;
@@ -1796,7 +1773,7 @@ static int i2c_touchkey_probe(struct i2c_client *client,
IRQF_DISABLED | IRQF_TRIGGER_FALLING |
IRQF_ONESHOT, tkey_i2c->name, tkey_i2c);
if (ret < 0) {
- printk(KERN_ERR "[Touchkey]: failed to request irq(%d) - %d\n",
+ pr_err("[Touchkey]: failed to request irq(%d) - %d\n",
tkey_i2c->irq, ret);
input_unregister_device(input_dev);
touchkey_probe = false;
@@ -1808,7 +1785,7 @@ static int i2c_touchkey_probe(struct i2c_client *client,
#if defined(TK_HAS_FIRMWARE_UPDATE)
ret = touchkey_firmware_update(tkey_i2c);
if (ret < 0) {
- printk(KERN_ERR "[Touchkey]: failed firmware updating process (%d)\n",
+ pr_err("[Touchkey]: failed firmware updating process (%d)\n",
ret);
input_unregister_device(input_dev);
touchkey_probe = false;
@@ -1833,7 +1810,7 @@ static int i2c_touchkey_probe(struct i2c_client *client,
tkey_i2c->wq = create_singlethread_workqueue("tkey_i2c_wq");
if (!tkey_i2c->wq) {
ret = -ENOMEM;
- pr_err("%s: could not create workqueue\n", __func__);
+ pr_err("[Touchkey] %s: could not create workqueue\n", __func__);
}
/* this is the thread function we run on the work queue */
@@ -1856,13 +1833,13 @@ static int __init touchkey_init(void)
#if defined(CONFIG_MACH_M0)
if (system_rev < TOUCHKEY_FW_UPDATEABLE_HW_REV) {
- printk(KERN_DEBUG "[Touchkey] Doesn't support this board rev %d\n",
+ pr_debug("[Touchkey] Doesn't support this board rev %d\n",
system_rev);
return 0;
}
#elif defined(CONFIG_MACH_C1)
if (system_rev < TOUCHKEY_FW_UPDATEABLE_HW_REV) {
- printk(KERN_DEBUG "[Touchkey] Doesn't support this board rev %d\n",
+ pr_debug("[Touchkey] Doesn't support this board rev %d\n",
system_rev);
return 0;
}
@@ -1875,7 +1852,7 @@ static int __init touchkey_init(void)
ret = i2c_add_driver(&touchkey_i2c_driver);
if (ret) {
- printk(KERN_ERR "[TouchKey] registration failed, module not inserted.ret= %d\n",
+ pr_err("[TouchKey] registration failed, module not inserted.ret= %d\n",
ret);
}
#ifdef TEST_JIG_MODE
@@ -1891,7 +1868,7 @@ static int __init touchkey_init(void)
static void __exit touchkey_exit(void)
{
- printk(KERN_DEBUG "[TouchKey] %s\n", __func__);
+ pr_debug("[TouchKey] %s\n", __func__);
i2c_del_driver(&touchkey_i2c_driver);
}
diff --git a/drivers/input/touchscreen/mxt224_u1.c b/drivers/input/touchscreen/mxt224_u1.c
index f4368e8..ffda78f 100644
--- a/drivers/input/touchscreen/mxt224_u1.c
+++ b/drivers/input/touchscreen/mxt224_u1.c
@@ -28,6 +28,8 @@
#include <mach/cpufreq.h>
#include <linux/input/mt.h>
+#include "../keyboard/cypress/cypress-touchkey.h"
+
#define OBJECT_TABLE_START_ADDRESS 7
#define OBJECT_TABLE_ELEMENT_SIZE 6
@@ -187,7 +189,7 @@ struct mxt224_data {
bool median_err_flag;
int touch_is_pressed_arr[MAX_USING_FINGER_NUM];
-#if defined(CONFIG_TARGET_LOCALE_NAATT)
+#if defined(CONFIG_TARGET_LOCALE_NAATT) || defined(CONFIG_TARGET_LOCALE_NAATT_TEMP)
bool gain_change_flag;
int gain_ta;
#endif
@@ -1337,6 +1339,10 @@ static void report_input_data(struct mxt224_data *data)
copy_data->lock_status = 1;
}
}
+
+ /* tell cypress keypad we had finger activity */
+ touchscreen_state_report(touch_is_pressed);
+
}
void palm_recovery(void)
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index 1ad29ec..64f0f5b 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -80,7 +80,7 @@ obj-$(CONFIG_VIDEO_M9MO) += m9mo.o
ifeq ($(CONFIG_MACH_PX),y)
obj-$(CONFIG_VIDEO_S5K5BAFX) += s5k5bafx-v2.o
else
-obj-$(CONFIG_VIDEO_S5K5BAFX) += s5k5bafx.o
+obj-$(CONFIG_VIDEO_S5K5BAFX) += s5k5bafx-v2.o
obj-$(CONFIG_VIDEO_S5K5BBGX) += s5k5bbgx.o
endif
obj-$(CONFIG_VIDEO_S5K5CCGX_COMMON) += s5k5ccgx.o
diff --git a/drivers/media/video/m5mo.c b/drivers/media/video/m5mo.c
index d411269..9d29368 100644
--- a/drivers/media/video/m5mo.c
+++ b/drivers/media/video/m5mo.c
@@ -174,8 +174,6 @@ static struct m5mo_control m5mo_ctrls[] = {
},
};
-struct class *camera_class;
-
static inline struct m5mo_state *to_state(struct v4l2_subdev *sd)
{
return container_of(sd, struct m5mo_state, sd);
@@ -2935,8 +2933,8 @@ static int __devinit m5mo_probe(struct i2c_client *client,
state->dbg_level = CAM_DEBUG;
#endif
if (state->m5mo_dev == NULL) {
- state->m5mo_dev =
- device_create(camera_class, NULL, 0, NULL, "rear");
+ state->m5mo_dev = device_create(camera_class, NULL,
+ MKDEV(CAM_MAJOR, 0), NULL, "rear");
if (IS_ERR(state->m5mo_dev)) {
cam_err("failed to create device m5mo_dev!\n");
} else {
@@ -2983,7 +2981,7 @@ static int __devexit m5mo_remove(struct i2c_client *client)
device_remove_file(state->m5mo_dev, &dev_attr_rear_camtype);
device_remove_file(state->m5mo_dev, &dev_attr_rear_camfw);
- device_destroy(camera_class, 0);
+ device_destroy(camera_class, state->m5mo_dev->devt);
state->m5mo_dev = NULL;
if (state->isp.irq > 0)
@@ -3014,9 +3012,6 @@ static struct i2c_driver m5mo_i2c_driver = {
static int __init m5mo_mod_init(void)
{
- camera_class = class_create(THIS_MODULE, "camera");
- if (IS_ERR(camera_class))
- pr_err("Failed to create class(camera)!\n");
return i2c_add_driver(&m5mo_i2c_driver);
}
diff --git a/drivers/media/video/m5mo.h b/drivers/media/video/m5mo.h
index 6218eba..b1621c7 100644
--- a/drivers/media/video/m5mo.h
+++ b/drivers/media/video/m5mo.h
@@ -12,6 +12,8 @@
#include <linux/wakelock.h>
+#define CAM_MAJOR 119
+
#define CONFIG_CAM_DEBUG
#define cam_warn(fmt, ...) \
@@ -189,6 +191,12 @@ struct m5mo_state {
int anti_banding;
};
+extern struct class *camera_class;
+
+/*
+ * ISP CMD Category Definitions
+ */
+
/* Category */
#define M5MO_CATEGORY_SYS 0x00
#define M5MO_CATEGORY_PARM 0x01
diff --git a/drivers/media/video/s5k5bafx-v2.c b/drivers/media/video/s5k5bafx-v2.c
index 24b0ef1..903214b 100644
--- a/drivers/media/video/s5k5bafx-v2.c
+++ b/drivers/media/video/s5k5bafx-v2.c
@@ -24,9 +24,7 @@
#include "s5k5bafx-v2.h"
#ifdef CONFIG_CPU_FREQ
#include <mach/cpufreq.h>
-#endif
-#ifdef S5K5BAFX_USLEEP
-#include <linux/hrtimer.h>
+#include <linux/cpufreq.h>
#endif
static const struct s5k5bafx_fps s5k5bafx_framerates[] = {
@@ -67,37 +65,33 @@ static const struct s5k5bafx_regs reg_datas = {
},
.preview_start = S5K5BAFX_REGSET_TABLE(s5k5bafx_preview),
.capture_start = S5K5BAFX_REGSET_TABLE(s5k5bafx_capture),
- .init = S5K5BAFX_REGSET_TABLE(s5k5bafx_common),
- .init_vt = S5K5BAFX_REGSET_TABLE(s5k5bafx_vt_common),
- .init_vt_wifi = S5K5BAFX_REGSET_TABLE(s5k5bafx_vt_wifi_common),
-#if defined(CONFIG_TARGET_LOCALE_KOR) || \
- defined(CONFIG_TARGET_LOCALE_NAATT) || \
- defined(CONFIG_MACH_P8LTE)
- .init_recording = S5K5BAFX_REGSET_TABLE(s5k5bafx_recording_60Hz_common),
-#else
- .init_recording = S5K5BAFX_REGSET_TABLE(s5k5bafx_recording_50Hz_common),
+ .init = {
+ S5K5BAFX_REGSET(CAM_VT_MODE_NONE,
+ s5k5bafx_common),
+ S5K5BAFX_REGSET(CAM_VT_MODE_3G,
+ s5k5bafx_vt_common),
+ S5K5BAFX_REGSET(CAM_VT_MODE_VOIP,
+ s5k5bafx_vt_wifi_common),
+#ifdef CONFIG_MACH_U1
+ S5K5BAFX_REGSET(CAM_VT_MODE_FD,
+ s5k5bafx_FD_common),
#endif
+ },
+ .init_recording = {
+ S5K5BAFX_REGSET(ANTI_BANDING_AUTO,
+ s5k5bafx_recording_50Hz_common),
+ S5K5BAFX_REGSET(ANTI_BANDING_50HZ,
+ s5k5bafx_recording_50Hz_common),
+ S5K5BAFX_REGSET(ANTI_BANDING_60HZ,
+ s5k5bafx_recording_60Hz_common),
+ },
.stream_stop = S5K5BAFX_REGSET_TABLE(s5k5bafx_stream_stop),
+#ifdef SUPPORT_FACTORY_TEST
.dtp_on = S5K5BAFX_REGSET_TABLE(s5k5bafx_pattern_on),
.dtp_off = S5K5BAFX_REGSET_TABLE(s5k5bafx_pattern_off),
+#endif
};
-/**
- * Use msleep() if the sleep time is over 1000 us.
- */
-static void __used s5k5bafx_usleep(u32 usecs)
-{
- ktime_t expires;
- u64 add_time = (u64)usecs * 1000;
-
- if (unlikely(!usecs))
- return;
-
- expires = ktime_add_ns(ktime_get(), add_time);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_hrtimeout(&expires, HRTIMER_MODE_ABS);
-}
-
static inline int s5k5bafx_read(struct i2c_client *client,
u16 subaddr, u16 *data)
{
@@ -434,7 +428,7 @@ static int s5k5bafx_write_regs_from_sd(struct v4l2_subdev *sd, u8 s_name[])
if ((temp & S5K5BAFX_DELAY) == S5K5BAFX_DELAY) {
delay = temp & 0xFFFF;
- debug_msleep(sd, delay);
+ msleep_debug(sd, delay);
continue;
}
@@ -513,7 +507,7 @@ static int s5k5bafx_write_regs(struct v4l2_subdev *sd,
if ((temp & S5K5BAFX_DELAY) == S5K5BAFX_DELAY) {
delay = temp & 0xFFFF;
- debug_msleep(sd, delay);
+ msleep_debug(sd, delay);
continue;
}
@@ -572,9 +566,10 @@ s5k5bafx_burst_write:
}
#ifdef S5K5BAFX_USLEEP
- if (unlikely(state->vt_mode))
+ if (unlikely(state->vt_mode)) {
if (!(num%200))
- s5k5bafx_usleep(3);
+ usleep_range(3, 5)
+ }
#endif
}
@@ -764,7 +759,7 @@ static int s5k5bafx_set_preview_start(struct v4l2_subdev *sd)
if (state->check_dataline)
err = s5k5bafx_check_dataline(sd, 1);
#endif
- CHECK_ERR_MSG(err, "fail to make preview\n")
+ CHECK_ERR_MSG(err, "fail to make preview\n");
return 0;
}
@@ -843,12 +838,8 @@ static int s5k5bafx_init_regs(struct v4l2_subdev *sd)
return 0;
}
-#ifdef NEW_CAM_DRV
static int s5k5bafx_g_mbus_fmt(struct v4l2_subdev *sd,
struct v4l2_mbus_framefmt *fmt)
-#else
-static int s5k5bafx_g_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt)
-#endif
{
cam_trace("E\n");
return 0;
@@ -897,12 +888,8 @@ static int s5k5bafx_enum_frameintervals(struct v4l2_subdev *sd,
}
#endif
-#ifdef NEW_CAM_DRV
static int s5k5bafx_try_mbus_fmt(struct v4l2_subdev *sd,
struct v4l2_mbus_framefmt *fmt)
-#else
-static int s5k5bafx_try_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt)
-#endif
{
int err = 0;
@@ -911,12 +898,8 @@ static int s5k5bafx_try_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt)
return err;
}
-#ifdef NEW_CAM_DRV
static int s5k5bafx_s_mbus_fmt(struct v4l2_subdev *sd,
struct v4l2_mbus_framefmt *fmt)
-#else
-static int s5k5bafx_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt)
-#endif
{
struct s5k5bafx_state *state = to_state(sd);
u32 *width = NULL, *height = NULL;
@@ -927,12 +910,8 @@ static int s5k5bafx_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt)
* We need to check here what are the formats the camera support, and
* set the most appropriate one according to the request from FIMC
*/
-#ifdef NEW_CAM_DRV
v4l2_fill_pix_format(&state->req_fmt, fmt);
state->req_fmt.priv = fmt->field;
-#else
- memcpy(&state->req_fmt, &fmt->fmt.pix, sizeof(fmt->fmt.pix));
-#endif
switch (state->req_fmt.priv) {
case V4L2_PIX_FMT_MODE_PREVIEW:
@@ -991,6 +970,82 @@ static int s5k5bafx_set_frame_rate(struct v4l2_subdev *sd, u32 fps)
return 0;
}
+static int s5k5bafx_set_exposure(struct v4l2_subdev *sd, s32 val)
+{
+ struct s5k5bafx_state *state = to_state(sd);
+ int err = -EINVAL;
+
+ cam_info("set_exposure: val=%d\n", val);
+
+#ifdef SUPPORT_FACTORY_TEST
+ if (state->check_dataline)
+ return 0;
+#endif
+ if ((val < EV_MINUS_4) || (val >= EV_MAX_V4L2)) {
+ cam_err("%s: ERROR, invalid value(%d)\n", __func__, val);
+ return -EINVAL;
+ }
+
+ err = s5k5bafx_set_from_table(sd, "ev", state->regs->ev,
+ ARRAY_SIZE(state->regs->ev), GET_EV_INDEX(val));
+ CHECK_ERR_MSG(err, "i2c_write for set brightness\n")
+
+ return 0;
+}
+
+static int s5k5bafx_set_blur(struct v4l2_subdev *sd, s32 val)
+{
+ struct s5k5bafx_state *state = to_state(sd);
+ int err = -EINVAL;
+
+ cam_info("set_blur: val=%d\n", val);
+
+#ifdef SUPPORT_FACTORY_TEST
+ if (state->check_dataline)
+ return 0;
+#endif
+ if (unlikely(val < BLUR_LEVEL_0 || val >= BLUR_LEVEL_MAX)) {
+ cam_err("%s: ERROR, Invalid blur(%d)\n", __func__, val);
+ return -EINVAL;
+ }
+
+ err = s5k5bafx_set_from_table(sd, "blur", state->regs->blur,
+ ARRAY_SIZE(state->regs->blur), val);
+ CHECK_ERR_MSG(err, "i2c_write for set blur\n")
+
+ return 0;
+}
+
+static int s5k5bafx_set_vtmode(struct v4l2_subdev *sd, s32 val)
+{
+ struct s5k5bafx_state *state = to_state(sd);
+
+ cam_dbg("set_vtmode %d\n", val);
+
+ if (unlikely((u32)val >= CAM_VT_MODE_MAX)) {
+ cam_err("vt_mode: not supported (%d)\n", val);
+ state->vt_mode = CAM_VT_MODE_NONE;
+ } else
+ state->vt_mode = val;
+
+ return 0;
+}
+
+static int s5k5bafx_set_antibanding(struct v4l2_subdev *sd, s32 val)
+{
+ struct s5k5bafx_state *state = to_state(sd);
+
+ cam_dbg("set_antibanding [%d],[%d]\n", state->anti_banding, val);
+
+ if (unlikely((u32)val >= ANTI_BANDING_MAX)) {
+ cam_err("antibanding: not supported (%d)\n", val);
+ state->anti_banding = ANTI_BANDING_AUTO;
+ } else
+ state->anti_banding = val;
+
+ return 0;
+}
+
static int s5k5bafx_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms)
{
int err = 0;
@@ -1077,7 +1132,7 @@ static int s5k5bafx_wait_steamoff(struct v4l2_subdev *sd)
if (state->pdata->streamoff_delay > elapsed_msec) {
cam_info("stream-off: %dms + %dms\n", elapsed_msec,
state->pdata->streamoff_delay - elapsed_msec);
- debug_msleep(sd, state->pdata->streamoff_delay - elapsed_msec);
+ msleep_debug(sd, state->pdata->streamoff_delay - elapsed_msec);
} else
cam_info("stream-off: %dms\n", elapsed_msec);
@@ -1091,7 +1146,7 @@ static int s5k5bafx_control_stream(struct v4l2_subdev *sd, u32 cmd)
struct s5k5bafx_state *state = to_state(sd);
int err = -EINVAL;
- if (unlikely(cmd != STREAM_STOP))
+ if (unlikely(!state->pdata->is_mipi || (cmd != STREAM_STOP)))
return 0;
cam_info("STREAM STOP!!\n");
@@ -1103,7 +1158,7 @@ static int s5k5bafx_control_stream(struct v4l2_subdev *sd, u32 cmd)
do_gettimeofday(&state->stream_time.before_time);
state->need_wait_streamoff = 1;
#else
- debug_msleep(sd, state->pdata->streamoff_delay);
+ msleep_debug(sd, state->pdata->streamoff_delay);
#endif
return 0;
}
@@ -1129,32 +1184,25 @@ static int s5k5bafx_init(struct v4l2_subdev *sd, u32 val)
#endif
/* set initial regster value */
if (state->sensor_mode == SENSOR_CAMERA) {
- if (!state->vt_mode) {
- cam_info("load camera common setting\n");
- err = s5k5bafx_set_from_table(sd, "init",
- &state->regs->init, 1, 0);
- } else {
- if (state->vt_mode == 1) {
- cam_info("load camera VT call setting\n");
- err = s5k5bafx_set_from_table(sd, "init_vt",
- &state->regs->init_vt, 1, 0);
- } else {
- cam_info("load camera WIFI VT call setting\n");
- err = s5k5bafx_set_from_table(sd,
- "init_vt_wifi",
- &state->regs->init_vt_wifi, 1, 0);
- }
- }
+ cam_info("load camera common (vt %d)\n", *state->init_mode);
+ err = s5k5bafx_set_from_table(sd, "init",
+ state->regs->init, ARRAY_SIZE(state->regs->init),
+ *state->init_mode);
} else {
- cam_info("load recording setting\n");
+ cam_info("load recording (anti %d)\n", state->anti_banding);
err = s5k5bafx_set_from_table(sd, "init_recording",
- &state->regs->init_recording, 1, 0);
+ state->regs->init_recording,
+ ARRAY_SIZE(state->regs->init_recording),
+ state->anti_banding);
}
#if defined(CONFIG_USE_SW_I2C) && defined(CONFIG_CPU_FREQ)
exynos_cpufreq_lock_free(DVFS_LOCK_ID_CAM);
#endif
CHECK_ERR_MSG(err, "failed to initialize camera device\n");
+ if (state->pdata->init_streamoff)
+ s5k5bafx_control_stream(sd, STREAM_STOP);
+
state->initialized = 1;
if (state->req_fps >= 0) {
@@ -1224,6 +1272,14 @@ static int s5k5bafx_s_config(struct v4l2_subdev *sd,
else
state->req_fmt.pixelformat = state->pdata->pixelformat;
+#if defined(CONFIG_TARGET_LOCALE_KOR) || \
+ defined(CONFIG_TARGET_LOCALE_NAATT) || \
+ defined(CONFIG_MACH_P8LTE)
+ s5k5bafx_set_antibanding(sd, ANTI_BANDING_60HZ);
+#endif
+
+ state->init_mode = &state->vt_mode;
+
#ifdef CONFIG_LOAD_FILE
err = loadFile();
CHECK_ERR_MSG(err, "failed to load file ERR=%d\n", err)
@@ -1303,52 +1359,6 @@ static int s5k5bafx_s_stream(struct v4l2_subdev *sd, int enable)
return 0;
}
-static int s5k5bafx_set_exposure(struct v4l2_subdev *sd, s32 val)
-{
- struct s5k5bafx_state *state = to_state(sd);
- int err = -EINVAL;
-
- cam_info("set_exposure: val=%d\n", val);
-
-#ifdef SUPPORT_FACTORY_TEST
- if (state->check_dataline)
- return 0;
-#endif
- if ((val < EV_MINUS_4) || (val >= EV_MAX_V4L2)) {
- cam_err("%s: ERROR, invalid value(%d)\n", __func__, val);
- return -EINVAL;
- }
-
- err = s5k5bafx_set_from_table(sd, "ev", state->regs->ev,
- ARRAY_SIZE(state->regs->ev), GET_EV_INDEX(val));
- CHECK_ERR_MSG(err, "i2c_write for set brightness\n")
-
- return 0;
-}
-
-static int s5k5bafx_set_blur(struct v4l2_subdev *sd, s32 val)
-{
- struct s5k5bafx_state *state = to_state(sd);
- int err = -EINVAL;
-
- cam_info("set_blur: val=%d\n", val);
-
-#ifdef SUPPORT_FACTORY_TEST
- if (state->check_dataline)
- return 0;
-#endif
- if (unlikely(val < BLUR_LEVEL_0 || val >= BLUR_LEVEL_MAX)) {
- cam_err("%s: ERROR, Invalid blur(%d)\n", __func__, val);
- return -EINVAL;
- }
-
- err = s5k5bafx_set_from_table(sd, "blur", state->regs->blur,
- ARRAY_SIZE(state->regs->blur), val);
- CHECK_ERR_MSG(err, "i2c_write for set blur\n")
-
- return 0;
-}
-
#if (0)
static int s5k5bafx_check_dataline_stop(struct v4l2_subdev *sd)
{
@@ -1413,7 +1423,7 @@ static int s5k5bafx_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
break;
case V4L2_CID_CAMERA_VT_MODE:
- state->vt_mode = ctrl->value;
+ err = s5k5bafx_set_vtmode(sd, ctrl->value);
break;
case V4L2_CID_CAMERA_SENSOR_MODE:
@@ -1430,6 +1440,10 @@ static int s5k5bafx_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
err = s5k5bafx_check_sensor_status(sd);
break;
+ case V4L2_CID_CAMERA_ANTI_BANDING:
+ err = s5k5bafx_set_antibanding(sd, ctrl->value);
+ break;
+
#ifdef SUPPORT_FACTORY_TEST
case V4L2_CID_CAMERA_CHECK_DATALINE:
state->check_dataline = ctrl->value;
@@ -1453,33 +1467,19 @@ static int s5k5bafx_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
static const struct v4l2_subdev_core_ops s5k5bafx_core_ops = {
.init = s5k5bafx_init, /* initializing API */
-#if 0
- .queryctrl = s5k5bafx_queryctrl,
- .querymenu = s5k5bafx_querymenu,
-#endif
.g_ctrl = s5k5bafx_g_ctrl,
.s_ctrl = s5k5bafx_s_ctrl,
};
static const struct v4l2_subdev_video_ops s5k5bafx_video_ops = {
/*.s_crystal_freq = s5k5bafx_s_crystal_freq,*/
-#ifdef NEW_CAM_DRV
.g_mbus_fmt = s5k5bafx_g_mbus_fmt,
.s_mbus_fmt = s5k5bafx_s_mbus_fmt,
-#else
- .g_fmt = s5k5bafx_g_fmt,
- .s_fmt = s5k5bafx_s_fmt,
-#endif
.s_stream = s5k5bafx_s_stream,
.enum_framesizes = s5k5bafx_enum_framesizes,
/*.enum_frameintervals = s5k5bafx_enum_frameintervals,*/
-#ifdef NEW_CAM_DRV
/* .enum_mbus_fmt = s5k5bafx_enum_mbus_fmt, */
.try_mbus_fmt = s5k5bafx_try_mbus_fmt,
-#else
- /*.enum_fmt = s5k5bafx_enum_fmt,*/
- .try_fmt = s5k5bafx_try_fmt,
-#endif
.g_parm = s5k5bafx_g_parm,
.s_parm = s5k5bafx_s_parm,
};
@@ -1489,6 +1489,7 @@ static const struct v4l2_subdev_ops s5k5bafx_ops = {
.video = &s5k5bafx_video_ops,
};
+#if !defined(CONFIG_MACH_PX)
ssize_t s5k5bafx_camera_type_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
@@ -1498,7 +1499,54 @@ ssize_t s5k5bafx_camera_type_show(struct device *dev,
return sprintf(buf, "%s\n", cam_type);
}
-static DEVICE_ATTR(camera_type, S_IRUGO, s5k5bafx_camera_type_show, NULL);
+static DEVICE_ATTR(front_camtype, S_IRUGO, s5k5bafx_camera_type_show, NULL);
+
+ssize_t s5k5bafx_startup_time_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ cam_info("%s\n", __func__);
+
+ return sprintf(buf, "%d\n", SMARTSTAY_STARTUP_TIME);
+}
+
+static DEVICE_ATTR(startup_time, S_IRUGO, s5k5bafx_startup_time_show, NULL);
+
+static struct device *s5k5bafx_sysdev;
+
+static int s5k5bafx_create_sysfs(void)
+{
+ cam_dbg("%s\n", __func__);
+
+ s5k5bafx_sysdev = device_create(camera_class, NULL,
+ MKDEV(CAM_MAJOR, 1), NULL, "front");
+ if (IS_ERR(s5k5bafx_sysdev)) {
+ cam_err("failed to create device s5k5bafx_dev!\n");
+ return 0;
+ }
+
+ if (device_create_file(s5k5bafx_sysdev, &dev_attr_front_camtype) < 0) {
+ cam_err("failed to create device file, %s\n",
+ dev_attr_front_camtype.attr.name);
+ }
+
+ if (device_create_file(s5k5bafx_sysdev, &dev_attr_startup_time) < 0) {
+ cam_err("failed to create device file, %s\n",
+ dev_attr_startup_time.attr.name);
+ }
+
+ return 0;
+}
+
+static int s5k5bafx_remove_sysfs(void)
+{
+ device_remove_file(s5k5bafx_sysdev, &dev_attr_front_camtype);
+ device_remove_file(s5k5bafx_sysdev, &dev_attr_startup_time);
+ device_destroy(camera_class, s5k5bafx_sysdev->devt);
+ s5k5bafx_sysdev = NULL;
+
+ return 0;
+}
+#endif /* !CONFIG_MACH_PX */
/*
* s5k5bafx_probe
@@ -1546,7 +1594,6 @@ static int s5k5bafx_remove(struct i2c_client *client)
state->initialized = 0;
- device_remove_file(&client->dev, &dev_attr_camera_type);
v4l2_device_unregister_subdev(sd);
#ifdef S5K5BAFX_BURST_MODE
kfree(state->burst_buf);
@@ -1580,13 +1627,19 @@ static struct i2c_driver v4l2_i2c_driver = {
static int __init v4l2_i2c_drv_init(void)
{
- pr_info("%s: %s called\n", __func__, S5K5BAFX_DRIVER_NAME); /* dslim*/
+ pr_debug("%s: init\n", S5K5BAFX_DRIVER_NAME);
+#if !defined(CONFIG_MACH_PX)
+ s5k5bafx_create_sysfs();
+#endif
return i2c_add_driver(&v4l2_i2c_driver);
}
static void __exit v4l2_i2c_drv_cleanup(void)
{
- pr_info("%s: %s called\n", __func__, S5K5BAFX_DRIVER_NAME); /* dslim*/
+ pr_debug("%s: clean\n", S5K5BAFX_DRIVER_NAME);
+#if !defined(CONFIG_MACH_PX)
+ s5k5bafx_remove_sysfs();
+#endif
i2c_del_driver(&v4l2_i2c_driver);
}
diff --git a/drivers/media/video/s5k5bafx-v2.h b/drivers/media/video/s5k5bafx-v2.h
index 78a095b..97dd7cc 100644
--- a/drivers/media/video/s5k5bafx-v2.h
+++ b/drivers/media/video/s5k5bafx-v2.h
@@ -24,13 +24,14 @@
#define S5K5BAFX_BURST_MODE
/* #define CONFIG_LOAD_FILE */
/* #define SUPPORT_FACTORY_TEST */
-#define NEW_CAM_DRV
/** Debuging Feature **/
-/* #define CONFIG_CAM_DEBUG */
+#define CONFIG_CAM_DEBUG
/* #define CONFIG_CAM_TRACE *//* Enable it with CONFIG_CAM_DEBUG */
/***********************************/
+#define CAM_MAJOR 119
+
#define TAG_NAME "["S5K5BAFX_DRIVER_NAME"]"" "
#define cam_err(fmt, ...) \
printk(KERN_ERR TAG_NAME fmt, ##__VA_ARGS__)
@@ -156,6 +157,11 @@ struct s5k5bafx_regset_table {
#endif
#define EV_MIN_VLAUE EV_MINUS_4
+#define ANTI_BANDING_MAX ANTI_BANDING_50_60Hz
+#define CAM_VT_MODE_FD (CAM_VT_MODE_VOIP + 1)
+#undef CAM_VT_MODE_MAX
+#define CAM_VT_MODE_MAX (CAM_VT_MODE_FD + 1)
+#define INIT_MODE_MAX CAM_VT_MODE_MAX
#define GET_EV_INDEX(EV) ((EV) - (EV_MIN_VLAUE))
struct s5k5bafx_regs {
@@ -165,14 +171,12 @@ struct s5k5bafx_regs {
struct s5k5bafx_regset_table preview_start;
struct s5k5bafx_regset_table capture_start;
struct s5k5bafx_regset_table fps[I_FPS_MAX];
- struct s5k5bafx_regset_table init; /* Used */
- struct s5k5bafx_regset_table init_vt; /* Used */
- struct s5k5bafx_regset_table init_vt_wifi; /* Used */
- struct s5k5bafx_regset_table init_recording; /* Used */
+ struct s5k5bafx_regset_table init[INIT_MODE_MAX];
+ struct s5k5bafx_regset_table init_recording[ANTI_BANDING_MAX];
struct s5k5bafx_regset_table get_light_level;
struct s5k5bafx_regset_table get_iso;
struct s5k5bafx_regset_table get_shutterspeed;
- struct s5k5bafx_regset_table stream_stop; /* Used */
+ struct s5k5bafx_regset_table stream_stop;
struct s5k5bafx_regset_table dtp_on;
struct s5k5bafx_regset_table dtp_off;
};
@@ -199,7 +203,9 @@ struct s5k5bafx_state {
struct mutex ctrl_lock;
enum v4l2_sensor_mode sensor_mode;
+ s32 *init_mode;
s32 vt_mode;
+ s32 anti_banding;
s32 req_fps;
s32 fps;
#ifdef CONFIG_USE_SW_I2C
@@ -214,17 +220,40 @@ struct s5k5bafx_state {
u32 initialized:1;
};
+#if !defined(CONFIG_MACH_PX)
+extern struct class *camera_class;
+#endif
+
static inline struct s5k5bafx_state *to_state(struct v4l2_subdev *sd)
{
return container_of(sd, struct s5k5bafx_state, sd);
}
-static inline void debug_msleep(struct v4l2_subdev *sd, u32 msecs)
+static inline void msleep_debug(struct v4l2_subdev *sd, u32 msecs)
{
+ u32 delta_halfrange; /* in us unit */
+
+ if (unlikely(!msecs))
+ return;
+
cam_dbg("delay for %dms\n", msecs);
- msleep(msecs);
+
+ if (msecs <= 7)
+ delta_halfrange = 100;
+ else
+ delta_halfrange = 300;
+
+ if (msecs <= 20)
+ usleep_range((msecs * 1000 - delta_halfrange),
+ (msecs * 1000 + delta_halfrange));
+ else
+ msleep(msecs);
}
+/* Start-up time for Smart-stay
+ * device open + start preview + callback time */
+#define SMARTSTAY_STARTUP_TIME (20 + 1000 + 0)
+
#ifdef CONFIG_LOAD_FILE
#include <linux/vmalloc.h>
#include <linux/fs.h>
@@ -261,7 +290,13 @@ static s32 large_file;
#define REG_ADDR_SHUTTER 0x14D0
#define REG_PAGE_ISO 0x7000
#define REG_ADDR_ISO 0x14C8
-
+
+#ifdef CONFIG_MACH_P8
#include "s5k5bafx_regs-p8.h"
+#elif defined(CONFIG_MACH_U1_KOR_LGT)
+#include "s5k5bafx_setfile_lgt.h"
+#else
+#include "s5k5bafx_setfile.h"
+#endif
#endif /* __S5K5BAFX_H */
diff --git a/drivers/media/video/s5k5bafx.c b/drivers/media/video/s5k5bafx.c
index ba8600d..680c045 100644
--- a/drivers/media/video/s5k5bafx.c
+++ b/drivers/media/video/s5k5bafx.c
@@ -686,13 +686,13 @@ static int s5k5bafx_set_preview_start(struct v4l2_subdev *sd)
struct s5k5bafx_state *state = to_state(sd);
int err = -EINVAL;
- cam_info("reset preview\n");
+ cam_info("set preview\n");
#ifdef CONFIG_LOAD_FILE
err = s5k5bafx_write_regs_from_sd(sd, "s5k5bafx_preview");
#else
err = s5k5bafx_write_regs(sd, s5k5bafx_preview,
- sizeof(s5k5bafx_preview) / sizeof(s5k5bafx_preview[0]));
+ ARRAY_SIZE(s5k5bafx_preview));
#endif
if (state->check_dataline)
err = s5k5bafx_check_dataline(sd, 1);
@@ -824,13 +824,6 @@ static int s5k5bafx_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *ffm
* set the most appropriate one according to the request from FIMC
*/
-#ifdef CONFIG_VIDEO_CONFERENCE_CALL
- if (state->vt_mode == 3) {
- state->req_fmt.width = fmt->fmt.pix.height;
- state->req_fmt.height = fmt->fmt.pix.width;
- }
-#endif
-
state->req_fmt.width = ffmt->width;
state->req_fmt.height = ffmt->height;
state->req_fmt.priv = ffmt->field;
@@ -1037,6 +1030,39 @@ static int s5k5bafx_control_stream(struct v4l2_subdev *sd, stream_cmd_t cmd)
return err;
}
+static int s5k5bafx_check_device(struct v4l2_subdev *sd)
+{
+ struct s5k5bafx_state *state = to_state(sd);
+ const u32 write_reg = 0x00287000;
+ u16 read_value = 0;
+ int err = -ENODEV;
+
+ /* enter read mode */
+ err = s5k5bafx_read_reg(sd, 0xD000, 0x1006, &read_value);
+ if (unlikely(err < 0))
+ return -ENODEV;
+
+ if (likely(read_value == S5K5BAFX_CHIP_ID))
+ cam_info("Sensor ChipID: 0x%04X\n", S5K5BAFX_CHIP_ID);
+ else
+ cam_info("Sensor ChipID: 0x%04X, unknown ChipID\n", read_value);
+
+ err = s5k5bafx_read_reg(sd, 0xD000, 0x1008, &read_value);
+ if (likely((u8)read_value == S5K5BAFX_CHIP_REV))
+ cam_info("Sensor revision: 0x%02X\n", S5K5BAFX_CHIP_REV);
+ else
+ cam_info("Sensor revision: 0x%02X, unknown revision\n",
+ (u8)read_value);
+
+ /* restore write mode */
+ err = s5k5bafx_write_regs(sd, &write_reg, 1);
+ if (err < 0)
+ return -ENODEV;
+
+ return 0;
+}
+
+
static int s5k5bafx_init(struct v4l2_subdev *sd, u32 val)
{
/* struct i2c_client *client = v4l2_get_subdevdata(sd); */
@@ -1045,6 +1071,8 @@ static int s5k5bafx_init(struct v4l2_subdev *sd, u32 val)
cam_dbg("E\n");
+ s5k5bafx_check_device(sd);
+
/* set initial regster value */
#ifdef CONFIG_LOAD_FILE
if (state->sensor_mode == SENSOR_CAMERA) {
@@ -1079,35 +1107,32 @@ static int s5k5bafx_init(struct v4l2_subdev *sd, u32 val)
if (!state->vt_mode) {
cam_info("load camera common setting\n");
err = s5k5bafx_write_regs(sd, s5k5bafx_common,
- sizeof(s5k5bafx_common) / \
- sizeof(s5k5bafx_common[0]));
+ ARRAY_SIZE(s5k5bafx_common));
} else {
-#ifdef CONFIG_VIDEO_CONFERENCE_CALL
- if (state->vt_mode == 1 || state->vt_mode == 3) {
-#else
if (state->vt_mode == 1) {
-#endif
cam_info("load camera VT call setting\n");
err = s5k5bafx_write_regs(sd, s5k5bafx_vt_common,
- sizeof(s5k5bafx_vt_common) / \
- sizeof(s5k5bafx_vt_common[0]));
+ ARRAY_SIZE(s5k5bafx_vt_common));
+ } else if (state->vt_mode == 3) {
+ cam_info("load camera smart stay setting\n");
+ err = s5k5bafx_write_regs(sd,
+ s5k5bafx_recording_50Hz_common,
+ ARRAY_SIZE(
+ s5k5bafx_recording_50Hz_common));
} else {
cam_info("load camera WIFI VT call setting\n");
err = s5k5bafx_write_regs(sd, s5k5bafx_vt_wifi_common,
- sizeof(s5k5bafx_vt_wifi_common) / \
- sizeof(s5k5bafx_vt_wifi_common[0]));
+ ARRAY_SIZE(s5k5bafx_vt_wifi_common));
}
}
} else {
cam_info("load recording setting\n");
if (ANTI_BANDING_50HZ == state->anti_banding) {
err = s5k5bafx_write_regs(sd, s5k5bafx_recording_50Hz_common,
- sizeof(s5k5bafx_recording_50Hz_common) / \
- sizeof(s5k5bafx_recording_50Hz_common[0]));
+ ARRAY_SIZE(s5k5bafx_recording_50Hz_common));
} else {
err = s5k5bafx_write_regs(sd, s5k5bafx_recording_60Hz_common,
- sizeof(s5k5bafx_recording_60Hz_common) / \
- sizeof(s5k5bafx_recording_60Hz_common[0]));
+ ARRAY_SIZE(s5k5bafx_recording_60Hz_common));
}
}
#endif
@@ -1528,6 +1553,53 @@ ssize_t s5k5bafx_camera_type_show(struct device *dev,
static DEVICE_ATTR(front_camtype, S_IRUGO, s5k5bafx_camera_type_show, NULL);
+ssize_t s5k5bafx_startup_time_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ char *cam_type;
+ cam_info("%s\n", __func__);
+
+ return sprintf(buf, "%d\n", SMARTSTAY_STARTUP_TIME);
+}
+
+static DEVICE_ATTR(startup_time, S_IRUGO, s5k5bafx_startup_time_show, NULL);
+
+static struct device *s5k5bafx_sysdev;
+
+static int s5k5bafx_create_sysfs(void)
+{
+ cam_dbg("%s\n", __func__);
+
+ s5k5bafx_sysdev = device_create(camera_class, NULL,
+ MKDEV(CAM_MAJOR, 1), NULL, "front");
+ if (IS_ERR(s5k5bafx_sysdev)) {
+ cam_err("failed to create device s5k5bafx_dev!\n");
+ return 0;
+ }
+
+ if (device_create_file(s5k5bafx_sysdev, &dev_attr_front_camtype) < 0) {
+ cam_err("failed to create device file, %s\n",
+ dev_attr_front_camtype.attr.name);
+ }
+
+ if (device_create_file(s5k5bafx_sysdev, &dev_attr_startup_time) < 0) {
+ cam_err("failed to create device file, %s\n",
+ dev_attr_startup_time.attr.name);
+ }
+
+ return 0;
+}
+
+static int s5k5bafx_remove_sysfs(void)
+{
+ device_remove_file(s5k5bafx_sysdev, &dev_attr_front_camtype);
+ device_remove_file(s5k5bafx_sysdev, &dev_attr_startup_time);
+ device_destroy(camera_class, s5k5bafx_sysdev->devt);
+ s5k5bafx_sysdev = NULL;
+
+ return 0;
+}
+
/*
* s5k5bafx_probe
* Fetching platform data is being done with s_config subdev call.
@@ -1562,23 +1634,6 @@ static int s5k5bafx_probe(struct i2c_client *client,
/* Registering subdev */
v4l2_i2c_subdev_init(sd, client, &s5k5bafx_ops);
- if (state->s5k5bafx_dev == NULL) {
- state->s5k5bafx_dev =
- device_create(camera_class, NULL, 0, NULL,
- "front");
- if (IS_ERR(state->s5k5bafx_dev)) {
- cam_err("failed to create device s5k5bafx_dev!\n");
- } else {
- dev_set_drvdata(state->s5k5bafx_dev, state);
- if (device_create_file
- (state->s5k5bafx_dev,
- &dev_attr_front_camtype) < 0) {
- cam_err("failed to create device file, %s\n",
- dev_attr_front_camtype.attr.name);
- }
- }
- }
-
/*
* Assign default format and resolution
* Use configured default information in platform data
@@ -1621,10 +1676,6 @@ static int s5k5bafx_remove(struct i2c_client *client)
state->initialized = 0;
- device_remove_file(state->s5k5bafx_dev, &dev_attr_front_camtype);
- device_destroy(camera_class, 0);
- state->s5k5bafx_dev = NULL;
-
v4l2_device_unregister_subdev(sd);
kfree(to_state(sd));
@@ -1657,12 +1708,14 @@ static struct i2c_driver s5k5bafx_i2c_driver = {
static int __init s5k5bafx_mod_init(void)
{
cam_dbg("E\n");
+ s5k5bafx_create_sysfs();
return i2c_add_driver(&s5k5bafx_i2c_driver);
}
static void __exit s5k5bafx_mod_exit(void)
{
cam_dbg("E\n");
+ s5k5bafx_remove_sysfs();
i2c_del_driver(&s5k5bafx_i2c_driver);
}
module_init(s5k5bafx_mod_init);
diff --git a/drivers/media/video/s5k5bafx.h b/drivers/media/video/s5k5bafx.h
index 00f4c88..464cea2 100755..100644
--- a/drivers/media/video/s5k5bafx.h
+++ b/drivers/media/video/s5k5bafx.h
@@ -15,6 +15,9 @@
#include <linux/types.h>
+/* #define CONFIG_CAM_DEBUG */
+
+#define CAM_MAJOR 119
#define S5K5BAFX_DRIVER_NAME "S5K5BAFX"
typedef enum {
@@ -64,7 +67,6 @@ static inline struct s5k5bafx_state *to_state(struct v4l2_subdev *sd)
return container_of(sd, struct s5k5bafx_state, sd);
}
-/*#define CONFIG_CAM_DEBUG */
#define cam_warn(fmt, ...) \
do { \
printk(KERN_WARNING "%s: " fmt, __func__, ##__VA_ARGS__); \
@@ -96,6 +98,9 @@ static inline struct s5k5bafx_state *to_state(struct v4l2_subdev *sd)
/*********** Sensor specific ************/
+#define S5K5BAFX_CHIP_ID 0x05BA
+#define S5K5BAFX_CHIP_REV 0xA0
+
/* #define S5K5BAFX_100MS_DELAY 0xAA55AA5F */
/* #define S5K5BAFX_10MS_DELAY 0xAA55AA5E */
#define S5K5BAFX_DELAY 0xFFFF0000
@@ -107,6 +112,11 @@ static inline struct s5k5bafx_state *to_state(struct v4l2_subdev *sd)
#define REG_PAGE_ISO 0x7000
#define REG_ADDR_ISO 0x14C8
+
+/* Start-up time for Smart-stay
+ * device open + start preview + callback time */
+#define SMARTSTAY_STARTUP_TIME (20 + 1285 + 905)
+
#ifdef CONFIG_MACH_U1_KOR_LGT
#include "s5k5bafx_setfile_lgt.h"
#else
diff --git a/drivers/media/video/s5k5bafx_regs-p8.h b/drivers/media/video/s5k5bafx_regs-p8.h
index 266598c..f7d35cc 100644
--- a/drivers/media/video/s5k5bafx_regs-p8.h
+++ b/drivers/media/video/s5k5bafx_regs-p8.h
@@ -13127,7 +13127,7 @@ static const u32 s5k5bafx_fps_25fix[] =
0x0F120000,
};
-
+#ifdef SUPPORT_FACTORY_TEST
/*******************************************************
* CAMERA_DTP_ON
*******************************************************/
@@ -13228,5 +13228,6 @@ static const u32 s5k5bafx_pattern_off[] = {
0x002A3100,
0x0F120000, /* Colorbar pattern */
};
+#endif /* SUPPORT_FACTORY_TEST */
#endif /* __S5K5BAFX_REGS_H */
diff --git a/drivers/media/video/s5k5bafx_setfile.h b/drivers/media/video/s5k5bafx_setfile.h
index 6e4f999..e34a52c 100644
--- a/drivers/media/video/s5k5bafx_setfile.h
+++ b/drivers/media/video/s5k5bafx_setfile.h
@@ -12855,6 +12855,1471 @@ static const u32 s5k5bafx_recording_50Hz_common[] = {
/* Recording 25fps Anti-Flicker 50Hz END of Initial */
};
+/* Recording with 25fps, simplified for FD service */
+static const u32 s5k5bafx_FD_common[] = {
+
+ /* recording 25fps Anti-Flicker 50Hz*/
+
+ 0xFCFCD000,
+
+ /* ARM Go */
+ 0x0028D000,
+ 0x002A1030,
+ 0x0F120000,
+ 0x002A0014,
+ 0x0F120001,
+ 0xffff0064, /* p100 Delay */
+
+
+ 0x0028D000,
+ 0x002A1000,
+ 0x0F120001,
+
+
+ 0x00287000,
+ 0x002A1662,
+ 0x0F1203B0,
+ 0x0F1203B0,
+
+
+ 0x00287000,
+ 0x002A1658,
+ 0x0F129C40,
+ 0x0F120000,
+ 0x0F129C40,
+ 0x0F120000,
+
+
+ 0x00287000,
+ 0x002A0ADC,
+ 0x0F120AF0, /* setot_uOnlineClocksDiv40 */
+ 0x002A0AE2,
+ 0x0F12222E, /* setot_usSetRomWaitStateThreshold4KHz */
+
+ 0x002A0B94,
+ 0x0F120580, /* awbb_GainsInit_0_:R */
+ 0x0F120400, /* awbb_GainsInit_1_:G */
+ 0x0F1205F0, /* awbb_GainsInit_2_:B */
+ 0x002A04A0,
+ 0x0F128000, /* lt_uLeiInit:AE start */
+ 0x002A049A,
+ 0x0F1200FA, /* lt_uMinExp 0.5ms·Î º¯°æ */
+
+
+ /* Set CIS/APS/Analog */
+ 0x0028D000,
+ 0x002AF106,
+ 0x0F120001,
+ 0x002AF206,
+ 0x0F120001,
+
+
+ 0x002AC202,
+ 0x0F120700,
+
+ 0x002AF260,
+ 0x0F120001,
+
+ 0x002AF414,
+ 0x0F120030,
+
+ 0x002AC204,
+ 0x0F120100,
+ 0x002AF402,
+ 0x0F120092,
+ 0x0F12007F,
+
+ 0x002AF700,
+ 0x0F120040,
+ 0x002AF708,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120040,
+ 0x0F120040,
+ 0x0F120040,
+ 0x0F120040,
+ 0x0F120040,
+ 0x0F120001,
+ 0x0F120015,
+ 0x0F120001,
+ 0x0F120040,
+
+ 0x002AF48A,
+ 0x0F120048,
+ 0x002AF10A,
+ 0x0F12008B,
+
+
+ 0x002AF900,
+ 0x0F120067,
+
+
+ 0x002AF406,
+ 0x0F120092,
+ 0x0F12007F,
+ 0x0F120003,
+
+ 0x0F120003,
+ 0x0F120003,
+ 0x002AF442,
+ 0x0F120000,
+ 0x0F120000,
+ 0x002AF448,
+ 0x0F120000,
+ 0x002AF456,
+ 0x0F120001,
+ 0x0F120010,
+ 0x0F120000,
+
+ 0x002AF41A,
+ 0x0F1200FF,
+ 0x0F120003,
+
+ 0x002AF420,
+ 0x0F120030,
+ 0x002AF410,
+ 0x0F120001,
+
+ 0x0F120000,
+ 0x002AF416,
+ 0x0F120001,
+ 0x002AF424,
+ 0x0F120000,
+ 0x002AF422,
+ 0x0F120000,
+
+ 0x002AF41E,
+ 0x0F120000,
+ 0x002AF428,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x002AF430,
+ 0x0F120000,
+ 0x0F120000,
+
+ 0x0F120008,
+ 0x0F120005,
+ 0x0F12000F,
+ 0x0F120001,
+ 0x0F120040,
+ 0x0F120040,
+ 0x0F120010,
+
+ 0x002AF4D6,
+ 0x0F120090,
+
+
+ 0x0F120000,
+
+ 0x002AF47C,
+ 0x0F12000C,
+ 0x0F120000,
+ 0x002AF49A,
+ 0x0F120008,
+ 0x0F120000,
+ 0x002AF4A2,
+ 0x0F120008,
+ 0x0F120000,
+ 0x002AF4B2,
+ 0x0F120013,
+ 0x0F120000,
+ 0x0F120013,
+ 0x0F120000,
+ 0x002AF4AA,
+ 0x0F12009B,
+ 0x0F1200FB,
+ 0x0F12009B,
+ 0x0F1200FB,
+ 0x002AF474,
+ 0x0F120017,
+ 0x0F12005F,
+ 0x0F120017,
+ 0x0F12008F,
+
+ 0x002AF48C,
+ 0x0F120017,
+ 0x0F12009B,
+ 0x002AF4C8,
+ 0x0F120163,
+ 0x0F120193,
+ 0x002AF490,
+ 0x0F120191,
+
+ 0x002AF418,
+ 0x0F120083,
+
+ 0x002AF454,
+ 0x0F120001,
+
+ 0x002AF702,
+ 0x0F120081,
+ 0x002AF4D2,
+ 0x0F120000,
+
+ /* For ESD Check */
+ 0x00287000,
+ 0x002A0132,
+ 0x0F12AAAA,
+
+ /* Set FPN Gain Input */
+ 0x002A1176,
+ 0x0F120020,
+ 0x0F120040,
+ 0x0F120080,
+ 0x0F120100,
+ 0x0F120014,
+ 0x0F12000A,
+ 0x0F120008,
+ 0x0F120004,
+
+ /* CFPN Canceller */
+ 0x002A116C,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120002,
+ 0x002A0AE8,
+ 0x0F120000,
+
+ /* sensor aig table setting */
+ 0x002A10EE,
+ 0x0F120000,
+ 0x002A10F2,
+ 0x0F120000,
+ 0x002A1152,
+ 0x0F120030,
+ 0x0F120028,
+ 0x0F120030,
+ 0x002A1148,
+ 0x0F1200FB,
+ 0x002A1144,
+ 0x0F1200FB,
+ 0x002A1150,
+ 0x0F1201F4,
+
+
+ 0x002A1084,
+ 0x0F120000,
+ 0x0F120000,
+
+ /* Set AE Target */
+ 0x002A0F4C,
+ 0x0F12003A, /* TVAR_ae_BrAve */
+
+ 0x002A0478,
+ 0x0F120114,
+ 0x0F1200EB, /* ae boundary */
+
+
+
+ /* Set Frame Rate */
+ 0x002A0484,
+ 0x0F12410A, /* uMaxExp1 */
+ 0x0F120000,
+ 0x002A048C,
+ 0x0F128214, /* uMaxExp2 */
+ 0x0F120000,
+ 0x0F12A122, /* uMaxExp3 */
+ 0x0F120000,
+ 0x002A0488,
+ 0x0F12f424, /* uMaxExp4 */
+ 0x0F120000,
+ 0x002A043A,
+ 0x0F1201D0, /* lt_uMaxAnGain0 */
+ 0x0F1201E0, /* lt_uMaxAnGain0_1 */
+ 0x002A0494,
+ 0x0F120300, /* lt_uMaxAnGain1 */
+ 0x0F120650, /* lt_uMaxAnGain2 */
+ 0x0f120100,
+ 0x002A0F52,
+ 0x0F12000F, /* ae_StatMode */
+
+ 0x002A0E98, /* bp_uMaxBrightnessFactor */
+ 0x0F1202A8,
+ 0x002A0E9E, /* bp_uMinBrightnessFactor */
+ 0x0F120298,
+
+ /* 1. Auto Flicker 50Hz Start */
+ 0x002A0B2E,
+ 0x0F120000, /* AFC_Default60Hz Auto Flicker 60Hz start 0: Auto Flicker 50Hz start */
+ 0x002A03F8,
+ 0x0F12005F, /* REG_TC_DBG_AutoAlgEnBits default : 007F */
+
+
+ 0xffff000a, /* p10 Wait10mSec */
+
+ /* Set PLL */
+ /* External CLOCK (MCLK) */
+ 0x002A01B8,
+ 0x0F125DC0, /* REG_TC_IPRM_InClockLSBs */
+ 0x0F120000, /* REG_TC_IPRM_InClockMSBs */
+
+ /* Parallel or MIPI Selection */
+ 0x002A01C6,
+ 0x0F120001, /* REG_TC_IPRM_UseNPviClocks */
+ 0x0F120001, /* REG_TC_IPRM_UseNMipiClocks */
+ 0x0F120000, /* REG_TC_IPRM_bBlockInternalPllCalc */
+
+ /* System Clock 0 (System : 24Mhz, PCLK : 48Mhz) */
+ 0x002A01CC,
+ 0x0F121770, /* REG_TC_IPRM_OpClk4KHz_0 */
+ 0x0F122EE0, /* REG_TC_IPRM_MinOutRate4KHz_0 */
+ 0x0F122EE0, /* REG_TC_IPRM_MaxOutRate4KHz_0 */
+
+ /* System Clock 1 (System : 48Mhz, PCLK : 48Mhz) */
+ 0x002A01D2,
+ 0x0F122EE0, /* REG_TC_IPRM_OpClk4KHz_1 */
+ 0x0F122EE0, /* REG_TC_IPRM_MinOutRate4KHz_1 */
+ 0x0F122EE0, /* REG_TC_IPRM_MaxOutRate4KHz_1 */
+
+
+
+ 0x002A01DE,
+ 0x0F120001, /* REG_TC_IPRM_UseRegsAPI */
+ 0x0F120001, /* REG_TC_IPRM_InitParamsUpdated */
+ 0xffff0064, /* p100 */
+
+
+
+ /* Crop */
+ 0x002A01FA,
+ 0x0F120640, /* REG_TC_GP_PrevReqInputWidth */
+ 0x0F1204B0, /* REG_TC_GP_PrevReqInputHeight */
+ 0x0F120000, /* REG_TC_GP_PrevInputWidthOfs */
+ 0x0F120000, /* REG_TC_GP_PrevInputHeightOfs */
+
+
+ /* Set Preview Config */
+ /* Preview Config 0 (VGA fixed 30fps) */
+ 0x002A0242,
+ 0x0F120280, /* REG_0TC_PCFG_usWidth */
+ 0x0F1201E0, /* REG_0TC_PCFG_usHeight */
+ 0x0F120005, /* REG_0TC_PCFG_Format */
+ 0x0F122EE0, /* REG_0TC_PCFG_usMaxOut4KHzRate */
+ 0x0F122EE0, /* REG_0TC_PCFG_usMinOut4KHzRate */
+ 0x0F120052, /* REG_0TC_PCFG_PVIMask */
+ 0x0F120001, /* REG_0TC_PCFG_uClockInd */
+ 0x0F120002, /* REG_0TC_PCFG_usFrTimeType */
+ 0x0F120001, /* REG_0TC_PCFG_FrRateQualityType */
+
+#if 1 /* 25 fps */
+ 0x0F12018c, /* REG_0TC_PCFG_usMaxFrTimeMsecMult10 */
+ 0x0F12018c, /* REG_0TC_PCFG_usMinFrTimeMsecMult10 */
+#else /* 30 fps */
+ /* 0x0F12014d, *//* REG_0TC_PCFG_usMaxFrTimeMsecMult10 */
+ /* 0x0F12014d, *//* REG_0TC_PCFG_usMinFrTimeMsecMult10 */
+#endif
+ 0x0F120000, /* REG_0TC_PCFG_sSaturation */
+ 0x0F120000, /* REG_0TC_PCFG_sSharpBlur */
+ 0x0F120000, /* REG_0TC_PCFG_sGlamour */
+ 0x0F120000, /* REG_0TC_PCFG_sColorTemp */
+ 0x0F120000, /* REG_0TC_PCFG_uDeviceGammaIndex */
+ 0x0F120000, /* REG_0TC_PCFG_uPrevMirror */
+ 0x0F120000, /* REG_0TC_PCFG_uCaptureMirror */
+ 0x0F120000, /* REG_0TC_PCFG_uRotation */
+
+
+ /* Set MIPI */
+ 0x002A03AC,
+ 0x0F120000, /* REG_TC_FLS_Mode */
+ 0x002A03F2,
+ 0x0F120001, /* REG_TC_OIF_EnMipiLanes */
+ 0x0F1200C3, /* REG_TC_OIF_EnPackets */
+ 0x0F120001, /* REG_TC_OIF_CfgChanged */
+
+ /* Apply preview config */
+ 0x002A021C,
+ 0x0F120000, /* REG_TC_GP_ActivePrevConfig */
+ 0x002A0220,
+ 0x0F120001, /* REG_TC_GP_PrevOpenAfterChange */
+ 0x002A01F8,
+ 0x0F120001, /* REG_TC_GP_NewConfigSync */
+ 0x002A021E,
+ 0x0F120001, /* REG_TC_GP_PrevConfigChanged */
+ 0x002A01F0,
+ 0x0F120001, /* REG_TC_GP_EnablePreview */
+ 0x0F120001, /* REG_TC_GP_EnablePreviewChanged */
+
+
+
+ /* Set Capture Config */
+ /* Capture Config 0 (1600x1200 fixed 8fps) */
+ 0x002A0302,
+ 0x0F120000, /* REG_0TC_CCFG_uCaptureMode */
+ 0x0F120640, /* REG_0TC_CCFG_usWidth */
+ 0x0F1204B0, /* REG_0TC_CCFG_usHeight */
+ 0x0F120005, /* REG_0TC_CCFG_Format */
+ 0x0F122EE0, /* REG_0TC_CCFG_usMaxOut4KHzRate */
+ 0x0F122EE0, /* REG_0TC_CCFG_usMinOut4KHzRate */
+ 0x0F120052, /* REG_0TC_CCFG_PVIMask */
+ 0x0F120001, /* REG_0TC_CCFG_uClockInd */
+ 0x0F120002, /* REG_0TC_CCFG_usFrTimeType */
+ 0x0F120002, /* REG_0TC_CCFG_FrRateQualityType */
+ 0x0F1204E2, /* REG_0TC_CCFG_usMaxFrTimeMsecMult10 */
+ 0x0F1204E2, /* REG_0TC_CCFG_usMinFrTimeMsecMult10 */
+ 0x0F120000, /* REG_0TC_CCFG_sSaturation */
+ 0x0F120000, /* REG_0TC_CCFG_sSharpBlur */
+ 0x0F120000, /* REG_0TC_CCFG_sGlamour */
+ 0x0F120000, /* REG_0TC_CCFG_sColorTemp */
+ 0x0F120000, /* REG_0TC_CCFG_uDeviceGammaIndex */
+
+
+
+ /* Periodic mismatch */
+ 0x002A0780,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+
+ 0x002A0798,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+
+ 0x002A07C0,
+ 0x0F120004,
+ 0x0F120004,
+
+ 0x002A0B94,
+ 0x0F120580,
+ 0x0F120400,
+ 0x0F1205F0,
+ 0x002A04A0,
+ 0x0F128000,
+
+
+ /* Set AE Weights */
+ 0x002A0F5A,
+ 0x0F120000, /* ae_WeightTbl_16_0_ */
+ 0x0F120000, /* ae_WeightTbl_16_1_ */
+ 0x0F120000, /* ae_WeightTbl_16_2_ */
+ 0x0F120000, /* ae_WeightTbl_16_3_ */
+ 0x0F120101, /* ae_WeightTbl_16_4_ */
+ 0x0F120101, /* ae_WeightTbl_16_5_ */
+ 0x0F120101, /* ae_WeightTbl_16_6_ */
+ 0x0F120101, /* ae_WeightTbl_16_7_ */
+ 0x0F120101, /* ae_WeightTbl_16_8_ */
+ 0x0F120302, /* ae_WeightTbl_16_9_ */
+ 0x0F120203, /* ae_WeightTbl_16_10 */
+ 0x0F120101, /* ae_WeightTbl_16_11 */
+ 0x0F120101, /* ae_WeightTbl_16_12 */
+ 0x0F120403, /* ae_WeightTbl_16_13 */
+ 0x0F120304, /* ae_WeightTbl_16_14 */
+ 0x0F120101, /* ae_WeightTbl_16_15 */
+ 0x0F120101, /* ae_WeightTbl_16_16 */
+ 0x0F120403, /* ae_WeightTbl_16_17 */
+ 0x0F120304, /* ae_WeightTbl_16_18 */
+ 0x0F120101, /* ae_WeightTbl_16_19 */
+ 0x0F120101, /* ae_WeightTbl_16_20 */
+ 0x0F120302, /* ae_WeightTbl_16_21 */
+ 0x0F120203, /* ae_WeightTbl_16_22 */
+ 0x0F120101, /* ae_WeightTbl_16_23 */
+ 0x0F120101, /* ae_WeightTbl_16_24 */
+ 0x0F120101, /* ae_WeightTbl_16_25 */
+ 0x0F120101, /* ae_WeightTbl_16_26 */
+ 0x0F120101, /* ae_WeightTbl_16_27 */
+ 0x0F120000, /* ae_WeightTbl_16_28 */
+ 0x0F120000, /* ae_WeightTbl_16_29 */
+ 0x0F120000, /* ae_WeightTbl_16_30 */
+ 0x0F120000, /* ae_WeightTbl_16_31 */
+
+
+ /* Set GAS & CCM White Point */
+ /* param_start TVAR_ash_AwbAshCord */
+ 0x002A0704,
+ 0x0F1200B3,
+ 0x0F1200E5,
+ 0x0F120120,
+ 0x0F120136,
+ 0x0F120180,
+ 0x0F1201B0,
+ 0x0F120200,
+
+ /* param_start wbt_AwbCcmCord */
+ 0x002A06F2,
+ 0x0F1200B3,
+ 0x0F1200E5,
+ 0x0F120120,
+ 0x0F120136,
+ 0x0F120180,
+ 0x0F120190,
+
+ /* Target Brightness Control */
+ 0x002A103E,
+ 0x0F120000,
+ 0x0F120009,
+ 0x0F120018,
+ 0x0F120032,
+ 0x0F12004A,
+ 0x0F120051,
+ 0x0F120056,
+ 0x0F12010C,
+ 0x0F12010C,
+ 0x0F120109,
+ 0x0F120105,
+ 0x0F120102,
+ 0x0F1200FB,
+ 0x0F1200F8,
+
+
+ /* Gamma */
+ 0x002A04CC,
+ 0x0F120000, /* 0000 SARR_usGammaLutRGBIndoor[0][0] */
+ 0x0F120002, /* 0002 SARR_usGammaLutRGBIndoor[0][1] */
+ 0x0F120008, /* 0008 SARR_usGammaLutRGBIndoor[0][2] */
+ 0x0F120016, /* 0018 SARR_usGammaLutRGBIndoor[0][3] */
+ 0x0F120055, /* 005A SARR_usGammaLutRGBIndoor[0][4] */
+ 0x0F1200E6, /* 00DF SARR_usGammaLutRGBIndoor[0][5] */
+ 0x0F120141, /* 013F SARR_usGammaLutRGBIndoor[0][6] */
+ 0x0F120188, /* 0186 SARR_usGammaLutRGBIndoor[0][7] */
+ 0x0F1201E6, /* 01E6 SARR_usGammaLutRGBIndoor[0][8] */
+ 0x0F120236, /* 0236 SARR_usGammaLutRGBIndoor[0][9] */
+ 0x0F1202BA, /* 02BA SARR_usGammaLutRGBIndoor[0][10] */
+ 0x0F12032A, /* 032A SARR_usGammaLutRGBIndoor[0][11] */
+ 0x0F120385, /* 0385 SARR_usGammaLutRGBIndoor[0][12] */
+ 0x0F1203C2, /* 03C2 SARR_usGammaLutRGBIndoor[0][13] */
+ 0x0F1203EA, /* 03EA SARR_usGammaLutRGBIndoor[0][14] */
+ 0x0F1203FF, /* 03FF SARR_usGammaLutRGBIndoor[0][15] */
+
+ 0x0F120000, /* 0000 SARR_usGammaLutRGBIndoor[1][0] */
+ 0x0F120002, /* 0002 SARR_usGammaLutRGBIndoor[1][1] */
+ 0x0F120008, /* 0008 SARR_usGammaLutRGBIndoor[1][2] */
+ 0x0F120016, /* 0018 SARR_usGammaLutRGBIndoor[1][3] */
+ 0x0F120055, /* 005A SARR_usGammaLutRGBIndoor[1][4] */
+ 0x0F1200E6, /* 00DF SARR_usGammaLutRGBIndoor[1][5] */
+ 0x0F120141, /* 013F SARR_usGammaLutRGBIndoor[1][6] */
+ 0x0F120188, /* 0186 SARR_usGammaLutRGBIndoor[1][7] */
+ 0x0F1201E6, /* 01E6 SARR_usGammaLutRGBIndoor[1][8] */
+ 0x0F120236, /* 0236 SARR_usGammaLutRGBIndoor[1][9] */
+ 0x0F1202BA, /* 02BA SARR_usGammaLutRGBIndoor[1][10] */
+ 0x0F12032A, /* 032A SARR_usGammaLutRGBIndoor[1][11] */
+ 0x0F120385, /* 0385 SARR_usGammaLutRGBIndoor[1][12] */
+ 0x0F1203C2, /* 03C2 SARR_usGammaLutRGBIndoor[1][13] */
+ 0x0F1203EA, /* 03EA SARR_usGammaLutRGBIndoor[1][14] */
+ 0x0F1203FF, /* 03FF SARR_usGammaLutRGBIndoor[1][15] */
+
+ 0x0F120000, /* 0000 SARR_usGammaLutRGBIndoor[2][0] */
+ 0x0F120002, /* 0002 SARR_usGammaLutRGBIndoor[2][1] */
+ 0x0F120008, /* 0008 SARR_usGammaLutRGBIndoor[2][2] */
+ 0x0F120016, /* 0018 SARR_usGammaLutRGBIndoor[2][3] */
+ 0x0F120055, /* 005A SARR_usGammaLutRGBIndoor[2][4] */
+ 0x0F1200E6, /* 00DF SARR_usGammaLutRGBIndoor[2][5] */
+ 0x0F120141, /* 013F SARR_usGammaLutRGBIndoor[2][6] */
+ 0x0F120188, /* 0186 SARR_usGammaLutRGBIndoor[2][7] */
+ 0x0F1201E6, /* 01E6 SARR_usGammaLutRGBIndoor[2][8] */
+ 0x0F120236, /* 0236 SARR_usGammaLutRGBIndoor[2][9] */
+ 0x0F1202BA, /* 02BA SARR_usGammaLutRGBIndoor[2][10] */
+ 0x0F12032A, /* 032A SARR_usGammaLutRGBIndoor[2][11] */
+ 0x0F120385, /* 0385 SARR_usGammaLutRGBIndoor[2][12] */
+ 0x0F1203C2, /* 03C2 SARR_usGammaLutRGBIndoor[2][13] */
+ 0x0F1203EA, /* 03EA SARR_usGammaLutRGBIndoor[2][14] */
+ 0x0F1203FF, /* 03FF SARR_usGammaLutRGBIndoor[2][15] */
+
+
+ /* Set AWB */
+ 0x002A0DA6,
+ 0x0F120000,
+ 0x0F120000,
+ 0x002A0E8C,
+ 0x0F120000,
+ 0x002A0D6C,
+ 0x0F120040,
+
+ /* Indoor Gray Zone */
+ 0x002A0B9C,
+ 0x0F12038F, /* awbb_IndoorGrZones_m_BGrid_0__m_left */
+ 0x0F12039B, /* awbb_IndoorGrZones_m_BGrid_0__m_right */
+ 0x0F120373, /* awbb_IndoorGrZones_m_BGrid_1__m_left */
+ 0x0F1203B0, /* awbb_IndoorGrZones_m_BGrid_1__m_right */
+ 0x0F120352, /* awbb_IndoorGrZones_m_BGrid_2__m_left */
+ 0x0F1203B7, /* awbb_IndoorGrZones_m_BGrid_2__m_right */
+ 0x0F120334, /* awbb_IndoorGrZones_m_BGrid_3__m_left */
+ 0x0F1203B5, /* awbb_IndoorGrZones_m_BGrid_3__m_right */
+ 0x0F120318, /* awbb_IndoorGrZones_m_BGrid_4__m_left */
+ 0x0F1203B0, /* awbb_IndoorGrZones_m_BGrid_4__m_right */
+ 0x0F1202FF, /* awbb_IndoorGrZones_m_BGrid_5__m_left */
+ 0x0F12038D, /* awbb_IndoorGrZones_m_BGrid_5__m_right */
+ 0x0F1202E7, /* awbb_IndoorGrZones_m_BGrid_6__m_left */
+ 0x0F120372, /* awbb_IndoorGrZones_m_BGrid_6__m_right */
+ 0x0F1202D0, /* awbb_IndoorGrZones_m_BGrid_7__m_left */
+ 0x0F12035D, /* awbb_IndoorGrZones_m_BGrid_7__m_right */
+ 0x0F1202B5, /* awbb_IndoorGrZones_m_BGrid_8__m_left */
+ 0x0F120345, /* awbb_IndoorGrZones_m_BGrid_8__m_right */
+ 0x0F1202A1, /* awbb_IndoorGrZones_m_BGrid_9__m_left */
+ 0x0F120331, /* awbb_IndoorGrZones_m_BGrid_9__m_right */
+ 0x0F12028B, /* awbb_IndoorGrZones_m_BGrid_10__m_left */
+ 0x0F12031E, /* awbb_IndoorGrZones_m_BGrid_10__m_right */
+ 0x0F120273, /* awbb_IndoorGrZones_m_BGrid_11__m_left */
+ 0x0F120309, /* awbb_IndoorGrZones_m_BGrid_11__m_right */
+ 0x0F12025F, /* awbb_IndoorGrZones_m_BGrid_12__m_left */
+ 0x0F1202F5, /* awbb_IndoorGrZones_m_BGrid_12__m_right */
+ 0x0F120250, /* awbb_IndoorGrZones_m_BGrid_13__m_left */
+ 0x0F1202DB, /* awbb_IndoorGrZones_m_BGrid_13__m_right */
+ 0x0F120241, /* awbb_IndoorGrZones_m_BGrid_14__m_left */
+ 0x0F1202C7, /* awbb_IndoorGrZones_m_BGrid_14__m_right */
+ 0x0F120233, /* awbb_IndoorGrZones_m_BGrid_15__m_left */
+ 0x0F1202B9, /* awbb_IndoorGrZones_m_BGrid_15__m_right */
+ 0x0F120223, /* awbb_IndoorGrZones_m_BGrid_16__m_left */
+ 0x0F1202AB, /* awbb_IndoorGrZones_m_BGrid_16__m_right */
+ 0x0F120217, /* awbb_IndoorGrZones_m_BGrid_17__m_left */
+ 0x0F1202A2, /* awbb_IndoorGrZones_m_BGrid_17__m_right */
+ 0x0F120207, /* awbb_IndoorGrZones_m_BGrid_18__m_left */
+ 0x0F120294, /* awbb_IndoorGrZones_m_BGrid_18__m_right */
+ 0x0F1201FA, /* awbb_IndoorGrZones_m_BGrid_19__m_left */
+ 0x0F120289, /* awbb_IndoorGrZones_m_BGrid_19__m_right */
+ 0x0F1201EA, /* awbb_IndoorGrZones_m_BGrid_20__m_left */
+ 0x0F120281, /* awbb_IndoorGrZones_m_BGrid_20__m_right */
+ 0x0F1201DD, /* awbb_IndoorGrZones_m_BGrid_21__m_left */
+ 0x0F12027B, /* awbb_IndoorGrZones_m_BGrid_21__m_right */
+ 0x0F1201D0, /* awbb_IndoorGrZones_m_BGrid_22__m_left */
+ 0x0F120273, /* awbb_IndoorGrZones_m_BGrid_22__m_right */
+ 0x0F1201C3, /* awbb_IndoorGrZones_m_BGrid_23__m_left */
+ 0x0F12026A, /* awbb_IndoorGrZones_m_BGrid_23__m_right */
+ 0x0F1201B6, /* awbb_IndoorGrZones_m_BGrid_24__m_left */
+ 0x0F120265, /* awbb_IndoorGrZones_m_BGrid_24__m_right */
+ 0x0F1201AB, /* awbb_IndoorGrZones_m_BGrid_25__m_left */
+ 0x0F12025B, /* awbb_IndoorGrZones_m_BGrid_25__m_right */
+ 0x0F1201A1, /* awbb_IndoorGrZones_m_BGrid_26__m_left */
+ 0x0F120254, /* awbb_IndoorGrZones_m_BGrid_26__m_right */
+ 0x0F120198, /* awbb_IndoorGrZones_m_BGrid_27__m_left */
+ 0x0F12024B, /* awbb_IndoorGrZones_m_BGrid_27__m_right */
+ 0x0F120192, /* awbb_IndoorGrZones_m_BGrid_28__m_left */
+ 0x0F120242, /* awbb_IndoorGrZones_m_BGrid_28__m_right */
+ 0x0F120191, /* awbb_IndoorGrZones_m_BGrid_29__m_left */
+ 0x0F12023A, /* awbb_IndoorGrZones_m_BGrid_29__m_right */
+ 0x0F120192, /* awbb_IndoorGrZones_m_BGrid_30__m_left */
+ 0x0F120222, /* awbb_IndoorGrZones_m_BGrid_30__m_right */
+ 0x0F1201C5, /* awbb_IndoorGrZones_m_BGrid_31__m_left */
+ 0x0F1201DF, /* awbb_IndoorGrZones_m_BGrid_31__m_right */
+ 0x0F120000, /* awbb_IndoorGrZones_m_BGrid_32__m_left */
+ 0x0F120000, /* awbb_IndoorGrZones_m_BGrid_32__m_right */
+ 0x0F120000, /* awbb_IndoorGrZones_m_BGrid_33__m_left */
+ 0x0F120000, /* awbb_IndoorGrZones_m_BGrid_33__m_right */
+
+
+ /* param_end awbb_IndoorGrZones_m_BGrid */
+ 0x002A0C3C,
+ 0x0F120004,
+ 0x0F120000,
+ 0x0F120022,
+ 0x0F120000,
+ 0x0F12010F,
+ 0x0F120000,
+ 0x0F120020,
+ 0x0F120000,
+ 0x002A0C50,
+ 0x0F1200E0,
+ 0x0F120000,
+
+ /* Outdoor Gray Zone */
+ 0x0F12025E, /* 0264 awbb_OutdoorGrZones_m_BGrid_0__m_left */
+ 0x0F120282, /* 0279 awbb_OutdoorGrZones_m_BGrid_0__m_right */
+ 0x0F120240, /* 0250 awbb_OutdoorGrZones_m_BGrid_1__m_left */
+ 0x0F120298, /* 0287 awbb_OutdoorGrZones_m_BGrid_1__m_right */
+ 0x0F12022A, /* 0244 awbb_OutdoorGrZones_m_BGrid_2__m_left */
+ 0x0F12029A, /* 0287 awbb_OutdoorGrZones_m_BGrid_2__m_right */
+ 0x0F12021A, /* 0235 awbb_OutdoorGrZones_m_BGrid_3__m_left */
+ 0x0F12029A, /* 0289 awbb_OutdoorGrZones_m_BGrid_3__m_right */
+ 0x0F120206, /* 0225 awbb_OutdoorGrZones_m_BGrid_4__m_left */
+ 0x0F120298, /* 0287 awbb_OutdoorGrZones_m_BGrid_4__m_right */
+ 0x0F1201FE, /* 0213 awbb_OutdoorGrZones_m_BGrid_5__m_left */
+ 0x0F12028C, /* 0286 awbb_OutdoorGrZones_m_BGrid_5__m_right */
+ 0x0F1201FA, /* 0202 awbb_OutdoorGrZones_m_BGrid_6__m_left */
+ 0x0F120278, /* 027A awbb_OutdoorGrZones_m_BGrid_6__m_right */
+ 0x0F1201F8, /* 01F3 awbb_OutdoorGrZones_m_BGrid_7__m_left */
+ 0x0F120266, /* 0272 awbb_OutdoorGrZones_m_BGrid_7__m_right */
+ 0x0F120214, /* 01E9 awbb_OutdoorGrZones_m_BGrid_8__m_left */
+ 0x0F120238, /* 0269 awbb_OutdoorGrZones_m_BGrid_8__m_right */
+ 0x0F120000, /* 01E2 awbb_OutdoorGrZones_m_BGrid_9__m_left */
+ 0x0F120000, /* 0263 awbb_OutdoorGrZones_m_BGrid_9__m_right */
+ 0x0F120000, /* 01E0 awbb_OutdoorGrZones_m_BGrid_10__m_left */
+ 0x0F120000, /* 025A awbb_OutdoorGrZones_m_BGrid_10__m_right */
+ 0x0F120000, /* 01E1 awbb_OutdoorGrZones_m_BGrid_11__m_left */
+ 0x0F120000, /* 0256 awbb_OutdoorGrZones_m_BGrid_11__m_right */
+ 0x0F120000, /* 01EE awbb_OutdoorGrZones_m_BGrid_12__m_left */
+ 0x0F120000, /* 0251 awbb_OutdoorGrZones_m_BGrid_12__m_right */
+ 0x0F120000, /* 01F8 awbb_OutdoorGrZones_m_BGrid(26) */
+ 0x0F120000, /* 024A awbb_OutdoorGrZones_m_BGrid(27) */
+ 0x0F120000, /* 020D awbb_OutdoorGrZones_m_BGrid(28) */
+ 0x0F120000, /* 0231 awbb_OutdoorGrZones_m_BGrid(29) */
+ 0x0F120000, /* 0000 awbb_OutdoorGrZones_m_BGrid(30) */
+ 0x0F120000, /* 0000 awbb_OutdoorGrZones_m_BGrid(31) */
+ 0x0F120000, /* 0000 awbb_OutdoorGrZones_m_BGrid(32) */
+ 0x0F120000, /* 0000 awbb_OutdoorGrZones_m_BGrid(33) */
+
+
+ /* param_WRITE 70000CC6 B2end awbb_OutdoorGrZones_m_BGrid */
+ 0x002A0CB8,
+ 0x0F120004,
+ 0x0F120000,
+ 0x0F120009,
+ 0x0F120000,
+ 0x0F120210,
+ 0x0F120000,
+ 0x0F120020,
+ 0x0F120000,
+ 0x002A0CCC,
+ 0x0F1200C0,
+ 0x0F120000,
+
+ /* 7-3. Low Br grey zone */
+ /* param_ C4start awbb_LowBrGrZones_m_BGrid */
+
+ 0x0F12031F, /* awbb_LowBrGrZones_m_BGrid_0__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_0__m_right */
+ 0x0F1202FC, /* awbb_LowBrGrZones_m_BGrid_1__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_1__m_right */
+ 0x0F1202D9, /* awbb_LowBrGrZones_m_BGrid_2__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_2__m_right */
+ 0x0F1202B6, /* awbb_LowBrGrZones_m_BGrid_3__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_3__m_right */
+ 0x0F120293, /* awbb_LowBrGrZones_m_BGrid_4__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_4__m_right */
+ 0x0F120270, /* awbb_LowBrGrZones_m_BGrid_5__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_5__m_right */
+ 0x0F12024E, /* awbb_LowBrGrZones_m_BGrid_6__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_6__m_right */
+ 0x0F12022B, /* awbb_LowBrGrZones_m_BGrid_7__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_7__m_right */
+ 0x0F120208, /* awbb_LowBrGrZones_m_BGrid_8__m_left */
+ 0x0F12048A, /* awbb_LowBrGrZones_m_BGrid_8__m_right */
+ 0x0F1201E5, /* awbb_LowBrGrZones_m_BGrid_9__m_left */
+ 0x0F120455, /* awbb_LowBrGrZones_m_BGrid_9__m_right */
+ 0x0F1201C2, /* awbb_LowBrGrZones_m_BGrid_10__m_left */
+ 0x0F12041F, /* awbb_LowBrGrZones_m_BGrid_10__m_right */
+ 0x0F12019F, /* awbb_LowBrGrZones_m_BGrid_11__m_left */
+ 0x0F1203EA, /* awbb_LowBrGrZones_m_BGrid_11__m_right */
+ 0x0F12017D, /* awbb_LowBrGrZones_m_BGrid_12__m_left */
+ 0x0F1203B4, /* awbb_LowBrGrZones_m_BGrid_12__m_right */
+ 0x0F12015A, /* awbb_LowBrGrZones_m_BGrid_13__m_left */
+ 0x0F12037F, /* awbb_LowBrGrZones_m_BGrid_13__m_right */
+ 0x0F120137, /* awbb_LowBrGrZones_m_BGrid_14__m_left */
+ 0x0F120349, /* awbb_LowBrGrZones_m_BGrid_14__m_right */
+ 0x0F120130, /* awbb_LowBrGrZones_m_BGrid_15__m_left */
+ 0x0F120314, /* awbb_LowBrGrZones_m_BGrid_15__m_right */
+ 0x0F12012F, /* awbb_LowBrGrZones_m_BGrid_16__m_left */
+ 0x0F1202DE, /* awbb_LowBrGrZones_m_BGrid_16__m_right */
+ 0x0F12012F, /* awbb_LowBrGrZones_m_BGrid_17__m_left */
+ 0x0F1202B1, /* awbb_LowBrGrZones_m_BGrid_17__m_right */
+ 0x0F12012E, /* awbb_LowBrGrZones_m_BGrid_18__m_left */
+ 0x0F12028B, /* awbb_LowBrGrZones_m_BGrid_18__m_right */
+ 0x0F12012D, /* awbb_LowBrGrZones_m_BGrid_19__m_left */
+ 0x0F120265, /* awbb_LowBrGrZones_m_BGrid_19__m_right */
+ 0x0F12012C, /* awbb_LowBrGrZones_m_BGrid_20__m_left */
+ 0x0F12023F, /* awbb_LowBrGrZones_m_BGrid_20__m_right */
+ 0x0F12012C, /* awbb_LowBrGrZones_m_BGrid_21__m_left */
+ 0x0F120219, /* awbb_LowBrGrZones_m_BGrid_21__m_right */
+ 0x0F12012B, /* awbb_LowBrGrZones_m_BGrid_22__m_left */
+ 0x0F1201F3, /* awbb_LowBrGrZones_m_BGrid_22__m_right */
+ 0x0F12012A, /* awbb_LowBrGrZones_m_BGrid_23__m_left */
+ 0x0F1201CD, /* awbb_LowBrGrZones_m_BGrid_23__m_right */
+ 0x0F120000, /* awbb_LowBrGrZones_m_BGrid_24__m_left */
+ 0x0F120000, /* awbb_LowBrGrZones_m_BGrid_24__m_right */
+
+
+ /* 42param_end awbb_LowBrGrZones_m_BGrid */
+ 0x0F120005,
+ 0x0F120000,
+ 0x0F120018,
+ 0x0F120000,
+ 0x0F1200AF,
+ 0x0F120000,
+ 0x0F120002,
+ 0x0F120000,
+ 0x002A0D48,
+ 0x0F1200E0,
+ 0x0F120000,
+
+ /* Lowtemp circle */
+ 0x0F12032F,
+ 0x0F120000,
+ 0x0F12017A,
+ 0x0F120000,
+ 0x0F127300,
+ 0x0F120000,
+ 0x0F12000A,
+ 0x0F120000,
+ 0x002A0D60,
+ 0x0F1200E0,
+ 0x0F120000,
+ 0x002A0D82,
+ 0x0F120001,
+
+
+
+ 0x002A0D8E,
+ 0x0F120002, /* awbb_GridEnable */
+
+ /* Grid coefficients and Contrants */
+ 0x002A0DCE,
+ 0x0F12FFE0, /* awbb_GridCorr_R_0__0_ */
+ 0x0F12FFE0, /* D8 awbb_GridCorr_R_0__1_ */
+ 0x0F120000, /* awbb_GridCorr_R_0__2_ */
+ 0x0F120000, /* awbb_GridCorr_R_0__3_ */
+ 0x0F120000, /* awbb_GridCorr_R_0__4_ */
+ 0x0F120030, /* awbb_GridCorr_R_0__5_ */
+
+ 0x0F12FFE0, /* awbb_GridCorr_R_1__0_ */
+ 0x0F12FFE0, /* D8 awbb_GridCorr_R_1__1_ */
+ 0x0F120000, /* awbb_GridCorr_R_1__2_ */
+ 0x0F120000, /* awbb_GridCorr_R_1__3_ */
+ 0x0F120000, /* awbb_GridCorr_R_1__4_ */
+ 0x0F120030, /* awbb_GridCorr_R_1__5_ */
+
+ 0x0F12FFE0, /* awbb_GridCorr_R_2__0_ */
+ 0x0F12FFE0, /* D8 awbb_GridCorr_R_2__1_ */
+ 0x0F120000, /* awbb_GridCorr_R_2__2_ */
+ 0x0F120000, /* awbb_GridCorr_R_2__3_ */
+ 0x0F120000, /* awbb_GridCorr_R_2__4_ */
+ 0x0F120030, /* awbb_GridCorr_R_2__5_ */
+
+ 0x0F120004, /* 08 awbb_GridCorr_B_0__0_ */
+ 0x0F120000, /* awbb_GridCorr_B_0__1_ */
+ 0x0F120000, /* awbb_GridCorr_B_0__2_ */
+ 0x0F12FFC0, /* awbb_GridCorr_B_0__3_ */
+ 0x0F12FFB0, /* awbb_GridCorr_B_0__4_ */
+ 0x0F12FF30, /* awbb_GridCorr_B_0__5_ */
+
+ 0x0F120004, /* 08 awbb_GridCorr_B_1__0_ */
+ 0x0F120000, /* awbb_GridCorr_B_1__1_ */
+ 0x0F120000, /* awbb_GridCorr_B_1__2_ */
+ 0x0F12FFC0, /* awbb_GridCorr_B_1__3_ */
+ 0x0F12FFB0, /* awbb_GridCorr_B_1__4_ */
+ 0x0F12FF30, /* awbb_GridCorr_B_1__5_ */
+
+ 0x0F120004, /* 08 awbb_GridCorr_B_2__0_ */
+ 0x0F120000, /* awbb_GridCorr_B_2__1_ */
+ 0x0F120000, /* awbb_GridCorr_B_2__2_ */
+ 0x0F12FFC0, /* awbb_GridCorr_B_2__3_ */
+ 0x0F12FFB0, /* awbb_GridCorr_B_2__4_ */
+ 0x0F12FF30, /* awbb_GridCorr_B_2__5_ */
+
+ 0x0F1202C6,
+ 0x0F120335,
+ 0x0F1203B3,
+ 0x0F121021,
+ 0x0F12107E,
+ 0x0F12113E,
+ 0x0F12117C,
+ 0x0F1211C2,
+ 0x0F12120B,
+
+ 0x0F1200B3,
+ 0x0F1200B7,
+ 0x0F1200D3,
+ 0x0F120091,
+
+ /* White Locus */
+ 0x002A0D66,
+ 0x0F120133,
+ 0x0F12010F,
+ 0x002A0D74,
+ 0x0F12052A,
+
+ /* Gamut Thresholds */
+ 0x002A0DAE,
+ 0x0F120036,
+ 0x0F12001C,
+ 0x002A0DAA,
+ 0x0F12071A,
+ 0x0F1203A4,
+
+ /* SceneDetection Thresholds */
+ 0x002A0D92,
+ 0x0F120BB8,
+ 0x0F120096,
+ 0x002A0E86,
+ 0x0F120216,
+ 0x0F12029F,
+ 0x002A0D96,
+ 0x0F120BB7,
+ 0x0F120096,
+ 0x002A0DB2,
+ 0x0F1200DA,
+ 0x002A0D9A,
+ 0x0F12000A,
+ 0x002A0DB4,
+ 0x0F120459,
+ 0x002A0DA4,
+ 0x0F12000E,
+ 0x002A0D64,
+ 0x0F120032,
+ 0x002A0DA6,
+ 0x0F12001E,
+ 0x002A0D9C,
+ 0x0F12001B,
+ 0x0F12000E,
+ 0x0F120008,
+ 0x0F120004,
+
+ /* AWB Debug.(Outdoor Pink) */
+ 0x002A0E30,
+ 0x0F120000,
+ 0x002A0E84,
+ 0x0F120000,
+
+ /* UseInvalidOutdoor option */
+ 0x002A0D88,
+ 0x0F120001,
+
+ /* AWB input Y-Filter setting */
+ 0x002A0C48,
+ 0x0F120020,
+ 0x002A0C50,
+ 0x0F1200E0,
+ 0x002A0CC4,
+ 0x0F120020,
+ 0x002A0CCC,
+ 0x0F1200C0,
+
+
+ 0x002A0DC2,
+ 0x0F120030,
+ 0x0F1200C8,
+ 0x0F12012C,
+ 0x0F120210, /* 258 awbb_GainsMaxMove */
+ 0x0F120003,
+
+
+ /* Set CCM */
+ /* CCM Start Address */
+ 0x002A06D0,
+ 0x0F122800,
+ 0x0F127000,
+ 0x0F122824,
+ 0x0F127000,
+ 0x0F122848,
+ 0x0F127000,
+ 0x0F12286C,
+ 0x0F127000,
+ 0x0F122890,
+ 0x0F127000,
+ 0x0F1228B4,
+ 0x0F127000,
+ 0x002A06EC,
+ 0x0F1228D8,
+ 0x0F127000,
+
+ /* CCM */
+ 0x002A2800,
+ 0x0F1201E1,
+ 0x0F12FFC4,
+ 0x0F12FFF8,
+ 0x0F120101,
+ 0x0F12014C,
+ 0x0F12FF55,
+ 0x0F12FF5B,
+ 0x0F120205,
+ 0x0F12FF17,
+ 0x0F12FEFE,
+ 0x0F1201B6,
+ 0x0F120107,
+ 0x0F12FFDB,
+ 0x0F12FFDB,
+ 0x0F1201D1,
+ 0x0F120163,
+ 0x0F12FF9E,
+ 0x0F1201B3,
+
+ 0x0F1201E1,
+ 0x0F12FFC4,
+ 0x0F12FFF8,
+ 0x0F120101,
+ 0x0F12014C,
+ 0x0F12FF55,
+ 0x0F12FF5B,
+ 0x0F120205,
+ 0x0F12FF17,
+ 0x0F12FEFE,
+ 0x0F1201B6,
+ 0x0F120107,
+ 0x0F12FFDB,
+ 0x0F12FFDB,
+ 0x0F1201D1,
+ 0x0F120163,
+ 0x0F12FF9E,
+ 0x0F1201B3,
+
+ 0x0F1201E1,
+ 0x0F12FFC4,
+ 0x0F12FFF8,
+ 0x0F120101,
+ 0x0F12014C,
+ 0x0F12FF55,
+ 0x0F12FF5B,
+ 0x0F120205,
+ 0x0F12FF17,
+ 0x0F12FEFE,
+ 0x0F1201B6,
+ 0x0F120107,
+ 0x0F12FFDB,
+ 0x0F12FFDB,
+ 0x0F1201D1,
+ 0x0F120163,
+ 0x0F12FF9E,
+ 0x0F1201B3,
+
+ 0x0F1201FB,
+ 0x0F12FFA9,
+ 0x0F12FFEA,
+ 0x0F12013C,
+ 0x0F120140,
+ 0x0F12FF53,
+ 0x0F12FE7A,
+ 0x0F12017D,
+ 0x0F12FEED,
+ 0x0F12FF39,
+ 0x0F1201D6,
+ 0x0F1200C4,
+ 0x0F12FFC0,
+ 0x0F12FFBF,
+ 0x0F1201CD,
+ 0x0F120182,
+ 0x0F12FF91,
+ 0x0F1201AA,
+
+ 0x0F1201C5,
+ 0x0F12FF9F,
+ 0x0F12FFE5,
+ 0x0F1200E2,
+ 0x0F12010E,
+ 0x0F12FF62,
+ 0x0F12FF03,
+ 0x0F1201D0,
+ 0x0F12FF3E,
+ 0x0F12FF00,
+ 0x0F1201A6,
+ 0x0F1200BB,
+ 0x0F12FFBF,
+ 0x0F12FFDD,
+ 0x0F1201F6,
+ 0x0F1200CB,
+ 0x0F12FF94,
+ 0x0F12019E,
+
+ 0x0F1201D2,
+ 0x0F12FFC2,
+ 0x0F12FFFC,
+ 0x0F1200E8,
+ 0x0F120126,
+ 0x0F12FF83,
+ 0x0F12FE7A,
+ 0x0F12017D,
+ 0x0F12FEED,
+ 0x0F12FF8A,
+ 0x0F1201F9,
+ 0x0F12005B,
+ 0x0F12FFCA,
+ 0x0F12FFA3,
+ 0x0F1201DA,
+ 0x0F120108,
+ 0x0F12FFB3,
+ 0x0F1201DD,
+
+ 0x0F1201D2,
+ 0x0F12FFC2,
+ 0x0F12FFFC,
+ 0x0F1200F4,
+ 0x0F120139,
+ 0x0F12FF64,
+ 0x0F12FEEC,
+ 0x0F1201FD,
+ 0x0F12FF8E,
+ 0x0F12FEF4,
+ 0x0F1201BD,
+ 0x0F12010A,
+ 0x0F12FFA2,
+ 0x0F12FFDE,
+ 0x0F120208,
+ 0x0F120163,
+ 0x0F12FF9E,
+ 0x0F1201B3,
+
+ /* Set NB */
+ 0x002A07EA,
+ 0x0F120000, /*afit_bUseNoiseInd 0 : NB 1: Noise Index */
+
+ /* param_start SARR_uNormBrInDoor */
+ 0x0F12000A, /* SARR_uNormBrInDoor[0] */
+ 0x0F120019, /* SARR_uNormBrInDoor[1] */
+ 0x0F12007D, /* SARR_uNormBrInDoor[2] */
+ 0x0F1202BC, /* SARR_uNormBrInDoor[3] */
+ 0x0F1207D0, /* SARR_uNormBrInDoor[4] */
+
+ /* param_start SARR_uNormBrOutDoor */
+ 0x0F12000A, /* SARR_uNormBrOutDoor[0] */
+ 0x0F120019, /* SARR_uNormBrOutDoor[1] */
+ 0x0F12007D, /* SARR_uNormBrOutDoor[2] */
+ 0x0F1202BC, /* SARR_uNormBrOutDoor[3] */
+ 0x0F1207D0, /* SARR_uNormBrOutDoor[4] */
+
+ /* Set AFIT */
+ 0x002A0814,
+ 0x0F12082C,
+ 0x0F127000,
+
+ 0x002A082C,
+ 0x0F120000, /* BRIGHTNESS */
+ 0x0F120000, /* CONTRAST */
+ 0x0F120010, /* SATURATION */
+ 0x0F12FFE2, /* SHARP_BLUR */
+ 0x0F120000, /* GLAMOUR */
+ 0x0F1203FF, /* Disparity_iSatSat */
+ 0x0F1203FF, /* Denoise1_iYDenThreshLow */
+ 0x0F120028, /* Denoise1_iYDenThreshLow_Bin */
+ 0x0F1203FF, /* Denoise1_iYDenThreshHigh */
+ 0x0F1200FF, /* Denoise1_iYDenThreshHigh_Bin */
+ 0x0F120002, /* Denoise1_iLowWWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWWideThresh */
+ 0x0F12000A, /* Denoise1_iLowWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWideThresh */
+ 0x0F1203FF, /* Denoise1_iSatSat */
+ 0x0F1203FF, /* Demosaic4_iHystGrayLow */
+ 0x0F120000, /* Demosaic4_iHystGrayHigh */
+ 0x0F120344, /* UVDenoise_iYLowThresh */
+ 0x0F12033A, /* UVDenoise_iYHighThresh */
+ 0x0F1203FF, /* UVDenoise_iUVLowThresh */
+ 0x0F1203FF, /* UVDenoise_iUVHighThresh */
+ 0x0F120028, /* DSMix1_iLowLimit_Wide */
+ 0x0F120032, /* DSMix1_iLowLimit_Wide_Bin */
+ 0x0F120014, /* DSMix1_iHighLimit_Wide */
+ 0x0F120032, /* DSMix1_iHighLimit_Wide_Bin */
+ 0x0F120050, /* DSMix1_iLowLimit_Fine */
+ 0x0F120032, /* DSMix1_iLowLimit_Fine_Bin */
+ 0x0F120046, /* DSMix1_iHighLimit_Fine */
+ 0x0F120032, /* DSMix1_iHighLimit_Fine_Bin */
+ 0x0F120106, /* DSMix1_iRGBOffset */
+ 0x0F12006F, /* DSMix1_iDemClamp */
+ 0x0F120C0F, /* "Disparity_iDispTH_LowDisparity_iDispTH_Low_Bin" */
+ 0x0F120C0F, /* "Disparity_iDispTH_High Disparity_iDispTH_High_Bin" */
+ 0x0F120303, /* "Despeckle_iCorrectionLevelColdDespeckle_iCorrectionLevelCold_Bin" */
+ 0x0F120303, /* Despeckle_iCorrectionLevelHotDespeckle_iCorrectionLevelHot_Bin */
+ 0x0F12140A, /* "Despeckle_iColdThreshLowDespeckle_iColdThreshHigh" */
+ 0x0F12140A, /* "Despeckle_iHotThreshLowDespeckle_iHotThreshHigh" */
+ 0x0F122828, /* "Denoise1_iLowMaxSlopeAllowedDenoise1_iHighMaxSlopeAllowed" */
+ 0x0F120606, /* "Denoise1_iLowSlopeThreshDenoise1_iHighSlopeThresh" */
+ 0x0F12023F, /* "Denoise1_iRadialPowerDenoise1_iRadialDivideShift" */
+ 0x0F120480, /* "Denoise1_iRadialLimitDenoise1_iLWBNoise" */
+ 0x0F12000F, /* "Denoise1_iWideDenoise1_iWideWide" */
+ 0x0F12030A, /* "Demosaic4_iHystGrayRangeUVDenoise_iYSupport" */
+ 0x0F120003, /* "UVDenoise_iUVSupportDSMix1_iLowPower_Wide" */
+ 0x0F120011, /* "DSMix1_iLowPower_Wide_BinDSMix1_iHighPower_Wide" */
+ 0x0F120A0F, /* "DSMix1_iHighPower_Wide_BinDSMix1_iLowThresh_Wide" */
+ 0x0F12050A, /* "DSMix1_iHighThresh_WideDSMix1_iReduceNegativeWide" */
+ 0x0F120900, /* "DSMix1_iLowPower_FineDSMix1_iLowPower_Fine_Bin" */
+ 0x0F120000, /* "DSMix1_iHighPower_FineDSMix1_iHighPower_Fine_Bin" */
+ 0x0F12980A, /* "DSMix1_iLowThresh_FineDSMix1_iHighThresh_Fine" */
+ 0x0F120005, /* "DSMix1_iReduceNegativeFineDSMix1_iRGBMultiplier" */
+ 0x0F120000, /* "Mixer1_iNLowNoisePowerMixer1_iNLowNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iNVeryLowNoisePowerMixer1_iNVeryLowNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iNHighNoisePowerMixer1_iNHighNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iWLowNoisePowerMixer1_iWVeryLowNoisePower" */
+ 0x0F120A00, /* "Mixer1_iWHighNoisePowerMixer1_iWLowNoiseCeilGain" */
+ 0x0F12000A, /* "Mixer1_iWHighNoiseCeilGainMixer1_iWNoiseCeilGain" */
+ 0x0F120180, /* "CCM_Oscar_iSaturationCCM_Oscar_bSaturation" */
+ 0x0F120180, /* "RGBGamma2_iLinearityRGBGamma2_bLinearity" */
+ 0x0F120100, /* "RGBGamma2_iDarkReduceRGBGamma2_bDarkReduce" */
+ 0x0F126E14, /* "byr_gas2_iShadingPowerRGB2YUV_iRGBGain" */
+ 0x0F120180, /* "RGB2YUV_iSaturationRGB2YUV_bGainOffset" */
+ 0x0F120008, /* RGB2YUV_iYOffset */
+
+ 0x0F120000, /* BRIGHTNESS */
+ 0x0F120000, /* CONTRAST */
+ 0x0F120000, /* SATURATION */
+ 0x0F120000, /* SHARP_BLUR */
+ 0x0F120000, /* GLAMOUR */
+ 0x0F1203FF, /* Disparity_iSatSat */
+ 0x0F120014, /* Denoise1_iYDenThreshLow */
+ 0x0F12000E, /* Denoise1_iYDenThreshLow_Bin */
+ 0x0F120064, /* Denoise1_iYDenThreshHigh */
+ 0x0F1200FF, /* Denoise1_iYDenThreshHigh_Bin */
+ 0x0F120002, /* Denoise1_iLowWWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWWideThresh */
+ 0x0F12000A, /* Denoise1_iLowWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWideThresh */
+ 0x0F1203FF, /* Denoise1_iSatSat */
+ 0x0F1203FF, /* Demosaic4_iHystGrayLow */
+ 0x0F120000, /* Demosaic4_iHystGrayHigh */
+ 0x0F120114, /* UVDenoise_iYLowThresh */
+ 0x0F12020A, /* UVDenoise_iYHighThresh */
+ 0x0F1203FF, /* UVDenoise_iUVLowThresh */
+ 0x0F1203FF, /* UVDenoise_iUVHighThresh */
+ 0x0F120028, /* DSMix1_iLowLimit_Wide */
+ 0x0F120000, /* DSMix1_iLowLimit_Wide_Bin */
+ 0x0F120014, /* DSMix1_iHighLimit_Wide */
+ 0x0F120032, /* DSMix1_iHighLimit_Wide_Bin */
+ 0x0F120050, /* DSMix1_iLowLimit_Fine */
+ 0x0F120032, /* DSMix1_iLowLimit_Fine_Bin */
+ 0x0F120046, /* DSMix1_iHighLimit_Fine */
+ 0x0F120032, /* DSMix1_iHighLimit_Fine_Bin */
+ 0x0F120106, /* DSMix1_iRGBOffset */
+ 0x0F12006F, /* DSMix1_iDemClamp */
+ 0x0F12050F, /* "Disparity_iDispTH_LowDisparity_iDispTH_Low_Bin" */
+ 0x0F120A0F, /* "Disparity_iDispTH_High Disparity_iDispTH_High_Bin" */
+ 0x0F120303, /* "Despeckle_iCorrectionLevelColdDespeckle_iCorrectionLevelCold_Bin" */
+ 0x0F120303, /* Despeckle_iCorrectionLevelHotDespeckle_iCorrectionLevelHot_Bin */
+ 0x0F12140A, /* "Despeckle_iColdThreshLowDespeckle_iColdThreshHigh" */
+ 0x0F12140A, /* "Despeckle_iHotThreshLowDespeckle_iHotThreshHigh" */
+ 0x0F122828, /* "Denoise1_iLowMaxSlopeAllowedDenoise1_iHighMaxSlopeAllowed" */
+ 0x0F120606, /* "Denoise1_iLowSlopeThreshDenoise1_iHighSlopeThresh" */
+ 0x0F12020A, /* "Denoise1_iRadialPowerDenoise1_iRadialDivideShift" */
+ 0x0F120480, /* "Denoise1_iRadialLimitDenoise1_iLWBNoise" */
+ 0x0F12000F, /* "Denoise1_iWideDenoise1_iWideWide" */
+ 0x0F120305, /* "Demosaic4_iHystGrayRangeUVDenoise_iYSupport" */
+ 0x0F122803, /* "UVDenoise_iUVSupportDSMix1_iLowPower_Wide" */
+ 0x0F122811, /* "DSMix1_iLowPower_Wide_BinDSMix1_iHighPower_Wide" */
+ 0x0F120A0F, /* "DSMix1_iHighPower_Wide_BinDSMix1_iLowThresh_Wide" */
+ 0x0F12050A, /* "DSMix1_iHighThresh_WideDSMix1_iReduceNegativeWide" */
+ 0x0F12101E, /* "DSMix1_iLowPower_FineDSMix1_iLowPower_Fine_Bin" */
+ 0x0F12101E, /* "DSMix1_iHighPower_FineDSMix1_iHighPower_Fine_Bin" */
+ 0x0F12980A, /* "DSMix1_iLowThresh_FineDSMix1_iHighThresh_Fine" */
+ 0x0F120005, /* "DSMix1_iReduceNegativeFineDSMix1_iRGBMultiplier" */
+ 0x0F120400, /* "Mixer1_iNLowNoisePowerMixer1_iNLowNoisePower_Bin" */
+ 0x0F120400, /* "Mixer1_iNVeryLowNoisePowerMixer1_iNVeryLowNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iNHighNoisePowerMixer1_iNHighNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iWLowNoisePowerMixer1_iWVeryLowNoisePower" */
+ 0x0F120A00, /* "Mixer1_iWHighNoisePowerMixer1_iWLowNoiseCeilGain" */
+ 0x0F12100A, /* "Mixer1_iWHighNoiseCeilGainMixer1_iWNoiseCeilGain" */
+ 0x0F120180, /* "CCM_Oscar_iSaturationCCM_Oscar_bSaturation" */
+ 0x0F120180, /* "RGBGamma2_iLinearityRGBGamma2_bLinearity" */
+ 0x0F120100, /* "RGBGamma2_iDarkReduceRGBGamma2_bDarkReduce" */
+ 0x0F128030, /* "byr_gas2_iShadingPowerRGB2YUV_iRGBGain" */
+ 0x0F120180, /* "RGB2YUV_iSaturationRGB2YUV_bGainOffset" */
+ 0x0F120000, /* RGB2YUV_iYOffset */
+
+ 0x0F120000, /* BRIGHTNESS */
+ 0x0F120000, /* CONTRAST */
+ 0x0F120000, /* SATURATION */
+ 0x0F120000, /* SHARP_BLUR */
+ 0x0F120000, /* GLAMOUR */
+ 0x0F1203FF, /* Disparity_iSatSat */
+ 0x0F12000C, /* Denoise1_iYDenThreshLow */
+ 0x0F120006, /* Denoise1_iYDenThreshLow_Bin */
+ 0x0F120060, /* Denoise1_iYDenThreshHigh */
+ 0x0F120050, /* Denoise1_iYDenThreshHigh_Bin */
+ 0x0F120002, /* Denoise1_iLowWWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWWideThresh */
+ 0x0F12000A, /* Denoise1_iLowWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWideThresh */
+ 0x0F1203FF, /* Denoise1_iSatSat */
+ 0x0F1203FF, /* Demosaic4_iHystGrayLow */
+ 0x0F120000, /* Demosaic4_iHystGrayHigh */
+ 0x0F120014, /* UVDenoise_iYLowThresh */
+ 0x0F12000A, /* UVDenoise_iYHighThresh */
+ 0x0F1203FF, /* UVDenoise_iUVLowThresh */
+ 0x0F1203FF, /* UVDenoise_iUVHighThresh */
+ 0x0F120028, /* DSMix1_iLowLimit_Wide */
+ 0x0F120032, /* DSMix1_iLowLimit_Wide_Bin */
+ 0x0F120014, /* DSMix1_iHighLimit_Wide */
+ 0x0F120032, /* DSMix1_iHighLimit_Wide_Bin */
+ 0x0F120050, /* DSMix1_iLowLimit_Fine */
+ 0x0F120032, /* DSMix1_iLowLimit_Fine_Bin */
+ 0x0F120010, /* DSMix1_iHighLimit_Fine */
+ 0x0F120032, /* DSMix1_iHighLimit_Fine_Bin */
+ 0x0F120106, /* DSMix1_iRGBOffset */
+ 0x0F12006F, /* DSMix1_iDemClamp */
+ 0x0F120202, /* "Disparity_iDispTH_LowDisparity_iDispTH_Low_Bin" */
+ 0x0F120502, /* "Disparity_iDispTH_High Disparity_iDispTH_High_Bin" */
+ 0x0F120202, /* "Despeckle_iCorrectionLevelColdDespeckle_iCorrectionLevelCold_Bin" */
+ 0x0F120202, /* Despeckle_iCorrectionLevelHotDespeckle_iCorrectionLevelHot_Bin */
+ 0x0F12140A, /* "Despeckle_iColdThreshLowDespeckle_iColdThreshHigh" */
+ 0x0F12140A, /* "Despeckle_iHotThreshLowDespeckle_iHotThreshHigh" */
+ 0x0F122828, /* "Denoise1_iLowMaxSlopeAllowedDenoise1_iHighMaxSlopeAllowed" */
+ 0x0F120606, /* "Denoise1_iLowSlopeThreshDenoise1_iHighSlopeThresh" */
+ 0x0F120205, /* "Denoise1_iRadialPowerDenoise1_iRadialDivideShift" */
+ 0x0F120480, /* "Denoise1_iRadialLimitDenoise1_iLWBNoise" */
+ 0x0F12000F, /* "Denoise1_iWideDenoise1_iWideWide" */
+ 0x0F120005, /* "Demosaic4_iHystGrayRangeUVDenoise_iYSupport" */
+ 0x0F122803, /* "UVDenoise_iUVSupportDSMix1_iLowPower_Wide" */
+ 0x0F122811, /* "DSMix1_iLowPower_Wide_BinDSMix1_iHighPower_Wide" */
+ 0x0F120A0F, /* "DSMix1_iHighPower_Wide_BinDSMix1_iLowThresh_Wide" */
+ 0x0F12050A, /* "DSMix1_iHighThresh_WideDSMix1_iReduceNegativeWide" */
+ 0x0F122020, /* "DSMix1_iLowPower_FineDSMix1_iLowPower_Fine_Bin" */
+ 0x0F122020, /* "DSMix1_iHighPower_FineDSMix1_iHighPower_Fine_Bin" */
+ 0x0F12980A, /* "DSMix1_iLowThresh_FineDSMix1_iHighThresh_Fine" */
+ 0x0F120007, /* "DSMix1_iReduceNegativeFineDSMix1_iRGBMultiplier" */
+ 0x0F120403, /* "Mixer1_iNLowNoisePowerMixer1_iNLowNoisePower_Bin" */
+ 0x0F120402, /* "Mixer1_iNVeryLowNoisePowerMixer1_iNVeryLowNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iNHighNoisePowerMixer1_iNHighNoisePower_Bin" */
+ 0x0F120203, /* "Mixer1_iWLowNoisePowerMixer1_iWVeryLowNoisePower" */
+ 0x0F120000, /* "Mixer1_iWHighNoisePowerMixer1_iWLowNoiseCeilGain" */
+ 0x0F121006, /* "Mixer1_iWHighNoiseCeilGainMixer1_iWNoiseCeilGain" */
+ 0x0F120180, /* "CCM_Oscar_iSaturationCCM_Oscar_bSaturation" */
+ 0x0F120180, /* "RGBGamma2_iLinearityRGBGamma2_bLinearity" */
+ 0x0F120100, /* "RGBGamma2_iDarkReduceRGBGamma2_bDarkReduce" */
+ 0x0F12803C, /* "byr_gas2_iShadingPowerRGB2YUV_iRGBGain" */
+ 0x0F120180, /* "RGB2YUV_iSaturationRGB2YUV_bGainOffset" */
+ 0x0F120000, /* RGB2YUV_iYOffset */
+
+ 0x0F120000, /* BRIGHTNESS */
+ 0x0F120000, /* CONTRAST */
+ 0x0F120000, /* SATURATION */
+ 0x0F120000, /* SHARP_BLUR */
+ 0x0F120000, /* GLAMOUR */
+ 0x0F1203FF, /* Disparity_iSatSat */
+ 0x0F120006, /* Denoise1_iYDenThreshLow */
+ 0x0F120006, /* Denoise1_iYDenThreshLow_Bin */
+ 0x0F12005A, /* Denoise1_iYDenThreshHigh */
+ 0x0F120050, /* Denoise1_iYDenThreshHigh_Bin */
+ 0x0F120002, /* Denoise1_iLowWWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWWideThresh */
+ 0x0F12000A, /* Denoise1_iLowWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWideThresh */
+ 0x0F1203FF, /* Denoise1_iSatSat */
+ 0x0F1203FF, /* Demosaic4_iHystGrayLow */
+ 0x0F120000, /* Demosaic4_iHystGrayHigh */
+ 0x0F120014, /* UVDenoise_iYLowThresh */
+ 0x0F12000A, /* UVDenoise_iYHighThresh */
+ 0x0F1203FF, /* UVDenoise_iUVLowThresh */
+ 0x0F1203FF, /* UVDenoise_iUVHighThresh */
+ 0x0F120028, /* DSMix1_iLowLimit_Wide */
+ 0x0F120032, /* DSMix1_iLowLimit_Wide_Bin */
+ 0x0F120014, /* DSMix1_iHighLimit_Wide */
+ 0x0F120032, /* DSMix1_iHighLimit_Wide_Bin */
+ 0x0F120050, /* DSMix1_iLowLimit_Fine */
+ 0x0F120032, /* DSMix1_iLowLimit_Fine_Bin */
+ 0x0F120010, /* DSMix1_iHighLimit_Fine */
+ 0x0F120032, /* DSMix1_iHighLimit_Fine_Bin */
+ 0x0F120106, /* DSMix1_iRGBOffset */
+ 0x0F12006F, /* DSMix1_iDemClamp */
+ 0x0F120202, /* "Disparity_iDispTH_LowDisparity_iDispTH_Low_Bin" */
+ 0x0F120502, /* "Disparity_iDispTH_High Disparity_iDispTH_High_Bin" */
+ 0x0F120202, /* "Despeckle_iCorrectionLevelColdDespeckle_iCorrectionLevelCold_Bin" */
+ 0x0F120202, /* Despeckle_iCorrectionLevelHotDespeckle_iCorrectionLevelHot_Bin */
+ 0x0F12140A, /* "Despeckle_iColdThreshLowDespeckle_iColdThreshHigh" */
+ 0x0F12140A, /* "Despeckle_iHotThreshLowDespeckle_iHotThreshHigh" */
+ 0x0F122828, /* "Denoise1_iLowMaxSlopeAllowedDenoise1_iHighMaxSlopeAllowed" */
+ 0x0F120606, /* "Denoise1_iLowSlopeThreshDenoise1_iHighSlopeThresh" */
+ 0x0F120205, /* "Denoise1_iRadialPowerDenoise1_iRadialDivideShift" */
+ 0x0F120480, /* "Denoise1_iRadialLimitDenoise1_iLWBNoise" */
+ 0x0F12000F, /* "Denoise1_iWideDenoise1_iWideWide" */
+ 0x0F120005, /* "Demosaic4_iHystGrayRangeUVDenoise_iYSupport" */
+ 0x0F122803, /* "UVDenoise_iUVSupportDSMix1_iLowPower_Wide" */
+ 0x0F122811, /* "DSMix1_iLowPower_Wide_BinDSMix1_iHighPower_Wide" */
+ 0x0F120A0F, /* "DSMix1_iHighPower_Wide_BinDSMix1_iLowThresh_Wide" */
+ 0x0F12050A, /* "DSMix1_iHighThresh_WideDSMix1_iReduceNegativeWide" */
+ 0x0F122020, /* "DSMix1_iLowPower_FineDSMix1_iLowPower_Fine_Bin" */
+ 0x0F122020, /* "DSMix1_iHighPower_FineDSMix1_iHighPower_Fine_Bin" */
+ 0x0F12980A, /* "DSMix1_iLowThresh_FineDSMix1_iHighThresh_Fine" */
+ 0x0F120007, /* "DSMix1_iReduceNegativeFineDSMix1_iRGBMultiplier" */
+ 0x0F120403, /* "Mixer1_iNLowNoisePowerMixer1_iNLowNoisePower_Bin" */
+ 0x0F120402, /* "Mixer1_iNVeryLowNoisePowerMixer1_iNVeryLowNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iNHighNoisePowerMixer1_iNHighNoisePower_Bin" */
+ 0x0F120203, /* "Mixer1_iWLowNoisePowerMixer1_iWVeryLowNoisePower" */
+ 0x0F120000, /* "Mixer1_iWHighNoisePowerMixer1_iWLowNoiseCeilGain" */
+ 0x0F121006, /* "Mixer1_iWHighNoiseCeilGainMixer1_iWNoiseCeilGain" */
+ 0x0F120180, /* "CCM_Oscar_iSaturationCCM_Oscar_bSaturation" */
+ 0x0F120180, /* "RGBGamma2_iLinearityRGBGamma2_bLinearity" */
+ 0x0F120100, /* "RGBGamma2_iDarkReduceRGBGamma2_bDarkReduce" */
+ 0x0F12803C, /* "byr_gas2_iShadingPowerRGB2YUV_iRGBGain" */
+ 0x0F120180, /* "RGB2YUV_iSaturationRGB2YUV_bGainOffset" */
+ 0x0F120000, /* RGB2YUV_iYOffset */
+
+ 0x0F120000, /* BRIGHTNESS */
+ 0x0F12000A, /* CONTRAST */
+ 0x0F120000, /* SATURATION */
+ 0x0F120000, /* SHARP_BLUR */
+ 0x0F120000, /* GLAMOUR */
+ 0x0F1203FF, /* Disparity_iSatSat */
+ 0x0F120006, /* Denoise1_iYDenThreshLow */
+ 0x0F120006, /* Denoise1_iYDenThreshLow_Bin */
+ 0x0F120050, /* Denoise1_iYDenThreshHigh */
+ 0x0F120050, /* Denoise1_iYDenThreshHigh_Bin */
+ 0x0F120002, /* Denoise1_iLowWWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWWideThresh */
+ 0x0F12000A, /* Denoise1_iLowWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWideThresh */
+ 0x0F1203FF, /* Denoise1_iSatSat */
+ 0x0F1203FF, /* Demosaic4_iHystGrayLow */
+ 0x0F120000, /* Demosaic4_iHystGrayHigh */
+ 0x0F120000, /* UVDenoise_iYLowThresh */
+ 0x0F120000, /* UVDenoise_iYHighThresh */
+ 0x0F1203FF, /* UVDenoise_iUVLowThresh */
+ 0x0F1203FF, /* UVDenoise_iUVHighThresh */
+ 0x0F120028, /* DSMix1_iLowLimit_Wide */
+ 0x0F120032, /* DSMix1_iLowLimit_Wide_Bin */
+ 0x0F120000, /* DSMix1_iHighLimit_Wide */
+ 0x0F120032, /* DSMix1_iHighLimit_Wide_Bin */
+ 0x0F120030, /* DSMix1_iLowLimit_Fine */
+ 0x0F120032, /* DSMix1_iLowLimit_Fine_Bin */
+ 0x0F120000, /* DSMix1_iHighLimit_Fine */
+ 0x0F120032, /* DSMix1_iHighLimit_Fine_Bin */
+ 0x0F120106, /* DSMix1_iRGBOffset */
+ 0x0F12006F, /* DSMix1_iDemClamp */
+ 0x0F120202, /* "Disparity_iDispTH_LowDisparity_iDispTH_Low_Bin" */
+ 0x0F120502, /* "Disparity_iDispTH_High Disparity_iDispTH_High_Bin" */
+ 0x0F120202, /* "Despeckle_iCorrectionLevelColdDespeckle_iCorrectionLevelCold_Bin" */
+ 0x0F120202, /* Despeckle_iCorrectionLevelHotDespeckle_iCorrectionLevelHot_Bin */
+ 0x0F12140A, /* "Despeckle_iColdThreshLowDespeckle_iColdThreshHigh" */
+ 0x0F12140A, /* "Despeckle_iHotThreshLowDespeckle_iHotThreshHigh" */
+ 0x0F122828, /* "Denoise1_iLowMaxSlopeAllowedDenoise1_iHighMaxSlopeAllowed" */
+ 0x0F120606, /* "Denoise1_iLowSlopeThreshDenoise1_iHighSlopeThresh" */
+ 0x0F120205, /* "Denoise1_iRadialPowerDenoise1_iRadialDivideShift" */
+ 0x0F120880, /* "Denoise1_iRadialLimitDenoise1_iLWBNoise" */
+ 0x0F12000F, /* "Denoise1_iWideDenoise1_iWideWide" */
+ 0x0F120005, /* "Demosaic4_iHystGrayRangeUVDenoise_iYSupport" */
+ 0x0F122803, /* "UVDenoise_iUVSupportDSMix1_iLowPower_Wide" */
+ 0x0F122811, /* "DSMix1_iLowPower_Wide_BinDSMix1_iHighPower_Wide" */
+ 0x0F120A0F, /* "DSMix1_iHighPower_Wide_BinDSMix1_iLowThresh_Wide" */
+ 0x0F12050A, /* "DSMix1_iHighThresh_WideDSMix1_iReduceNegativeWide" */
+ 0x0F122020, /* "DSMix1_iLowPower_FineDSMix1_iLowPower_Fine_Bin" */
+ 0x0F122020, /* "DSMix1_iHighPower_FineDSMix1_iHighPower_Fine_Bin" */
+ 0x0F12980A, /* "DSMix1_iLowThresh_FineDSMix1_iHighThresh_Fine" */
+ 0x0F120007, /* "DSMix1_iReduceNegativeFineDSMix1_iRGBMultiplier" */
+ 0x0F120408, /* "Mixer1_iNLowNoisePowerMixer1_iNLowNoisePower_Bin" */
+ 0x0F120406, /* "Mixer1_iNVeryLowNoisePowerMixer1_iNVeryLowNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iNHighNoisePowerMixer1_iNHighNoisePower_Bin" */
+ 0x0F120608, /* "Mixer1_iWLowNoisePowerMixer1_iWVeryLowNoisePower" */
+ 0x0F120000, /* "Mixer1_iWHighNoisePowerMixer1_iWLowNoiseCeilGain" */
+ 0x0F121006, /* "Mixer1_iWHighNoiseCeilGainMixer1_iWNoiseCeilGain" */
+ 0x0F120180, /* "CCM_Oscar_iSaturationCCM_Oscar_bSaturation" */
+ 0x0F120180, /* "RGBGamma2_iLinearityRGBGamma2_bLinearity" */
+ 0x0F120100, /* "RGBGamma2_iDarkReduceRGBGamma2_bDarkReduce" */
+ 0x0F128050, /* "byr_gas2_iShadingPowerRGB2YUV_iRGBGain" */
+ 0x0F120180, /* "RGB2YUV_iSaturationRGB2YUV_bGainOffset" */
+ 0x0F120000, /* RGB2YUV_iYOffset */
+
+ 0x0F1200FF,
+ 0x0F1200FF,
+ 0x0F120800,
+ 0x0F120600,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120300,
+ 0x0F120002,
+ 0x0F120400,
+ 0x0F120106,
+ 0x0F120005,
+ 0x0F120000,
+ 0x0F120703,
+ 0x0F120000,
+ 0x0F12FFD6,
+ 0x0F1253C1,
+ 0x0F12E1FE,
+ 0x0F120001,
+
+ /* Update Changed Registers */
+ 0x002A03FC,
+ 0x0F120001, /* REG_TC_DBG_ReInitCmd */
+
+ 0x0028D000,
+ 0x002AB0CC,
+ 0x0F12000B, /* Non contious mode */
+ /* Recording 25fps Anti-Flicker 50Hz END of Initial */
+};
+
static const u32 s5k5bafx_stream_stop[] =
{
0xFCFCD000,
@@ -13237,7 +14702,13 @@ static const u32 s5k5bafx_vt_pretty_3[] =
0x0F120400, /* 0400, 0400, 0400, */
};
-static const u32 s5k5bafx_vt_7fps[] =
+/* Don't delete it. */
+static const u32 s5k5bafx_fps_auto[] = {
+ 0xFCFCD000,
+ 0x00287000,
+};
+
+static const u32 s5k5bafx_fps_7fix[] =
{
/* Fixed 7fps Mode */
0xFCFCD000,
@@ -13270,7 +14741,7 @@ static const u32 s5k5bafx_vt_7fps[] =
0x0F12000B,
};
-static const u32 s5k5bafx_vt_10fps[] =
+static const u32 s5k5bafx_fps_10fix[] =
{
/* Fixed 10fps Mode */
0xFCFCD000,
@@ -13303,7 +14774,7 @@ static const u32 s5k5bafx_vt_10fps[] =
0x0F12000B,
};
-static const u32 s5k5bafx_vt_12fps[] =
+static const u32 s5k5bafx_fps_12fix[] =
{
/* Fixed 12fps Mode */
0xFCFCD000,
@@ -13336,7 +14807,7 @@ static const u32 s5k5bafx_vt_12fps[] =
0x0F12000B,
};
-static const u32 s5k5bafx_vt_15fps[] =
+static const u32 s5k5bafx_fps_15fix[] =
{
/* Fixed 15fps Mode */
0xFCFCD000,
@@ -13369,6 +14840,21 @@ static const u32 s5k5bafx_vt_15fps[] =
0x0F12000B,
};
+static const u32 s5k5bafx_fps_25fix[] = {
+ /* Fixed 25fps Mode */
+ 0xFCFCD000,
+ 0x00287000,
+
+ 0x002A0252,
+ 0x0F120000, /* FrRateQualityType */
+ 0x002A0250,
+ 0x0F120002, /* usFrTimeType */
+ 0x002A0254,
+ 0x0F120190, /* 15fps*/
+ 0x0F120000,
+};
+
+#ifdef SUPPORT_FACTORY_TEST
/*******************************************************
* CAMERA_DTP_ON
*******************************************************/
@@ -13469,5 +14955,6 @@ static const u32 s5k5bafx_pattern_off[] = {
0x002A3100,
0x0F120000, /* Colorbar pattern */
};
+#endif /* SUPPORT_FACTORY_TEST */
#endif /* __S5K5BAFX_SETFILE_H */
diff --git a/drivers/media/video/s5k5bafx_setfile_lgt.h b/drivers/media/video/s5k5bafx_setfile_lgt.h
index 3a9a7b3..0828e4d 100755
--- a/drivers/media/video/s5k5bafx_setfile_lgt.h
+++ b/drivers/media/video/s5k5bafx_setfile_lgt.h
@@ -12860,6 +12860,1471 @@ static const u32 s5k5bafx_recording_50Hz_common[] = {
/* Recording 25fps Anti-Flicker 50Hz END of Initial */
};
+/* Recording with 25fps, simplified for FD service */
+static const u32 s5k5bafx_FD_common[] = {
+
+ /* recording 25fps Anti-Flicker 50Hz*/
+
+ 0xFCFCD000,
+
+ /* ARM Go */
+ 0x0028D000,
+ 0x002A1030,
+ 0x0F120000,
+ 0x002A0014,
+ 0x0F120001,
+ 0xffff0064, /* p100 Delay */
+
+
+ 0x0028D000,
+ 0x002A1000,
+ 0x0F120001,
+
+
+ 0x00287000,
+ 0x002A1662,
+ 0x0F1203B0,
+ 0x0F1203B0,
+
+
+ 0x00287000,
+ 0x002A1658,
+ 0x0F129C40,
+ 0x0F120000,
+ 0x0F129C40,
+ 0x0F120000,
+
+
+ 0x00287000,
+ 0x002A0ADC,
+ 0x0F120AF0, /* setot_uOnlineClocksDiv40 */
+ 0x002A0AE2,
+ 0x0F12222E, /* setot_usSetRomWaitStateThreshold4KHz */
+
+ 0x002A0B94,
+ 0x0F120580, /* awbb_GainsInit_0_:R */
+ 0x0F120400, /* awbb_GainsInit_1_:G */
+ 0x0F1205F0, /* awbb_GainsInit_2_:B */
+ 0x002A04A0,
+ 0x0F128000, /* lt_uLeiInit:AE start */
+ 0x002A049A,
+ 0x0F1200FA, /* lt_uMinExp 0.5ms·Î º¯°æ */
+
+
+ /* Set CIS/APS/Analog */
+ 0x0028D000,
+ 0x002AF106,
+ 0x0F120001,
+ 0x002AF206,
+ 0x0F120001,
+
+
+ 0x002AC202,
+ 0x0F120700,
+
+ 0x002AF260,
+ 0x0F120001,
+
+ 0x002AF414,
+ 0x0F120030,
+
+ 0x002AC204,
+ 0x0F120100,
+ 0x002AF402,
+ 0x0F120092,
+ 0x0F12007F,
+
+ 0x002AF700,
+ 0x0F120040,
+ 0x002AF708,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120040,
+ 0x0F120040,
+ 0x0F120040,
+ 0x0F120040,
+ 0x0F120040,
+ 0x0F120001,
+ 0x0F120015,
+ 0x0F120001,
+ 0x0F120040,
+
+ 0x002AF48A,
+ 0x0F120048,
+ 0x002AF10A,
+ 0x0F12008B,
+
+
+ 0x002AF900,
+ 0x0F120067,
+
+
+ 0x002AF406,
+ 0x0F120092,
+ 0x0F12007F,
+ 0x0F120003,
+
+ 0x0F120003,
+ 0x0F120003,
+ 0x002AF442,
+ 0x0F120000,
+ 0x0F120000,
+ 0x002AF448,
+ 0x0F120000,
+ 0x002AF456,
+ 0x0F120001,
+ 0x0F120010,
+ 0x0F120000,
+
+ 0x002AF41A,
+ 0x0F1200FF,
+ 0x0F120003,
+
+ 0x002AF420,
+ 0x0F120030,
+ 0x002AF410,
+ 0x0F120001,
+
+ 0x0F120000,
+ 0x002AF416,
+ 0x0F120001,
+ 0x002AF424,
+ 0x0F120000,
+ 0x002AF422,
+ 0x0F120000,
+
+ 0x002AF41E,
+ 0x0F120000,
+ 0x002AF428,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x002AF430,
+ 0x0F120000,
+ 0x0F120000,
+
+ 0x0F120008,
+ 0x0F120005,
+ 0x0F12000F,
+ 0x0F120001,
+ 0x0F120040,
+ 0x0F120040,
+ 0x0F120010,
+
+ 0x002AF4D6,
+ 0x0F120090,
+
+
+ 0x0F120000,
+
+ 0x002AF47C,
+ 0x0F12000C,
+ 0x0F120000,
+ 0x002AF49A,
+ 0x0F120008,
+ 0x0F120000,
+ 0x002AF4A2,
+ 0x0F120008,
+ 0x0F120000,
+ 0x002AF4B2,
+ 0x0F120013,
+ 0x0F120000,
+ 0x0F120013,
+ 0x0F120000,
+ 0x002AF4AA,
+ 0x0F12009B,
+ 0x0F1200FB,
+ 0x0F12009B,
+ 0x0F1200FB,
+ 0x002AF474,
+ 0x0F120017,
+ 0x0F12005F,
+ 0x0F120017,
+ 0x0F12008F,
+
+ 0x002AF48C,
+ 0x0F120017,
+ 0x0F12009B,
+ 0x002AF4C8,
+ 0x0F120163,
+ 0x0F120193,
+ 0x002AF490,
+ 0x0F120191,
+
+ 0x002AF418,
+ 0x0F120083,
+
+ 0x002AF454,
+ 0x0F120001,
+
+ 0x002AF702,
+ 0x0F120081,
+ 0x002AF4D2,
+ 0x0F120000,
+
+ /* For ESD Check */
+ 0x00287000,
+ 0x002A0132,
+ 0x0F12AAAA,
+
+ /* Set FPN Gain Input */
+ 0x002A1176,
+ 0x0F120020,
+ 0x0F120040,
+ 0x0F120080,
+ 0x0F120100,
+ 0x0F120014,
+ 0x0F12000A,
+ 0x0F120008,
+ 0x0F120004,
+
+ /* CFPN Canceller */
+ 0x002A116C,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120002,
+ 0x002A0AE8,
+ 0x0F120000,
+
+ /* sensor aig table setting */
+ 0x002A10EE,
+ 0x0F120000,
+ 0x002A10F2,
+ 0x0F120000,
+ 0x002A1152,
+ 0x0F120030,
+ 0x0F120028,
+ 0x0F120030,
+ 0x002A1148,
+ 0x0F1200FB,
+ 0x002A1144,
+ 0x0F1200FB,
+ 0x002A1150,
+ 0x0F1201F4,
+
+
+ 0x002A1084,
+ 0x0F120000,
+ 0x0F120000,
+
+ /* Set AE Target */
+ 0x002A0F4C,
+ 0x0F12003A, /* TVAR_ae_BrAve */
+
+ 0x002A0478,
+ 0x0F120114,
+ 0x0F1200EB, /* ae boundary */
+
+
+
+ /* Set Frame Rate */
+ 0x002A0484,
+ 0x0F12410A, /* uMaxExp1 */
+ 0x0F120000,
+ 0x002A048C,
+ 0x0F128214, /* uMaxExp2 */
+ 0x0F120000,
+ 0x0F12A122, /* uMaxExp3 */
+ 0x0F120000,
+ 0x002A0488,
+ 0x0F12f424, /* uMaxExp4 */
+ 0x0F120000,
+ 0x002A043A,
+ 0x0F1201D0, /* lt_uMaxAnGain0 */
+ 0x0F1201E0, /* lt_uMaxAnGain0_1 */
+ 0x002A0494,
+ 0x0F120300, /* lt_uMaxAnGain1 */
+ 0x0F120650, /* lt_uMaxAnGain2 */
+ 0x0f120100,
+ 0x002A0F52,
+ 0x0F12000F, /* ae_StatMode */
+
+ 0x002A0E98, /* bp_uMaxBrightnessFactor */
+ 0x0F1202A8,
+ 0x002A0E9E, /* bp_uMinBrightnessFactor */
+ 0x0F120298,
+
+ /* 1. Auto Flicker 50Hz Start */
+ 0x002A0B2E,
+ 0x0F120000, /* AFC_Default60Hz Auto Flicker 60Hz start 0: Auto Flicker 50Hz start */
+ 0x002A03F8,
+ 0x0F12005F, /* REG_TC_DBG_AutoAlgEnBits default : 007F */
+
+
+ 0xffff000a, /* p10 Wait10mSec */
+
+ /* Set PLL */
+ /* External CLOCK (MCLK) */
+ 0x002A01B8,
+ 0x0F125DC0, /* REG_TC_IPRM_InClockLSBs */
+ 0x0F120000, /* REG_TC_IPRM_InClockMSBs */
+
+ /* Parallel or MIPI Selection */
+ 0x002A01C6,
+ 0x0F120001, /* REG_TC_IPRM_UseNPviClocks */
+ 0x0F120001, /* REG_TC_IPRM_UseNMipiClocks */
+ 0x0F120000, /* REG_TC_IPRM_bBlockInternalPllCalc */
+
+ /* System Clock 0 (System : 24Mhz, PCLK : 48Mhz) */
+ 0x002A01CC,
+ 0x0F121770, /* REG_TC_IPRM_OpClk4KHz_0 */
+ 0x0F122EE0, /* REG_TC_IPRM_MinOutRate4KHz_0 */
+ 0x0F122EE0, /* REG_TC_IPRM_MaxOutRate4KHz_0 */
+
+ /* System Clock 1 (System : 48Mhz, PCLK : 48Mhz) */
+ 0x002A01D2,
+ 0x0F122EE0, /* REG_TC_IPRM_OpClk4KHz_1 */
+ 0x0F122EE0, /* REG_TC_IPRM_MinOutRate4KHz_1 */
+ 0x0F122EE0, /* REG_TC_IPRM_MaxOutRate4KHz_1 */
+
+
+
+ 0x002A01DE,
+ 0x0F120001, /* REG_TC_IPRM_UseRegsAPI */
+ 0x0F120001, /* REG_TC_IPRM_InitParamsUpdated */
+ 0xffff0064, /* p100 */
+
+
+
+ /* Crop */
+ 0x002A01FA,
+ 0x0F120640, /* REG_TC_GP_PrevReqInputWidth */
+ 0x0F1204B0, /* REG_TC_GP_PrevReqInputHeight */
+ 0x0F120000, /* REG_TC_GP_PrevInputWidthOfs */
+ 0x0F120000, /* REG_TC_GP_PrevInputHeightOfs */
+
+
+ /* Set Preview Config */
+ /* Preview Config 0 (VGA fixed 30fps) */
+ 0x002A0242,
+ 0x0F120280, /* REG_0TC_PCFG_usWidth */
+ 0x0F1201E0, /* REG_0TC_PCFG_usHeight */
+ 0x0F120005, /* REG_0TC_PCFG_Format */
+ 0x0F122EE0, /* REG_0TC_PCFG_usMaxOut4KHzRate */
+ 0x0F122EE0, /* REG_0TC_PCFG_usMinOut4KHzRate */
+ 0x0F120052, /* REG_0TC_PCFG_PVIMask */
+ 0x0F120001, /* REG_0TC_PCFG_uClockInd */
+ 0x0F120002, /* REG_0TC_PCFG_usFrTimeType */
+ 0x0F120001, /* REG_0TC_PCFG_FrRateQualityType */
+
+#if 1 /* 25 fps */
+ 0x0F12018c, /* REG_0TC_PCFG_usMaxFrTimeMsecMult10 */
+ 0x0F12018c, /* REG_0TC_PCFG_usMinFrTimeMsecMult10 */
+#else /* 30 fps */
+ /* 0x0F12014d, *//* REG_0TC_PCFG_usMaxFrTimeMsecMult10 */
+ /* 0x0F12014d, *//* REG_0TC_PCFG_usMinFrTimeMsecMult10 */
+#endif
+ 0x0F120000, /* REG_0TC_PCFG_sSaturation */
+ 0x0F120000, /* REG_0TC_PCFG_sSharpBlur */
+ 0x0F120000, /* REG_0TC_PCFG_sGlamour */
+ 0x0F120000, /* REG_0TC_PCFG_sColorTemp */
+ 0x0F120000, /* REG_0TC_PCFG_uDeviceGammaIndex */
+ 0x0F120000, /* REG_0TC_PCFG_uPrevMirror */
+ 0x0F120000, /* REG_0TC_PCFG_uCaptureMirror */
+ 0x0F120000, /* REG_0TC_PCFG_uRotation */
+
+
+ /* Set MIPI */
+ 0x002A03AC,
+ 0x0F120000, /* REG_TC_FLS_Mode */
+ 0x002A03F2,
+ 0x0F120001, /* REG_TC_OIF_EnMipiLanes */
+ 0x0F1200C3, /* REG_TC_OIF_EnPackets */
+ 0x0F120001, /* REG_TC_OIF_CfgChanged */
+
+ /* Apply preview config */
+ 0x002A021C,
+ 0x0F120000, /* REG_TC_GP_ActivePrevConfig */
+ 0x002A0220,
+ 0x0F120001, /* REG_TC_GP_PrevOpenAfterChange */
+ 0x002A01F8,
+ 0x0F120001, /* REG_TC_GP_NewConfigSync */
+ 0x002A021E,
+ 0x0F120001, /* REG_TC_GP_PrevConfigChanged */
+ 0x002A01F0,
+ 0x0F120001, /* REG_TC_GP_EnablePreview */
+ 0x0F120001, /* REG_TC_GP_EnablePreviewChanged */
+
+
+
+ /* Set Capture Config */
+ /* Capture Config 0 (1600x1200 fixed 8fps) */
+ 0x002A0302,
+ 0x0F120000, /* REG_0TC_CCFG_uCaptureMode */
+ 0x0F120640, /* REG_0TC_CCFG_usWidth */
+ 0x0F1204B0, /* REG_0TC_CCFG_usHeight */
+ 0x0F120005, /* REG_0TC_CCFG_Format */
+ 0x0F122EE0, /* REG_0TC_CCFG_usMaxOut4KHzRate */
+ 0x0F122EE0, /* REG_0TC_CCFG_usMinOut4KHzRate */
+ 0x0F120052, /* REG_0TC_CCFG_PVIMask */
+ 0x0F120001, /* REG_0TC_CCFG_uClockInd */
+ 0x0F120002, /* REG_0TC_CCFG_usFrTimeType */
+ 0x0F120002, /* REG_0TC_CCFG_FrRateQualityType */
+ 0x0F1204E2, /* REG_0TC_CCFG_usMaxFrTimeMsecMult10 */
+ 0x0F1204E2, /* REG_0TC_CCFG_usMinFrTimeMsecMult10 */
+ 0x0F120000, /* REG_0TC_CCFG_sSaturation */
+ 0x0F120000, /* REG_0TC_CCFG_sSharpBlur */
+ 0x0F120000, /* REG_0TC_CCFG_sGlamour */
+ 0x0F120000, /* REG_0TC_CCFG_sColorTemp */
+ 0x0F120000, /* REG_0TC_CCFG_uDeviceGammaIndex */
+
+
+
+ /* Periodic mismatch */
+ 0x002A0780,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+
+ 0x002A0798,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+
+ 0x002A07C0,
+ 0x0F120004,
+ 0x0F120004,
+
+ 0x002A0B94,
+ 0x0F120580,
+ 0x0F120400,
+ 0x0F1205F0,
+ 0x002A04A0,
+ 0x0F128000,
+
+
+ /* Set AE Weights */
+ 0x002A0F5A,
+ 0x0F120000, /* ae_WeightTbl_16_0_ */
+ 0x0F120000, /* ae_WeightTbl_16_1_ */
+ 0x0F120000, /* ae_WeightTbl_16_2_ */
+ 0x0F120000, /* ae_WeightTbl_16_3_ */
+ 0x0F120101, /* ae_WeightTbl_16_4_ */
+ 0x0F120101, /* ae_WeightTbl_16_5_ */
+ 0x0F120101, /* ae_WeightTbl_16_6_ */
+ 0x0F120101, /* ae_WeightTbl_16_7_ */
+ 0x0F120101, /* ae_WeightTbl_16_8_ */
+ 0x0F120302, /* ae_WeightTbl_16_9_ */
+ 0x0F120203, /* ae_WeightTbl_16_10 */
+ 0x0F120101, /* ae_WeightTbl_16_11 */
+ 0x0F120101, /* ae_WeightTbl_16_12 */
+ 0x0F120403, /* ae_WeightTbl_16_13 */
+ 0x0F120304, /* ae_WeightTbl_16_14 */
+ 0x0F120101, /* ae_WeightTbl_16_15 */
+ 0x0F120101, /* ae_WeightTbl_16_16 */
+ 0x0F120403, /* ae_WeightTbl_16_17 */
+ 0x0F120304, /* ae_WeightTbl_16_18 */
+ 0x0F120101, /* ae_WeightTbl_16_19 */
+ 0x0F120101, /* ae_WeightTbl_16_20 */
+ 0x0F120302, /* ae_WeightTbl_16_21 */
+ 0x0F120203, /* ae_WeightTbl_16_22 */
+ 0x0F120101, /* ae_WeightTbl_16_23 */
+ 0x0F120101, /* ae_WeightTbl_16_24 */
+ 0x0F120101, /* ae_WeightTbl_16_25 */
+ 0x0F120101, /* ae_WeightTbl_16_26 */
+ 0x0F120101, /* ae_WeightTbl_16_27 */
+ 0x0F120000, /* ae_WeightTbl_16_28 */
+ 0x0F120000, /* ae_WeightTbl_16_29 */
+ 0x0F120000, /* ae_WeightTbl_16_30 */
+ 0x0F120000, /* ae_WeightTbl_16_31 */
+
+
+ /* Set GAS & CCM White Point */
+ /* param_start TVAR_ash_AwbAshCord */
+ 0x002A0704,
+ 0x0F1200B3,
+ 0x0F1200E5,
+ 0x0F120120,
+ 0x0F120136,
+ 0x0F120180,
+ 0x0F1201B0,
+ 0x0F120200,
+
+ /* param_start wbt_AwbCcmCord */
+ 0x002A06F2,
+ 0x0F1200B3,
+ 0x0F1200E5,
+ 0x0F120120,
+ 0x0F120136,
+ 0x0F120180,
+ 0x0F120190,
+
+ /* Target Brightness Control */
+ 0x002A103E,
+ 0x0F120000,
+ 0x0F120009,
+ 0x0F120018,
+ 0x0F120032,
+ 0x0F12004A,
+ 0x0F120051,
+ 0x0F120056,
+ 0x0F12010C,
+ 0x0F12010C,
+ 0x0F120109,
+ 0x0F120105,
+ 0x0F120102,
+ 0x0F1200FB,
+ 0x0F1200F8,
+
+
+ /* Gamma */
+ 0x002A04CC,
+ 0x0F120000, /* 0000 SARR_usGammaLutRGBIndoor[0][0] */
+ 0x0F120002, /* 0002 SARR_usGammaLutRGBIndoor[0][1] */
+ 0x0F120008, /* 0008 SARR_usGammaLutRGBIndoor[0][2] */
+ 0x0F120016, /* 0018 SARR_usGammaLutRGBIndoor[0][3] */
+ 0x0F120055, /* 005A SARR_usGammaLutRGBIndoor[0][4] */
+ 0x0F1200E6, /* 00DF SARR_usGammaLutRGBIndoor[0][5] */
+ 0x0F120141, /* 013F SARR_usGammaLutRGBIndoor[0][6] */
+ 0x0F120188, /* 0186 SARR_usGammaLutRGBIndoor[0][7] */
+ 0x0F1201E6, /* 01E6 SARR_usGammaLutRGBIndoor[0][8] */
+ 0x0F120236, /* 0236 SARR_usGammaLutRGBIndoor[0][9] */
+ 0x0F1202BA, /* 02BA SARR_usGammaLutRGBIndoor[0][10] */
+ 0x0F12032A, /* 032A SARR_usGammaLutRGBIndoor[0][11] */
+ 0x0F120385, /* 0385 SARR_usGammaLutRGBIndoor[0][12] */
+ 0x0F1203C2, /* 03C2 SARR_usGammaLutRGBIndoor[0][13] */
+ 0x0F1203EA, /* 03EA SARR_usGammaLutRGBIndoor[0][14] */
+ 0x0F1203FF, /* 03FF SARR_usGammaLutRGBIndoor[0][15] */
+
+ 0x0F120000, /* 0000 SARR_usGammaLutRGBIndoor[1][0] */
+ 0x0F120002, /* 0002 SARR_usGammaLutRGBIndoor[1][1] */
+ 0x0F120008, /* 0008 SARR_usGammaLutRGBIndoor[1][2] */
+ 0x0F120016, /* 0018 SARR_usGammaLutRGBIndoor[1][3] */
+ 0x0F120055, /* 005A SARR_usGammaLutRGBIndoor[1][4] */
+ 0x0F1200E6, /* 00DF SARR_usGammaLutRGBIndoor[1][5] */
+ 0x0F120141, /* 013F SARR_usGammaLutRGBIndoor[1][6] */
+ 0x0F120188, /* 0186 SARR_usGammaLutRGBIndoor[1][7] */
+ 0x0F1201E6, /* 01E6 SARR_usGammaLutRGBIndoor[1][8] */
+ 0x0F120236, /* 0236 SARR_usGammaLutRGBIndoor[1][9] */
+ 0x0F1202BA, /* 02BA SARR_usGammaLutRGBIndoor[1][10] */
+ 0x0F12032A, /* 032A SARR_usGammaLutRGBIndoor[1][11] */
+ 0x0F120385, /* 0385 SARR_usGammaLutRGBIndoor[1][12] */
+ 0x0F1203C2, /* 03C2 SARR_usGammaLutRGBIndoor[1][13] */
+ 0x0F1203EA, /* 03EA SARR_usGammaLutRGBIndoor[1][14] */
+ 0x0F1203FF, /* 03FF SARR_usGammaLutRGBIndoor[1][15] */
+
+ 0x0F120000, /* 0000 SARR_usGammaLutRGBIndoor[2][0] */
+ 0x0F120002, /* 0002 SARR_usGammaLutRGBIndoor[2][1] */
+ 0x0F120008, /* 0008 SARR_usGammaLutRGBIndoor[2][2] */
+ 0x0F120016, /* 0018 SARR_usGammaLutRGBIndoor[2][3] */
+ 0x0F120055, /* 005A SARR_usGammaLutRGBIndoor[2][4] */
+ 0x0F1200E6, /* 00DF SARR_usGammaLutRGBIndoor[2][5] */
+ 0x0F120141, /* 013F SARR_usGammaLutRGBIndoor[2][6] */
+ 0x0F120188, /* 0186 SARR_usGammaLutRGBIndoor[2][7] */
+ 0x0F1201E6, /* 01E6 SARR_usGammaLutRGBIndoor[2][8] */
+ 0x0F120236, /* 0236 SARR_usGammaLutRGBIndoor[2][9] */
+ 0x0F1202BA, /* 02BA SARR_usGammaLutRGBIndoor[2][10] */
+ 0x0F12032A, /* 032A SARR_usGammaLutRGBIndoor[2][11] */
+ 0x0F120385, /* 0385 SARR_usGammaLutRGBIndoor[2][12] */
+ 0x0F1203C2, /* 03C2 SARR_usGammaLutRGBIndoor[2][13] */
+ 0x0F1203EA, /* 03EA SARR_usGammaLutRGBIndoor[2][14] */
+ 0x0F1203FF, /* 03FF SARR_usGammaLutRGBIndoor[2][15] */
+
+
+ /* Set AWB */
+ 0x002A0DA6,
+ 0x0F120000,
+ 0x0F120000,
+ 0x002A0E8C,
+ 0x0F120000,
+ 0x002A0D6C,
+ 0x0F120040,
+
+ /* Indoor Gray Zone */
+ 0x002A0B9C,
+ 0x0F12038F, /* awbb_IndoorGrZones_m_BGrid_0__m_left */
+ 0x0F12039B, /* awbb_IndoorGrZones_m_BGrid_0__m_right */
+ 0x0F120373, /* awbb_IndoorGrZones_m_BGrid_1__m_left */
+ 0x0F1203B0, /* awbb_IndoorGrZones_m_BGrid_1__m_right */
+ 0x0F120352, /* awbb_IndoorGrZones_m_BGrid_2__m_left */
+ 0x0F1203B7, /* awbb_IndoorGrZones_m_BGrid_2__m_right */
+ 0x0F120334, /* awbb_IndoorGrZones_m_BGrid_3__m_left */
+ 0x0F1203B5, /* awbb_IndoorGrZones_m_BGrid_3__m_right */
+ 0x0F120318, /* awbb_IndoorGrZones_m_BGrid_4__m_left */
+ 0x0F1203B0, /* awbb_IndoorGrZones_m_BGrid_4__m_right */
+ 0x0F1202FF, /* awbb_IndoorGrZones_m_BGrid_5__m_left */
+ 0x0F12038D, /* awbb_IndoorGrZones_m_BGrid_5__m_right */
+ 0x0F1202E7, /* awbb_IndoorGrZones_m_BGrid_6__m_left */
+ 0x0F120372, /* awbb_IndoorGrZones_m_BGrid_6__m_right */
+ 0x0F1202D0, /* awbb_IndoorGrZones_m_BGrid_7__m_left */
+ 0x0F12035D, /* awbb_IndoorGrZones_m_BGrid_7__m_right */
+ 0x0F1202B5, /* awbb_IndoorGrZones_m_BGrid_8__m_left */
+ 0x0F120345, /* awbb_IndoorGrZones_m_BGrid_8__m_right */
+ 0x0F1202A1, /* awbb_IndoorGrZones_m_BGrid_9__m_left */
+ 0x0F120331, /* awbb_IndoorGrZones_m_BGrid_9__m_right */
+ 0x0F12028B, /* awbb_IndoorGrZones_m_BGrid_10__m_left */
+ 0x0F12031E, /* awbb_IndoorGrZones_m_BGrid_10__m_right */
+ 0x0F120273, /* awbb_IndoorGrZones_m_BGrid_11__m_left */
+ 0x0F120309, /* awbb_IndoorGrZones_m_BGrid_11__m_right */
+ 0x0F12025F, /* awbb_IndoorGrZones_m_BGrid_12__m_left */
+ 0x0F1202F5, /* awbb_IndoorGrZones_m_BGrid_12__m_right */
+ 0x0F120250, /* awbb_IndoorGrZones_m_BGrid_13__m_left */
+ 0x0F1202DB, /* awbb_IndoorGrZones_m_BGrid_13__m_right */
+ 0x0F120241, /* awbb_IndoorGrZones_m_BGrid_14__m_left */
+ 0x0F1202C7, /* awbb_IndoorGrZones_m_BGrid_14__m_right */
+ 0x0F120233, /* awbb_IndoorGrZones_m_BGrid_15__m_left */
+ 0x0F1202B9, /* awbb_IndoorGrZones_m_BGrid_15__m_right */
+ 0x0F120223, /* awbb_IndoorGrZones_m_BGrid_16__m_left */
+ 0x0F1202AB, /* awbb_IndoorGrZones_m_BGrid_16__m_right */
+ 0x0F120217, /* awbb_IndoorGrZones_m_BGrid_17__m_left */
+ 0x0F1202A2, /* awbb_IndoorGrZones_m_BGrid_17__m_right */
+ 0x0F120207, /* awbb_IndoorGrZones_m_BGrid_18__m_left */
+ 0x0F120294, /* awbb_IndoorGrZones_m_BGrid_18__m_right */
+ 0x0F1201FA, /* awbb_IndoorGrZones_m_BGrid_19__m_left */
+ 0x0F120289, /* awbb_IndoorGrZones_m_BGrid_19__m_right */
+ 0x0F1201EA, /* awbb_IndoorGrZones_m_BGrid_20__m_left */
+ 0x0F120281, /* awbb_IndoorGrZones_m_BGrid_20__m_right */
+ 0x0F1201DD, /* awbb_IndoorGrZones_m_BGrid_21__m_left */
+ 0x0F12027B, /* awbb_IndoorGrZones_m_BGrid_21__m_right */
+ 0x0F1201D0, /* awbb_IndoorGrZones_m_BGrid_22__m_left */
+ 0x0F120273, /* awbb_IndoorGrZones_m_BGrid_22__m_right */
+ 0x0F1201C3, /* awbb_IndoorGrZones_m_BGrid_23__m_left */
+ 0x0F12026A, /* awbb_IndoorGrZones_m_BGrid_23__m_right */
+ 0x0F1201B6, /* awbb_IndoorGrZones_m_BGrid_24__m_left */
+ 0x0F120265, /* awbb_IndoorGrZones_m_BGrid_24__m_right */
+ 0x0F1201AB, /* awbb_IndoorGrZones_m_BGrid_25__m_left */
+ 0x0F12025B, /* awbb_IndoorGrZones_m_BGrid_25__m_right */
+ 0x0F1201A1, /* awbb_IndoorGrZones_m_BGrid_26__m_left */
+ 0x0F120254, /* awbb_IndoorGrZones_m_BGrid_26__m_right */
+ 0x0F120198, /* awbb_IndoorGrZones_m_BGrid_27__m_left */
+ 0x0F12024B, /* awbb_IndoorGrZones_m_BGrid_27__m_right */
+ 0x0F120192, /* awbb_IndoorGrZones_m_BGrid_28__m_left */
+ 0x0F120242, /* awbb_IndoorGrZones_m_BGrid_28__m_right */
+ 0x0F120191, /* awbb_IndoorGrZones_m_BGrid_29__m_left */
+ 0x0F12023A, /* awbb_IndoorGrZones_m_BGrid_29__m_right */
+ 0x0F120192, /* awbb_IndoorGrZones_m_BGrid_30__m_left */
+ 0x0F120222, /* awbb_IndoorGrZones_m_BGrid_30__m_right */
+ 0x0F1201C5, /* awbb_IndoorGrZones_m_BGrid_31__m_left */
+ 0x0F1201DF, /* awbb_IndoorGrZones_m_BGrid_31__m_right */
+ 0x0F120000, /* awbb_IndoorGrZones_m_BGrid_32__m_left */
+ 0x0F120000, /* awbb_IndoorGrZones_m_BGrid_32__m_right */
+ 0x0F120000, /* awbb_IndoorGrZones_m_BGrid_33__m_left */
+ 0x0F120000, /* awbb_IndoorGrZones_m_BGrid_33__m_right */
+
+
+ /* param_end awbb_IndoorGrZones_m_BGrid */
+ 0x002A0C3C,
+ 0x0F120004,
+ 0x0F120000,
+ 0x0F120022,
+ 0x0F120000,
+ 0x0F12010F,
+ 0x0F120000,
+ 0x0F120020,
+ 0x0F120000,
+ 0x002A0C50,
+ 0x0F1200E0,
+ 0x0F120000,
+
+ /* Outdoor Gray Zone */
+ 0x0F12025E, /* 0264 awbb_OutdoorGrZones_m_BGrid_0__m_left */
+ 0x0F120282, /* 0279 awbb_OutdoorGrZones_m_BGrid_0__m_right */
+ 0x0F120240, /* 0250 awbb_OutdoorGrZones_m_BGrid_1__m_left */
+ 0x0F120298, /* 0287 awbb_OutdoorGrZones_m_BGrid_1__m_right */
+ 0x0F12022A, /* 0244 awbb_OutdoorGrZones_m_BGrid_2__m_left */
+ 0x0F12029A, /* 0287 awbb_OutdoorGrZones_m_BGrid_2__m_right */
+ 0x0F12021A, /* 0235 awbb_OutdoorGrZones_m_BGrid_3__m_left */
+ 0x0F12029A, /* 0289 awbb_OutdoorGrZones_m_BGrid_3__m_right */
+ 0x0F120206, /* 0225 awbb_OutdoorGrZones_m_BGrid_4__m_left */
+ 0x0F120298, /* 0287 awbb_OutdoorGrZones_m_BGrid_4__m_right */
+ 0x0F1201FE, /* 0213 awbb_OutdoorGrZones_m_BGrid_5__m_left */
+ 0x0F12028C, /* 0286 awbb_OutdoorGrZones_m_BGrid_5__m_right */
+ 0x0F1201FA, /* 0202 awbb_OutdoorGrZones_m_BGrid_6__m_left */
+ 0x0F120278, /* 027A awbb_OutdoorGrZones_m_BGrid_6__m_right */
+ 0x0F1201F8, /* 01F3 awbb_OutdoorGrZones_m_BGrid_7__m_left */
+ 0x0F120266, /* 0272 awbb_OutdoorGrZones_m_BGrid_7__m_right */
+ 0x0F120214, /* 01E9 awbb_OutdoorGrZones_m_BGrid_8__m_left */
+ 0x0F120238, /* 0269 awbb_OutdoorGrZones_m_BGrid_8__m_right */
+ 0x0F120000, /* 01E2 awbb_OutdoorGrZones_m_BGrid_9__m_left */
+ 0x0F120000, /* 0263 awbb_OutdoorGrZones_m_BGrid_9__m_right */
+ 0x0F120000, /* 01E0 awbb_OutdoorGrZones_m_BGrid_10__m_left */
+ 0x0F120000, /* 025A awbb_OutdoorGrZones_m_BGrid_10__m_right */
+ 0x0F120000, /* 01E1 awbb_OutdoorGrZones_m_BGrid_11__m_left */
+ 0x0F120000, /* 0256 awbb_OutdoorGrZones_m_BGrid_11__m_right */
+ 0x0F120000, /* 01EE awbb_OutdoorGrZones_m_BGrid_12__m_left */
+ 0x0F120000, /* 0251 awbb_OutdoorGrZones_m_BGrid_12__m_right */
+ 0x0F120000, /* 01F8 awbb_OutdoorGrZones_m_BGrid(26) */
+ 0x0F120000, /* 024A awbb_OutdoorGrZones_m_BGrid(27) */
+ 0x0F120000, /* 020D awbb_OutdoorGrZones_m_BGrid(28) */
+ 0x0F120000, /* 0231 awbb_OutdoorGrZones_m_BGrid(29) */
+ 0x0F120000, /* 0000 awbb_OutdoorGrZones_m_BGrid(30) */
+ 0x0F120000, /* 0000 awbb_OutdoorGrZones_m_BGrid(31) */
+ 0x0F120000, /* 0000 awbb_OutdoorGrZones_m_BGrid(32) */
+ 0x0F120000, /* 0000 awbb_OutdoorGrZones_m_BGrid(33) */
+
+
+ /* param_WRITE 70000CC6 B2end awbb_OutdoorGrZones_m_BGrid */
+ 0x002A0CB8,
+ 0x0F120004,
+ 0x0F120000,
+ 0x0F120009,
+ 0x0F120000,
+ 0x0F120210,
+ 0x0F120000,
+ 0x0F120020,
+ 0x0F120000,
+ 0x002A0CCC,
+ 0x0F1200C0,
+ 0x0F120000,
+
+ /* 7-3. Low Br grey zone */
+ /* param_ C4start awbb_LowBrGrZones_m_BGrid */
+
+ 0x0F12031F, /* awbb_LowBrGrZones_m_BGrid_0__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_0__m_right */
+ 0x0F1202FC, /* awbb_LowBrGrZones_m_BGrid_1__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_1__m_right */
+ 0x0F1202D9, /* awbb_LowBrGrZones_m_BGrid_2__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_2__m_right */
+ 0x0F1202B6, /* awbb_LowBrGrZones_m_BGrid_3__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_3__m_right */
+ 0x0F120293, /* awbb_LowBrGrZones_m_BGrid_4__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_4__m_right */
+ 0x0F120270, /* awbb_LowBrGrZones_m_BGrid_5__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_5__m_right */
+ 0x0F12024E, /* awbb_LowBrGrZones_m_BGrid_6__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_6__m_right */
+ 0x0F12022B, /* awbb_LowBrGrZones_m_BGrid_7__m_left */
+ 0x0F120495, /* awbb_LowBrGrZones_m_BGrid_7__m_right */
+ 0x0F120208, /* awbb_LowBrGrZones_m_BGrid_8__m_left */
+ 0x0F12048A, /* awbb_LowBrGrZones_m_BGrid_8__m_right */
+ 0x0F1201E5, /* awbb_LowBrGrZones_m_BGrid_9__m_left */
+ 0x0F120455, /* awbb_LowBrGrZones_m_BGrid_9__m_right */
+ 0x0F1201C2, /* awbb_LowBrGrZones_m_BGrid_10__m_left */
+ 0x0F12041F, /* awbb_LowBrGrZones_m_BGrid_10__m_right */
+ 0x0F12019F, /* awbb_LowBrGrZones_m_BGrid_11__m_left */
+ 0x0F1203EA, /* awbb_LowBrGrZones_m_BGrid_11__m_right */
+ 0x0F12017D, /* awbb_LowBrGrZones_m_BGrid_12__m_left */
+ 0x0F1203B4, /* awbb_LowBrGrZones_m_BGrid_12__m_right */
+ 0x0F12015A, /* awbb_LowBrGrZones_m_BGrid_13__m_left */
+ 0x0F12037F, /* awbb_LowBrGrZones_m_BGrid_13__m_right */
+ 0x0F120137, /* awbb_LowBrGrZones_m_BGrid_14__m_left */
+ 0x0F120349, /* awbb_LowBrGrZones_m_BGrid_14__m_right */
+ 0x0F120130, /* awbb_LowBrGrZones_m_BGrid_15__m_left */
+ 0x0F120314, /* awbb_LowBrGrZones_m_BGrid_15__m_right */
+ 0x0F12012F, /* awbb_LowBrGrZones_m_BGrid_16__m_left */
+ 0x0F1202DE, /* awbb_LowBrGrZones_m_BGrid_16__m_right */
+ 0x0F12012F, /* awbb_LowBrGrZones_m_BGrid_17__m_left */
+ 0x0F1202B1, /* awbb_LowBrGrZones_m_BGrid_17__m_right */
+ 0x0F12012E, /* awbb_LowBrGrZones_m_BGrid_18__m_left */
+ 0x0F12028B, /* awbb_LowBrGrZones_m_BGrid_18__m_right */
+ 0x0F12012D, /* awbb_LowBrGrZones_m_BGrid_19__m_left */
+ 0x0F120265, /* awbb_LowBrGrZones_m_BGrid_19__m_right */
+ 0x0F12012C, /* awbb_LowBrGrZones_m_BGrid_20__m_left */
+ 0x0F12023F, /* awbb_LowBrGrZones_m_BGrid_20__m_right */
+ 0x0F12012C, /* awbb_LowBrGrZones_m_BGrid_21__m_left */
+ 0x0F120219, /* awbb_LowBrGrZones_m_BGrid_21__m_right */
+ 0x0F12012B, /* awbb_LowBrGrZones_m_BGrid_22__m_left */
+ 0x0F1201F3, /* awbb_LowBrGrZones_m_BGrid_22__m_right */
+ 0x0F12012A, /* awbb_LowBrGrZones_m_BGrid_23__m_left */
+ 0x0F1201CD, /* awbb_LowBrGrZones_m_BGrid_23__m_right */
+ 0x0F120000, /* awbb_LowBrGrZones_m_BGrid_24__m_left */
+ 0x0F120000, /* awbb_LowBrGrZones_m_BGrid_24__m_right */
+
+
+ /* 42param_end awbb_LowBrGrZones_m_BGrid */
+ 0x0F120005,
+ 0x0F120000,
+ 0x0F120018,
+ 0x0F120000,
+ 0x0F1200AF,
+ 0x0F120000,
+ 0x0F120002,
+ 0x0F120000,
+ 0x002A0D48,
+ 0x0F1200E0,
+ 0x0F120000,
+
+ /* Lowtemp circle */
+ 0x0F12032F,
+ 0x0F120000,
+ 0x0F12017A,
+ 0x0F120000,
+ 0x0F127300,
+ 0x0F120000,
+ 0x0F12000A,
+ 0x0F120000,
+ 0x002A0D60,
+ 0x0F1200E0,
+ 0x0F120000,
+ 0x002A0D82,
+ 0x0F120001,
+
+
+
+ 0x002A0D8E,
+ 0x0F120002, /* awbb_GridEnable */
+
+ /* Grid coefficients and Contrants */
+ 0x002A0DCE,
+ 0x0F12FFE0, /* awbb_GridCorr_R_0__0_ */
+ 0x0F12FFE0, /* D8 awbb_GridCorr_R_0__1_ */
+ 0x0F120000, /* awbb_GridCorr_R_0__2_ */
+ 0x0F120000, /* awbb_GridCorr_R_0__3_ */
+ 0x0F120000, /* awbb_GridCorr_R_0__4_ */
+ 0x0F120030, /* awbb_GridCorr_R_0__5_ */
+
+ 0x0F12FFE0, /* awbb_GridCorr_R_1__0_ */
+ 0x0F12FFE0, /* D8 awbb_GridCorr_R_1__1_ */
+ 0x0F120000, /* awbb_GridCorr_R_1__2_ */
+ 0x0F120000, /* awbb_GridCorr_R_1__3_ */
+ 0x0F120000, /* awbb_GridCorr_R_1__4_ */
+ 0x0F120030, /* awbb_GridCorr_R_1__5_ */
+
+ 0x0F12FFE0, /* awbb_GridCorr_R_2__0_ */
+ 0x0F12FFE0, /* D8 awbb_GridCorr_R_2__1_ */
+ 0x0F120000, /* awbb_GridCorr_R_2__2_ */
+ 0x0F120000, /* awbb_GridCorr_R_2__3_ */
+ 0x0F120000, /* awbb_GridCorr_R_2__4_ */
+ 0x0F120030, /* awbb_GridCorr_R_2__5_ */
+
+ 0x0F120004, /* 08 awbb_GridCorr_B_0__0_ */
+ 0x0F120000, /* awbb_GridCorr_B_0__1_ */
+ 0x0F120000, /* awbb_GridCorr_B_0__2_ */
+ 0x0F12FFC0, /* awbb_GridCorr_B_0__3_ */
+ 0x0F12FFB0, /* awbb_GridCorr_B_0__4_ */
+ 0x0F12FF30, /* awbb_GridCorr_B_0__5_ */
+
+ 0x0F120004, /* 08 awbb_GridCorr_B_1__0_ */
+ 0x0F120000, /* awbb_GridCorr_B_1__1_ */
+ 0x0F120000, /* awbb_GridCorr_B_1__2_ */
+ 0x0F12FFC0, /* awbb_GridCorr_B_1__3_ */
+ 0x0F12FFB0, /* awbb_GridCorr_B_1__4_ */
+ 0x0F12FF30, /* awbb_GridCorr_B_1__5_ */
+
+ 0x0F120004, /* 08 awbb_GridCorr_B_2__0_ */
+ 0x0F120000, /* awbb_GridCorr_B_2__1_ */
+ 0x0F120000, /* awbb_GridCorr_B_2__2_ */
+ 0x0F12FFC0, /* awbb_GridCorr_B_2__3_ */
+ 0x0F12FFB0, /* awbb_GridCorr_B_2__4_ */
+ 0x0F12FF30, /* awbb_GridCorr_B_2__5_ */
+
+ 0x0F1202C6,
+ 0x0F120335,
+ 0x0F1203B3,
+ 0x0F121021,
+ 0x0F12107E,
+ 0x0F12113E,
+ 0x0F12117C,
+ 0x0F1211C2,
+ 0x0F12120B,
+
+ 0x0F1200B3,
+ 0x0F1200B7,
+ 0x0F1200D3,
+ 0x0F120091,
+
+ /* White Locus */
+ 0x002A0D66,
+ 0x0F120133,
+ 0x0F12010F,
+ 0x002A0D74,
+ 0x0F12052A,
+
+ /* Gamut Thresholds */
+ 0x002A0DAE,
+ 0x0F120036,
+ 0x0F12001C,
+ 0x002A0DAA,
+ 0x0F12071A,
+ 0x0F1203A4,
+
+ /* SceneDetection Thresholds */
+ 0x002A0D92,
+ 0x0F120BB8,
+ 0x0F120096,
+ 0x002A0E86,
+ 0x0F120216,
+ 0x0F12029F,
+ 0x002A0D96,
+ 0x0F120BB7,
+ 0x0F120096,
+ 0x002A0DB2,
+ 0x0F1200DA,
+ 0x002A0D9A,
+ 0x0F12000A,
+ 0x002A0DB4,
+ 0x0F120459,
+ 0x002A0DA4,
+ 0x0F12000E,
+ 0x002A0D64,
+ 0x0F120032,
+ 0x002A0DA6,
+ 0x0F12001E,
+ 0x002A0D9C,
+ 0x0F12001B,
+ 0x0F12000E,
+ 0x0F120008,
+ 0x0F120004,
+
+ /* AWB Debug.(Outdoor Pink) */
+ 0x002A0E30,
+ 0x0F120000,
+ 0x002A0E84,
+ 0x0F120000,
+
+ /* UseInvalidOutdoor option */
+ 0x002A0D88,
+ 0x0F120001,
+
+ /* AWB input Y-Filter setting */
+ 0x002A0C48,
+ 0x0F120020,
+ 0x002A0C50,
+ 0x0F1200E0,
+ 0x002A0CC4,
+ 0x0F120020,
+ 0x002A0CCC,
+ 0x0F1200C0,
+
+
+ 0x002A0DC2,
+ 0x0F120030,
+ 0x0F1200C8,
+ 0x0F12012C,
+ 0x0F120210, /* 258 awbb_GainsMaxMove */
+ 0x0F120003,
+
+
+ /* Set CCM */
+ /* CCM Start Address */
+ 0x002A06D0,
+ 0x0F122800,
+ 0x0F127000,
+ 0x0F122824,
+ 0x0F127000,
+ 0x0F122848,
+ 0x0F127000,
+ 0x0F12286C,
+ 0x0F127000,
+ 0x0F122890,
+ 0x0F127000,
+ 0x0F1228B4,
+ 0x0F127000,
+ 0x002A06EC,
+ 0x0F1228D8,
+ 0x0F127000,
+
+ /* CCM */
+ 0x002A2800,
+ 0x0F1201E1,
+ 0x0F12FFC4,
+ 0x0F12FFF8,
+ 0x0F120101,
+ 0x0F12014C,
+ 0x0F12FF55,
+ 0x0F12FF5B,
+ 0x0F120205,
+ 0x0F12FF17,
+ 0x0F12FEFE,
+ 0x0F1201B6,
+ 0x0F120107,
+ 0x0F12FFDB,
+ 0x0F12FFDB,
+ 0x0F1201D1,
+ 0x0F120163,
+ 0x0F12FF9E,
+ 0x0F1201B3,
+
+ 0x0F1201E1,
+ 0x0F12FFC4,
+ 0x0F12FFF8,
+ 0x0F120101,
+ 0x0F12014C,
+ 0x0F12FF55,
+ 0x0F12FF5B,
+ 0x0F120205,
+ 0x0F12FF17,
+ 0x0F12FEFE,
+ 0x0F1201B6,
+ 0x0F120107,
+ 0x0F12FFDB,
+ 0x0F12FFDB,
+ 0x0F1201D1,
+ 0x0F120163,
+ 0x0F12FF9E,
+ 0x0F1201B3,
+
+ 0x0F1201E1,
+ 0x0F12FFC4,
+ 0x0F12FFF8,
+ 0x0F120101,
+ 0x0F12014C,
+ 0x0F12FF55,
+ 0x0F12FF5B,
+ 0x0F120205,
+ 0x0F12FF17,
+ 0x0F12FEFE,
+ 0x0F1201B6,
+ 0x0F120107,
+ 0x0F12FFDB,
+ 0x0F12FFDB,
+ 0x0F1201D1,
+ 0x0F120163,
+ 0x0F12FF9E,
+ 0x0F1201B3,
+
+ 0x0F1201FB,
+ 0x0F12FFA9,
+ 0x0F12FFEA,
+ 0x0F12013C,
+ 0x0F120140,
+ 0x0F12FF53,
+ 0x0F12FE7A,
+ 0x0F12017D,
+ 0x0F12FEED,
+ 0x0F12FF39,
+ 0x0F1201D6,
+ 0x0F1200C4,
+ 0x0F12FFC0,
+ 0x0F12FFBF,
+ 0x0F1201CD,
+ 0x0F120182,
+ 0x0F12FF91,
+ 0x0F1201AA,
+
+ 0x0F1201C5,
+ 0x0F12FF9F,
+ 0x0F12FFE5,
+ 0x0F1200E2,
+ 0x0F12010E,
+ 0x0F12FF62,
+ 0x0F12FF03,
+ 0x0F1201D0,
+ 0x0F12FF3E,
+ 0x0F12FF00,
+ 0x0F1201A6,
+ 0x0F1200BB,
+ 0x0F12FFBF,
+ 0x0F12FFDD,
+ 0x0F1201F6,
+ 0x0F1200CB,
+ 0x0F12FF94,
+ 0x0F12019E,
+
+ 0x0F1201D2,
+ 0x0F12FFC2,
+ 0x0F12FFFC,
+ 0x0F1200E8,
+ 0x0F120126,
+ 0x0F12FF83,
+ 0x0F12FE7A,
+ 0x0F12017D,
+ 0x0F12FEED,
+ 0x0F12FF8A,
+ 0x0F1201F9,
+ 0x0F12005B,
+ 0x0F12FFCA,
+ 0x0F12FFA3,
+ 0x0F1201DA,
+ 0x0F120108,
+ 0x0F12FFB3,
+ 0x0F1201DD,
+
+ 0x0F1201D2,
+ 0x0F12FFC2,
+ 0x0F12FFFC,
+ 0x0F1200F4,
+ 0x0F120139,
+ 0x0F12FF64,
+ 0x0F12FEEC,
+ 0x0F1201FD,
+ 0x0F12FF8E,
+ 0x0F12FEF4,
+ 0x0F1201BD,
+ 0x0F12010A,
+ 0x0F12FFA2,
+ 0x0F12FFDE,
+ 0x0F120208,
+ 0x0F120163,
+ 0x0F12FF9E,
+ 0x0F1201B3,
+
+ /* Set NB */
+ 0x002A07EA,
+ 0x0F120000, /*afit_bUseNoiseInd 0 : NB 1: Noise Index */
+
+ /* param_start SARR_uNormBrInDoor */
+ 0x0F12000A, /* SARR_uNormBrInDoor[0] */
+ 0x0F120019, /* SARR_uNormBrInDoor[1] */
+ 0x0F12007D, /* SARR_uNormBrInDoor[2] */
+ 0x0F1202BC, /* SARR_uNormBrInDoor[3] */
+ 0x0F1207D0, /* SARR_uNormBrInDoor[4] */
+
+ /* param_start SARR_uNormBrOutDoor */
+ 0x0F12000A, /* SARR_uNormBrOutDoor[0] */
+ 0x0F120019, /* SARR_uNormBrOutDoor[1] */
+ 0x0F12007D, /* SARR_uNormBrOutDoor[2] */
+ 0x0F1202BC, /* SARR_uNormBrOutDoor[3] */
+ 0x0F1207D0, /* SARR_uNormBrOutDoor[4] */
+
+ /* Set AFIT */
+ 0x002A0814,
+ 0x0F12082C,
+ 0x0F127000,
+
+ 0x002A082C,
+ 0x0F120000, /* BRIGHTNESS */
+ 0x0F120000, /* CONTRAST */
+ 0x0F120010, /* SATURATION */
+ 0x0F12FFE2, /* SHARP_BLUR */
+ 0x0F120000, /* GLAMOUR */
+ 0x0F1203FF, /* Disparity_iSatSat */
+ 0x0F1203FF, /* Denoise1_iYDenThreshLow */
+ 0x0F120028, /* Denoise1_iYDenThreshLow_Bin */
+ 0x0F1203FF, /* Denoise1_iYDenThreshHigh */
+ 0x0F1200FF, /* Denoise1_iYDenThreshHigh_Bin */
+ 0x0F120002, /* Denoise1_iLowWWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWWideThresh */
+ 0x0F12000A, /* Denoise1_iLowWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWideThresh */
+ 0x0F1203FF, /* Denoise1_iSatSat */
+ 0x0F1203FF, /* Demosaic4_iHystGrayLow */
+ 0x0F120000, /* Demosaic4_iHystGrayHigh */
+ 0x0F120344, /* UVDenoise_iYLowThresh */
+ 0x0F12033A, /* UVDenoise_iYHighThresh */
+ 0x0F1203FF, /* UVDenoise_iUVLowThresh */
+ 0x0F1203FF, /* UVDenoise_iUVHighThresh */
+ 0x0F120028, /* DSMix1_iLowLimit_Wide */
+ 0x0F120032, /* DSMix1_iLowLimit_Wide_Bin */
+ 0x0F120014, /* DSMix1_iHighLimit_Wide */
+ 0x0F120032, /* DSMix1_iHighLimit_Wide_Bin */
+ 0x0F120050, /* DSMix1_iLowLimit_Fine */
+ 0x0F120032, /* DSMix1_iLowLimit_Fine_Bin */
+ 0x0F120046, /* DSMix1_iHighLimit_Fine */
+ 0x0F120032, /* DSMix1_iHighLimit_Fine_Bin */
+ 0x0F120106, /* DSMix1_iRGBOffset */
+ 0x0F12006F, /* DSMix1_iDemClamp */
+ 0x0F120C0F, /* "Disparity_iDispTH_LowDisparity_iDispTH_Low_Bin" */
+ 0x0F120C0F, /* "Disparity_iDispTH_High Disparity_iDispTH_High_Bin" */
+ 0x0F120303, /* "Despeckle_iCorrectionLevelColdDespeckle_iCorrectionLevelCold_Bin" */
+ 0x0F120303, /* Despeckle_iCorrectionLevelHotDespeckle_iCorrectionLevelHot_Bin */
+ 0x0F12140A, /* "Despeckle_iColdThreshLowDespeckle_iColdThreshHigh" */
+ 0x0F12140A, /* "Despeckle_iHotThreshLowDespeckle_iHotThreshHigh" */
+ 0x0F122828, /* "Denoise1_iLowMaxSlopeAllowedDenoise1_iHighMaxSlopeAllowed" */
+ 0x0F120606, /* "Denoise1_iLowSlopeThreshDenoise1_iHighSlopeThresh" */
+ 0x0F12023F, /* "Denoise1_iRadialPowerDenoise1_iRadialDivideShift" */
+ 0x0F120480, /* "Denoise1_iRadialLimitDenoise1_iLWBNoise" */
+ 0x0F12000F, /* "Denoise1_iWideDenoise1_iWideWide" */
+ 0x0F12030A, /* "Demosaic4_iHystGrayRangeUVDenoise_iYSupport" */
+ 0x0F120003, /* "UVDenoise_iUVSupportDSMix1_iLowPower_Wide" */
+ 0x0F120011, /* "DSMix1_iLowPower_Wide_BinDSMix1_iHighPower_Wide" */
+ 0x0F120A0F, /* "DSMix1_iHighPower_Wide_BinDSMix1_iLowThresh_Wide" */
+ 0x0F12050A, /* "DSMix1_iHighThresh_WideDSMix1_iReduceNegativeWide" */
+ 0x0F120900, /* "DSMix1_iLowPower_FineDSMix1_iLowPower_Fine_Bin" */
+ 0x0F120000, /* "DSMix1_iHighPower_FineDSMix1_iHighPower_Fine_Bin" */
+ 0x0F12980A, /* "DSMix1_iLowThresh_FineDSMix1_iHighThresh_Fine" */
+ 0x0F120005, /* "DSMix1_iReduceNegativeFineDSMix1_iRGBMultiplier" */
+ 0x0F120000, /* "Mixer1_iNLowNoisePowerMixer1_iNLowNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iNVeryLowNoisePowerMixer1_iNVeryLowNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iNHighNoisePowerMixer1_iNHighNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iWLowNoisePowerMixer1_iWVeryLowNoisePower" */
+ 0x0F120A00, /* "Mixer1_iWHighNoisePowerMixer1_iWLowNoiseCeilGain" */
+ 0x0F12000A, /* "Mixer1_iWHighNoiseCeilGainMixer1_iWNoiseCeilGain" */
+ 0x0F120180, /* "CCM_Oscar_iSaturationCCM_Oscar_bSaturation" */
+ 0x0F120180, /* "RGBGamma2_iLinearityRGBGamma2_bLinearity" */
+ 0x0F120100, /* "RGBGamma2_iDarkReduceRGBGamma2_bDarkReduce" */
+ 0x0F126E14, /* "byr_gas2_iShadingPowerRGB2YUV_iRGBGain" */
+ 0x0F120180, /* "RGB2YUV_iSaturationRGB2YUV_bGainOffset" */
+ 0x0F120008, /* RGB2YUV_iYOffset */
+
+ 0x0F120000, /* BRIGHTNESS */
+ 0x0F120000, /* CONTRAST */
+ 0x0F120000, /* SATURATION */
+ 0x0F120000, /* SHARP_BLUR */
+ 0x0F120000, /* GLAMOUR */
+ 0x0F1203FF, /* Disparity_iSatSat */
+ 0x0F120014, /* Denoise1_iYDenThreshLow */
+ 0x0F12000E, /* Denoise1_iYDenThreshLow_Bin */
+ 0x0F120064, /* Denoise1_iYDenThreshHigh */
+ 0x0F1200FF, /* Denoise1_iYDenThreshHigh_Bin */
+ 0x0F120002, /* Denoise1_iLowWWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWWideThresh */
+ 0x0F12000A, /* Denoise1_iLowWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWideThresh */
+ 0x0F1203FF, /* Denoise1_iSatSat */
+ 0x0F1203FF, /* Demosaic4_iHystGrayLow */
+ 0x0F120000, /* Demosaic4_iHystGrayHigh */
+ 0x0F120114, /* UVDenoise_iYLowThresh */
+ 0x0F12020A, /* UVDenoise_iYHighThresh */
+ 0x0F1203FF, /* UVDenoise_iUVLowThresh */
+ 0x0F1203FF, /* UVDenoise_iUVHighThresh */
+ 0x0F120028, /* DSMix1_iLowLimit_Wide */
+ 0x0F120000, /* DSMix1_iLowLimit_Wide_Bin */
+ 0x0F120014, /* DSMix1_iHighLimit_Wide */
+ 0x0F120032, /* DSMix1_iHighLimit_Wide_Bin */
+ 0x0F120050, /* DSMix1_iLowLimit_Fine */
+ 0x0F120032, /* DSMix1_iLowLimit_Fine_Bin */
+ 0x0F120046, /* DSMix1_iHighLimit_Fine */
+ 0x0F120032, /* DSMix1_iHighLimit_Fine_Bin */
+ 0x0F120106, /* DSMix1_iRGBOffset */
+ 0x0F12006F, /* DSMix1_iDemClamp */
+ 0x0F12050F, /* "Disparity_iDispTH_LowDisparity_iDispTH_Low_Bin" */
+ 0x0F120A0F, /* "Disparity_iDispTH_High Disparity_iDispTH_High_Bin" */
+ 0x0F120303, /* "Despeckle_iCorrectionLevelColdDespeckle_iCorrectionLevelCold_Bin" */
+ 0x0F120303, /* Despeckle_iCorrectionLevelHotDespeckle_iCorrectionLevelHot_Bin */
+ 0x0F12140A, /* "Despeckle_iColdThreshLowDespeckle_iColdThreshHigh" */
+ 0x0F12140A, /* "Despeckle_iHotThreshLowDespeckle_iHotThreshHigh" */
+ 0x0F122828, /* "Denoise1_iLowMaxSlopeAllowedDenoise1_iHighMaxSlopeAllowed" */
+ 0x0F120606, /* "Denoise1_iLowSlopeThreshDenoise1_iHighSlopeThresh" */
+ 0x0F12020A, /* "Denoise1_iRadialPowerDenoise1_iRadialDivideShift" */
+ 0x0F120480, /* "Denoise1_iRadialLimitDenoise1_iLWBNoise" */
+ 0x0F12000F, /* "Denoise1_iWideDenoise1_iWideWide" */
+ 0x0F120305, /* "Demosaic4_iHystGrayRangeUVDenoise_iYSupport" */
+ 0x0F122803, /* "UVDenoise_iUVSupportDSMix1_iLowPower_Wide" */
+ 0x0F122811, /* "DSMix1_iLowPower_Wide_BinDSMix1_iHighPower_Wide" */
+ 0x0F120A0F, /* "DSMix1_iHighPower_Wide_BinDSMix1_iLowThresh_Wide" */
+ 0x0F12050A, /* "DSMix1_iHighThresh_WideDSMix1_iReduceNegativeWide" */
+ 0x0F12101E, /* "DSMix1_iLowPower_FineDSMix1_iLowPower_Fine_Bin" */
+ 0x0F12101E, /* "DSMix1_iHighPower_FineDSMix1_iHighPower_Fine_Bin" */
+ 0x0F12980A, /* "DSMix1_iLowThresh_FineDSMix1_iHighThresh_Fine" */
+ 0x0F120005, /* "DSMix1_iReduceNegativeFineDSMix1_iRGBMultiplier" */
+ 0x0F120400, /* "Mixer1_iNLowNoisePowerMixer1_iNLowNoisePower_Bin" */
+ 0x0F120400, /* "Mixer1_iNVeryLowNoisePowerMixer1_iNVeryLowNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iNHighNoisePowerMixer1_iNHighNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iWLowNoisePowerMixer1_iWVeryLowNoisePower" */
+ 0x0F120A00, /* "Mixer1_iWHighNoisePowerMixer1_iWLowNoiseCeilGain" */
+ 0x0F12100A, /* "Mixer1_iWHighNoiseCeilGainMixer1_iWNoiseCeilGain" */
+ 0x0F120180, /* "CCM_Oscar_iSaturationCCM_Oscar_bSaturation" */
+ 0x0F120180, /* "RGBGamma2_iLinearityRGBGamma2_bLinearity" */
+ 0x0F120100, /* "RGBGamma2_iDarkReduceRGBGamma2_bDarkReduce" */
+ 0x0F128030, /* "byr_gas2_iShadingPowerRGB2YUV_iRGBGain" */
+ 0x0F120180, /* "RGB2YUV_iSaturationRGB2YUV_bGainOffset" */
+ 0x0F120000, /* RGB2YUV_iYOffset */
+
+ 0x0F120000, /* BRIGHTNESS */
+ 0x0F120000, /* CONTRAST */
+ 0x0F120000, /* SATURATION */
+ 0x0F120000, /* SHARP_BLUR */
+ 0x0F120000, /* GLAMOUR */
+ 0x0F1203FF, /* Disparity_iSatSat */
+ 0x0F12000C, /* Denoise1_iYDenThreshLow */
+ 0x0F120006, /* Denoise1_iYDenThreshLow_Bin */
+ 0x0F120060, /* Denoise1_iYDenThreshHigh */
+ 0x0F120050, /* Denoise1_iYDenThreshHigh_Bin */
+ 0x0F120002, /* Denoise1_iLowWWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWWideThresh */
+ 0x0F12000A, /* Denoise1_iLowWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWideThresh */
+ 0x0F1203FF, /* Denoise1_iSatSat */
+ 0x0F1203FF, /* Demosaic4_iHystGrayLow */
+ 0x0F120000, /* Demosaic4_iHystGrayHigh */
+ 0x0F120014, /* UVDenoise_iYLowThresh */
+ 0x0F12000A, /* UVDenoise_iYHighThresh */
+ 0x0F1203FF, /* UVDenoise_iUVLowThresh */
+ 0x0F1203FF, /* UVDenoise_iUVHighThresh */
+ 0x0F120028, /* DSMix1_iLowLimit_Wide */
+ 0x0F120032, /* DSMix1_iLowLimit_Wide_Bin */
+ 0x0F120014, /* DSMix1_iHighLimit_Wide */
+ 0x0F120032, /* DSMix1_iHighLimit_Wide_Bin */
+ 0x0F120050, /* DSMix1_iLowLimit_Fine */
+ 0x0F120032, /* DSMix1_iLowLimit_Fine_Bin */
+ 0x0F120010, /* DSMix1_iHighLimit_Fine */
+ 0x0F120032, /* DSMix1_iHighLimit_Fine_Bin */
+ 0x0F120106, /* DSMix1_iRGBOffset */
+ 0x0F12006F, /* DSMix1_iDemClamp */
+ 0x0F120202, /* "Disparity_iDispTH_LowDisparity_iDispTH_Low_Bin" */
+ 0x0F120502, /* "Disparity_iDispTH_High Disparity_iDispTH_High_Bin" */
+ 0x0F120202, /* "Despeckle_iCorrectionLevelColdDespeckle_iCorrectionLevelCold_Bin" */
+ 0x0F120202, /* Despeckle_iCorrectionLevelHotDespeckle_iCorrectionLevelHot_Bin */
+ 0x0F12140A, /* "Despeckle_iColdThreshLowDespeckle_iColdThreshHigh" */
+ 0x0F12140A, /* "Despeckle_iHotThreshLowDespeckle_iHotThreshHigh" */
+ 0x0F122828, /* "Denoise1_iLowMaxSlopeAllowedDenoise1_iHighMaxSlopeAllowed" */
+ 0x0F120606, /* "Denoise1_iLowSlopeThreshDenoise1_iHighSlopeThresh" */
+ 0x0F120205, /* "Denoise1_iRadialPowerDenoise1_iRadialDivideShift" */
+ 0x0F120480, /* "Denoise1_iRadialLimitDenoise1_iLWBNoise" */
+ 0x0F12000F, /* "Denoise1_iWideDenoise1_iWideWide" */
+ 0x0F120005, /* "Demosaic4_iHystGrayRangeUVDenoise_iYSupport" */
+ 0x0F122803, /* "UVDenoise_iUVSupportDSMix1_iLowPower_Wide" */
+ 0x0F122811, /* "DSMix1_iLowPower_Wide_BinDSMix1_iHighPower_Wide" */
+ 0x0F120A0F, /* "DSMix1_iHighPower_Wide_BinDSMix1_iLowThresh_Wide" */
+ 0x0F12050A, /* "DSMix1_iHighThresh_WideDSMix1_iReduceNegativeWide" */
+ 0x0F122020, /* "DSMix1_iLowPower_FineDSMix1_iLowPower_Fine_Bin" */
+ 0x0F122020, /* "DSMix1_iHighPower_FineDSMix1_iHighPower_Fine_Bin" */
+ 0x0F12980A, /* "DSMix1_iLowThresh_FineDSMix1_iHighThresh_Fine" */
+ 0x0F120007, /* "DSMix1_iReduceNegativeFineDSMix1_iRGBMultiplier" */
+ 0x0F120403, /* "Mixer1_iNLowNoisePowerMixer1_iNLowNoisePower_Bin" */
+ 0x0F120402, /* "Mixer1_iNVeryLowNoisePowerMixer1_iNVeryLowNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iNHighNoisePowerMixer1_iNHighNoisePower_Bin" */
+ 0x0F120203, /* "Mixer1_iWLowNoisePowerMixer1_iWVeryLowNoisePower" */
+ 0x0F120000, /* "Mixer1_iWHighNoisePowerMixer1_iWLowNoiseCeilGain" */
+ 0x0F121006, /* "Mixer1_iWHighNoiseCeilGainMixer1_iWNoiseCeilGain" */
+ 0x0F120180, /* "CCM_Oscar_iSaturationCCM_Oscar_bSaturation" */
+ 0x0F120180, /* "RGBGamma2_iLinearityRGBGamma2_bLinearity" */
+ 0x0F120100, /* "RGBGamma2_iDarkReduceRGBGamma2_bDarkReduce" */
+ 0x0F12803C, /* "byr_gas2_iShadingPowerRGB2YUV_iRGBGain" */
+ 0x0F120180, /* "RGB2YUV_iSaturationRGB2YUV_bGainOffset" */
+ 0x0F120000, /* RGB2YUV_iYOffset */
+
+ 0x0F120000, /* BRIGHTNESS */
+ 0x0F120000, /* CONTRAST */
+ 0x0F120000, /* SATURATION */
+ 0x0F120000, /* SHARP_BLUR */
+ 0x0F120000, /* GLAMOUR */
+ 0x0F1203FF, /* Disparity_iSatSat */
+ 0x0F120006, /* Denoise1_iYDenThreshLow */
+ 0x0F120006, /* Denoise1_iYDenThreshLow_Bin */
+ 0x0F12005A, /* Denoise1_iYDenThreshHigh */
+ 0x0F120050, /* Denoise1_iYDenThreshHigh_Bin */
+ 0x0F120002, /* Denoise1_iLowWWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWWideThresh */
+ 0x0F12000A, /* Denoise1_iLowWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWideThresh */
+ 0x0F1203FF, /* Denoise1_iSatSat */
+ 0x0F1203FF, /* Demosaic4_iHystGrayLow */
+ 0x0F120000, /* Demosaic4_iHystGrayHigh */
+ 0x0F120014, /* UVDenoise_iYLowThresh */
+ 0x0F12000A, /* UVDenoise_iYHighThresh */
+ 0x0F1203FF, /* UVDenoise_iUVLowThresh */
+ 0x0F1203FF, /* UVDenoise_iUVHighThresh */
+ 0x0F120028, /* DSMix1_iLowLimit_Wide */
+ 0x0F120032, /* DSMix1_iLowLimit_Wide_Bin */
+ 0x0F120014, /* DSMix1_iHighLimit_Wide */
+ 0x0F120032, /* DSMix1_iHighLimit_Wide_Bin */
+ 0x0F120050, /* DSMix1_iLowLimit_Fine */
+ 0x0F120032, /* DSMix1_iLowLimit_Fine_Bin */
+ 0x0F120010, /* DSMix1_iHighLimit_Fine */
+ 0x0F120032, /* DSMix1_iHighLimit_Fine_Bin */
+ 0x0F120106, /* DSMix1_iRGBOffset */
+ 0x0F12006F, /* DSMix1_iDemClamp */
+ 0x0F120202, /* "Disparity_iDispTH_LowDisparity_iDispTH_Low_Bin" */
+ 0x0F120502, /* "Disparity_iDispTH_High Disparity_iDispTH_High_Bin" */
+ 0x0F120202, /* "Despeckle_iCorrectionLevelColdDespeckle_iCorrectionLevelCold_Bin" */
+ 0x0F120202, /* Despeckle_iCorrectionLevelHotDespeckle_iCorrectionLevelHot_Bin */
+ 0x0F12140A, /* "Despeckle_iColdThreshLowDespeckle_iColdThreshHigh" */
+ 0x0F12140A, /* "Despeckle_iHotThreshLowDespeckle_iHotThreshHigh" */
+ 0x0F122828, /* "Denoise1_iLowMaxSlopeAllowedDenoise1_iHighMaxSlopeAllowed" */
+ 0x0F120606, /* "Denoise1_iLowSlopeThreshDenoise1_iHighSlopeThresh" */
+ 0x0F120205, /* "Denoise1_iRadialPowerDenoise1_iRadialDivideShift" */
+ 0x0F120480, /* "Denoise1_iRadialLimitDenoise1_iLWBNoise" */
+ 0x0F12000F, /* "Denoise1_iWideDenoise1_iWideWide" */
+ 0x0F120005, /* "Demosaic4_iHystGrayRangeUVDenoise_iYSupport" */
+ 0x0F122803, /* "UVDenoise_iUVSupportDSMix1_iLowPower_Wide" */
+ 0x0F122811, /* "DSMix1_iLowPower_Wide_BinDSMix1_iHighPower_Wide" */
+ 0x0F120A0F, /* "DSMix1_iHighPower_Wide_BinDSMix1_iLowThresh_Wide" */
+ 0x0F12050A, /* "DSMix1_iHighThresh_WideDSMix1_iReduceNegativeWide" */
+ 0x0F122020, /* "DSMix1_iLowPower_FineDSMix1_iLowPower_Fine_Bin" */
+ 0x0F122020, /* "DSMix1_iHighPower_FineDSMix1_iHighPower_Fine_Bin" */
+ 0x0F12980A, /* "DSMix1_iLowThresh_FineDSMix1_iHighThresh_Fine" */
+ 0x0F120007, /* "DSMix1_iReduceNegativeFineDSMix1_iRGBMultiplier" */
+ 0x0F120403, /* "Mixer1_iNLowNoisePowerMixer1_iNLowNoisePower_Bin" */
+ 0x0F120402, /* "Mixer1_iNVeryLowNoisePowerMixer1_iNVeryLowNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iNHighNoisePowerMixer1_iNHighNoisePower_Bin" */
+ 0x0F120203, /* "Mixer1_iWLowNoisePowerMixer1_iWVeryLowNoisePower" */
+ 0x0F120000, /* "Mixer1_iWHighNoisePowerMixer1_iWLowNoiseCeilGain" */
+ 0x0F121006, /* "Mixer1_iWHighNoiseCeilGainMixer1_iWNoiseCeilGain" */
+ 0x0F120180, /* "CCM_Oscar_iSaturationCCM_Oscar_bSaturation" */
+ 0x0F120180, /* "RGBGamma2_iLinearityRGBGamma2_bLinearity" */
+ 0x0F120100, /* "RGBGamma2_iDarkReduceRGBGamma2_bDarkReduce" */
+ 0x0F12803C, /* "byr_gas2_iShadingPowerRGB2YUV_iRGBGain" */
+ 0x0F120180, /* "RGB2YUV_iSaturationRGB2YUV_bGainOffset" */
+ 0x0F120000, /* RGB2YUV_iYOffset */
+
+ 0x0F120000, /* BRIGHTNESS */
+ 0x0F12000A, /* CONTRAST */
+ 0x0F120000, /* SATURATION */
+ 0x0F120000, /* SHARP_BLUR */
+ 0x0F120000, /* GLAMOUR */
+ 0x0F1203FF, /* Disparity_iSatSat */
+ 0x0F120006, /* Denoise1_iYDenThreshLow */
+ 0x0F120006, /* Denoise1_iYDenThreshLow_Bin */
+ 0x0F120050, /* Denoise1_iYDenThreshHigh */
+ 0x0F120050, /* Denoise1_iYDenThreshHigh_Bin */
+ 0x0F120002, /* Denoise1_iLowWWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWWideThresh */
+ 0x0F12000A, /* Denoise1_iLowWideThresh */
+ 0x0F12000A, /* Denoise1_iHighWideThresh */
+ 0x0F1203FF, /* Denoise1_iSatSat */
+ 0x0F1203FF, /* Demosaic4_iHystGrayLow */
+ 0x0F120000, /* Demosaic4_iHystGrayHigh */
+ 0x0F120000, /* UVDenoise_iYLowThresh */
+ 0x0F120000, /* UVDenoise_iYHighThresh */
+ 0x0F1203FF, /* UVDenoise_iUVLowThresh */
+ 0x0F1203FF, /* UVDenoise_iUVHighThresh */
+ 0x0F120028, /* DSMix1_iLowLimit_Wide */
+ 0x0F120032, /* DSMix1_iLowLimit_Wide_Bin */
+ 0x0F120000, /* DSMix1_iHighLimit_Wide */
+ 0x0F120032, /* DSMix1_iHighLimit_Wide_Bin */
+ 0x0F120030, /* DSMix1_iLowLimit_Fine */
+ 0x0F120032, /* DSMix1_iLowLimit_Fine_Bin */
+ 0x0F120000, /* DSMix1_iHighLimit_Fine */
+ 0x0F120032, /* DSMix1_iHighLimit_Fine_Bin */
+ 0x0F120106, /* DSMix1_iRGBOffset */
+ 0x0F12006F, /* DSMix1_iDemClamp */
+ 0x0F120202, /* "Disparity_iDispTH_LowDisparity_iDispTH_Low_Bin" */
+ 0x0F120502, /* "Disparity_iDispTH_High Disparity_iDispTH_High_Bin" */
+ 0x0F120202, /* "Despeckle_iCorrectionLevelColdDespeckle_iCorrectionLevelCold_Bin" */
+ 0x0F120202, /* Despeckle_iCorrectionLevelHotDespeckle_iCorrectionLevelHot_Bin */
+ 0x0F12140A, /* "Despeckle_iColdThreshLowDespeckle_iColdThreshHigh" */
+ 0x0F12140A, /* "Despeckle_iHotThreshLowDespeckle_iHotThreshHigh" */
+ 0x0F122828, /* "Denoise1_iLowMaxSlopeAllowedDenoise1_iHighMaxSlopeAllowed" */
+ 0x0F120606, /* "Denoise1_iLowSlopeThreshDenoise1_iHighSlopeThresh" */
+ 0x0F120205, /* "Denoise1_iRadialPowerDenoise1_iRadialDivideShift" */
+ 0x0F120880, /* "Denoise1_iRadialLimitDenoise1_iLWBNoise" */
+ 0x0F12000F, /* "Denoise1_iWideDenoise1_iWideWide" */
+ 0x0F120005, /* "Demosaic4_iHystGrayRangeUVDenoise_iYSupport" */
+ 0x0F122803, /* "UVDenoise_iUVSupportDSMix1_iLowPower_Wide" */
+ 0x0F122811, /* "DSMix1_iLowPower_Wide_BinDSMix1_iHighPower_Wide" */
+ 0x0F120A0F, /* "DSMix1_iHighPower_Wide_BinDSMix1_iLowThresh_Wide" */
+ 0x0F12050A, /* "DSMix1_iHighThresh_WideDSMix1_iReduceNegativeWide" */
+ 0x0F122020, /* "DSMix1_iLowPower_FineDSMix1_iLowPower_Fine_Bin" */
+ 0x0F122020, /* "DSMix1_iHighPower_FineDSMix1_iHighPower_Fine_Bin" */
+ 0x0F12980A, /* "DSMix1_iLowThresh_FineDSMix1_iHighThresh_Fine" */
+ 0x0F120007, /* "DSMix1_iReduceNegativeFineDSMix1_iRGBMultiplier" */
+ 0x0F120408, /* "Mixer1_iNLowNoisePowerMixer1_iNLowNoisePower_Bin" */
+ 0x0F120406, /* "Mixer1_iNVeryLowNoisePowerMixer1_iNVeryLowNoisePower_Bin" */
+ 0x0F120000, /* "Mixer1_iNHighNoisePowerMixer1_iNHighNoisePower_Bin" */
+ 0x0F120608, /* "Mixer1_iWLowNoisePowerMixer1_iWVeryLowNoisePower" */
+ 0x0F120000, /* "Mixer1_iWHighNoisePowerMixer1_iWLowNoiseCeilGain" */
+ 0x0F121006, /* "Mixer1_iWHighNoiseCeilGainMixer1_iWNoiseCeilGain" */
+ 0x0F120180, /* "CCM_Oscar_iSaturationCCM_Oscar_bSaturation" */
+ 0x0F120180, /* "RGBGamma2_iLinearityRGBGamma2_bLinearity" */
+ 0x0F120100, /* "RGBGamma2_iDarkReduceRGBGamma2_bDarkReduce" */
+ 0x0F128050, /* "byr_gas2_iShadingPowerRGB2YUV_iRGBGain" */
+ 0x0F120180, /* "RGB2YUV_iSaturationRGB2YUV_bGainOffset" */
+ 0x0F120000, /* RGB2YUV_iYOffset */
+
+ 0x0F1200FF,
+ 0x0F1200FF,
+ 0x0F120800,
+ 0x0F120600,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120000,
+ 0x0F120300,
+ 0x0F120002,
+ 0x0F120400,
+ 0x0F120106,
+ 0x0F120005,
+ 0x0F120000,
+ 0x0F120703,
+ 0x0F120000,
+ 0x0F12FFD6,
+ 0x0F1253C1,
+ 0x0F12E1FE,
+ 0x0F120001,
+
+ /* Update Changed Registers */
+ 0x002A03FC,
+ 0x0F120001, /* REG_TC_DBG_ReInitCmd */
+
+ 0x0028D000,
+ 0x002AB0CC,
+ 0x0F12000B, /* Non contious mode */
+ /* Recording 25fps Anti-Flicker 50Hz END of Initial */
+};
+
static const u32 s5k5bafx_stream_stop[] =
{
0xFCFCD000,
@@ -13242,7 +14707,13 @@ static const u32 s5k5bafx_vt_pretty_3[] =
0x0F120400, /* 0400, 0400, 0400, */
};
-static const u32 s5k5bafx_vt_7fps[] =
+/* Don't delete it. */
+static const u32 s5k5bafx_fps_auto[] = {
+ 0xFCFCD000,
+ 0x00287000,
+};
+
+static const u32 s5k5bafx_fps_7fix[] =
{
/* Fixed 7fps Mode */
0xFCFCD000,
@@ -13275,7 +14746,7 @@ static const u32 s5k5bafx_vt_7fps[] =
0x0F12000B,
};
-static const u32 s5k5bafx_vt_10fps[] =
+static const u32 s5k5bafx_fps_10fix[] =
{
/* Fixed 10fps Mode */
0xFCFCD000,
@@ -13308,7 +14779,7 @@ static const u32 s5k5bafx_vt_10fps[] =
0x0F12000B,
};
-static const u32 s5k5bafx_vt_12fps[] =
+static const u32 s5k5bafx_fps_12fix[] =
{
/* Fixed 12fps Mode */
0xFCFCD000,
@@ -13341,7 +14812,7 @@ static const u32 s5k5bafx_vt_12fps[] =
0x0F12000B,
};
-static const u32 s5k5bafx_vt_15fps[] =
+static const u32 s5k5bafx_fps_15fix[] =
{
/* Fixed 15fps Mode */
0xFCFCD000,
@@ -13374,6 +14845,21 @@ static const u32 s5k5bafx_vt_15fps[] =
0x0F12000B,
};
+static const u32 s5k5bafx_fps_25fix[] = {
+ /* Fixed 25fps Mode */
+ 0xFCFCD000,
+ 0x00287000,
+
+ 0x002A0252,
+ 0x0F120000, /* FrRateQualityType */
+ 0x002A0250,
+ 0x0F120002, /* usFrTimeType */
+ 0x002A0254,
+ 0x0F120190, /* 15fps*/
+ 0x0F120000,
+};
+
+#ifdef SUPPORT_FACTORY_TEST
/*******************************************************
* CAMERA_DTP_ON
*******************************************************/
@@ -13474,5 +14960,6 @@ static const u32 s5k5bafx_pattern_off[] = {
0x002A3100,
0x0F120000, /* Colorbar pattern */
};
+#endif /* SUPPORT_FACTORY_TEST */
#endif /* __S5K5BAFX_SETFILE_H */
diff --git a/drivers/media/video/samsung/fimc/fimc_capture_u1.c b/drivers/media/video/samsung/fimc/fimc_capture_u1.c
index 1855abf..8a70bfe 100644
--- a/drivers/media/video/samsung/fimc/fimc_capture_u1.c
+++ b/drivers/media/video/samsung/fimc/fimc_capture_u1.c
@@ -264,9 +264,6 @@ retry:
}
/* subdev call for init */
-#if !defined(CONFIG_MACH_PX)
- do_gettimeofday(&ctrl->before_time);
-#endif
if (ctrl->cap->fmt.priv == V4L2_PIX_FMT_MODE_CAPTURE) {
ret = v4l2_subdev_call(cam->sd, core, init, 1);
pixelformat = V4L2_PIX_FMT_JPEG;
@@ -1863,20 +1860,8 @@ int fimc_streamon_capture(void *fh)
STREAM_MODE_CAM_ON);
}
} else {
- do_gettimeofday(&ctrl->curr_time);
- inner_elapsed_usec = \
- (ctrl->curr_time.tv_sec - ctrl->before_time.tv_sec) * USEC_PER_SEC \
- + ctrl->curr_time.tv_usec - ctrl->before_time.tv_usec;
- inner_elapsed_usec = inner_elapsed_usec / 1000;
-
- /* printk(KERN_INFO "\n\nfront cam stream off remain time = %dms\n",
- inner_elapsed_usec);*/
-
- if (150 > inner_elapsed_usec) {
- /*printk(KERN_INFO "front cam stream off added msleep = %dms\n",
- 150 - inner_elapsed_usec);*/
- msleep(150 - inner_elapsed_usec);
- }
+ v4l2_subdev_call(cam->sd, video, s_stream,
+ STREAM_MODE_WAIT_OFF);
}
#endif
if (cam->id == CAMERA_CSI_C) {
@@ -2035,10 +2020,11 @@ int fimc_streamoff_capture(void *fh)
STREAM_MODE_CAM_OFF);
#endif /* CONFIG_VIDEO_IMPROVE_STREAMOFF */
#else /* CONFIG_MACH_PX */
- if (get_fimc_dev()->active_camera == 1)
- v4l2_subdev_call(ctrl->cam->sd, video, s_stream, STREAM_MODE_CAM_OFF);
-
- do_gettimeofday(&ctrl->before_time);
+ if (get_fimc_dev()->active_camera == 1) {
+ if ((ctrl->id != FIMC2) && (ctrl->cam->type == CAM_TYPE_MIPI))
+ v4l2_subdev_call(ctrl->cam->sd, video, s_stream,
+ STREAM_MODE_CAM_OFF);
+ }
#endif
/* wait for stop hardware */
diff --git a/drivers/media/video/samsung/fimc/fimc_dev_u1.c b/drivers/media/video/samsung/fimc/fimc_dev_u1.c
index 762256b..811ac96 100644
--- a/drivers/media/video/samsung/fimc/fimc_dev_u1.c
+++ b/drivers/media/video/samsung/fimc/fimc_dev_u1.c
@@ -575,9 +575,6 @@ struct fimc_control *fimc_register_controller(struct platform_device *pdev)
ctrl->power_status = FIMC_POWER_OFF;
/* CMA */
-#ifdef CONFIG_ION_EXYNOS
- if (id != 2) {
-#endif
sprintf(ctrl->cma_name, "%s%d", FIMC_CMA_NAME, ctrl->id);
err = cma_info(&mem_info, ctrl->dev, 0);
fimc_info1("%s : [cma_info] start_addr : 0x%x, end_addr : 0x%x, "
@@ -593,9 +590,6 @@ struct fimc_control *fimc_register_controller(struct platform_device *pdev)
ctrl->mem.base = (dma_addr_t)cma_alloc
(ctrl->dev, ctrl->cma_name, (size_t)ctrl->mem.size, 0);
}
-#ifdef CONFIG_ION_EXYNOS
- }
-#endif
printk(KERN_INFO "ctrl->mem.size = 0x%x\n", ctrl->mem.size);
printk(KERN_INFO "ctrl->mem.base = 0x%x\n", ctrl->mem.base);
diff --git a/drivers/media/video/samsung/mali/platform/mali_platform.h b/drivers/media/video/samsung/mali/platform/mali_platform.h
index 786a50c..888f57a 100644
--- a/drivers/media/video/samsung/mali/platform/mali_platform.h
+++ b/drivers/media/video/samsung/mali/platform/mali_platform.h
@@ -19,7 +19,7 @@
#include "mali_osk.h"
#ifdef CONFIG_CPU_EXYNOS4210
-#define MALI_DVFS_STEPS 2
+#define MALI_DVFS_STEPS 3
#else
#define MALI_DVFS_STEPS 5
#endif
diff --git a/drivers/media/video/samsung/mali/platform/orion-m400/mali_platform_dvfs.c b/drivers/media/video/samsung/mali/platform/orion-m400/mali_platform_dvfs.c
index d1bc62f..3bf6805 100644
--- a/drivers/media/video/samsung/mali/platform/orion-m400/mali_platform_dvfs.c
+++ b/drivers/media/video/samsung/mali/platform/orion-m400/mali_platform_dvfs.c
@@ -1 +1,443 @@
-/* * Copyright (C) 2010-2012 ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence. * * A copy of the licence is included with the program, and can also be obtained from Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /** * @file mali_platform_dvfs.c * Platform specific Mali driver dvfs functions */ #include "mali_kernel_common.h" #include "mali_osk.h" #include "mali_platform.h" #include <linux/clk.h> #include <linux/err.h> #include <linux/regulator/consumer.h> #include <linux/regulator/driver.h> #include <asm/io.h> #ifdef CONFIG_CPU_FREQ #include <mach/asv.h> #include <mach/regs-pmu.h> #define EXYNOS4_ASV_ENABLED #endif #include "mali_device_pause_resume.h" #include <linux/workqueue.h> #define MALI_DVFS_WATING 10 // msec static int bMaliDvfsRun=0; #if MALI_GPU_BOTTOM_LOCK static _mali_osk_atomic_t bottomlock_status; #endif typedef struct mali_dvfs_tableTag{ unsigned int clock; unsigned int freq; unsigned int vol; }mali_dvfs_table; typedef struct mali_dvfs_statusTag{ unsigned int currentStep; mali_dvfs_table * pCurrentDvfs; }mali_dvfs_currentstatus; typedef struct mali_dvfs_thresholdTag{ unsigned int downthreshold; unsigned int upthreshold; }mali_dvfs_threshold_table; typedef struct mali_dvfs_staycount{ unsigned int staycount; }mali_dvfs_staycount_table; mali_dvfs_staycount_table mali_dvfs_staycount[MALI_DVFS_STEPS]={ /*step 0*/{1}, /*step 1*/{1},}; /*dvfs threshold*/ mali_dvfs_threshold_table mali_dvfs_threshold[MALI_DVFS_STEPS]={ /*step 0*/{((int)((255*0)/100)), ((int)((255*85)/100))}, /*step 1*/{((int)((255*75)/100)), ((int)((255*100)/100))} }; /*dvfs status*/ mali_dvfs_currentstatus maliDvfsStatus; int mali_dvfs_control=0; /*dvfs table*/ mali_dvfs_table mali_dvfs[MALI_DVFS_STEPS]={ /*step 0*/{160 ,1000000 , 950000}, /*step 1*/{267 ,1000000 ,1000000} }; #ifdef EXYNOS4_ASV_ENABLED #define ASV_8_LEVEL 8 #define ASV_5_LEVEL 5 #define ASV_LEVEL_SUPPORT 0 static unsigned int asv_3d_volt_5_table[ASV_5_LEVEL][MALI_DVFS_STEPS] = { /* L3(160MHz), L2(266MHz) */ {1000000, 1100000}, /* S */ {1000000, 1100000}, /* A */ { 950000, 1000000}, /* B */ { 950000, 1000000}, /* C */ { 950000, 950000}, /* D */ }; static unsigned int asv_3d_volt_8_table[ASV_8_LEVEL][MALI_DVFS_STEPS] = { /* L3(160MHz), L2(266MHz)) */ {1000000, 1100000}, /* SS */ {1000000, 1100000}, /* A1 */ {1000000, 1100000}, /* A2 */ { 950000, 1000000}, /* B1 */ { 950000, 1000000}, /* B2 */ { 950000, 1000000}, /* C1 */ { 950000, 1000000}, /* C2 */ { 950000, 950000}, /* D1 */ }; #endif static u32 mali_dvfs_utilization = 255; static void mali_dvfs_work_handler(struct work_struct *w); static struct workqueue_struct *mali_dvfs_wq = 0; extern mali_io_address clk_register_map; #if MALI_GPU_BOTTOM_LOCK extern _mali_osk_lock_t *mali_dvfs_lock; #endif static DECLARE_WORK(mali_dvfs_work, mali_dvfs_work_handler); static unsigned int get_mali_dvfs_status(void) { return maliDvfsStatus.currentStep; } #if MALI_GPU_BOTTOM_LOCK #if MALI_PMM_RUNTIME_JOB_CONTROL_ON int get_mali_dvfs_control_status(void) { return mali_dvfs_control; } mali_bool set_mali_dvfs_current_step(unsigned int step) { _mali_osk_lock_wait(mali_dvfs_lock, _MALI_OSK_LOCKMODE_RW); maliDvfsStatus.currentStep = step; _mali_osk_lock_signal(mali_dvfs_lock, _MALI_OSK_LOCKMODE_RW); return MALI_TRUE; } #endif #endif static mali_bool set_mali_dvfs_status(u32 step,mali_bool boostup) { u32 validatedStep=step; #ifdef CONFIG_REGULATOR if (mali_regulator_get_usecount()==0) { MALI_DEBUG_PRINT(1, ("regulator use_count is 0 \n")); return MALI_FALSE; } #endif if (boostup) { #ifdef CONFIG_REGULATOR /*change the voltage*/ mali_regulator_set_voltage(mali_dvfs[step].vol, mali_dvfs[step].vol); #endif /*change the clock*/ mali_clk_set_rate(mali_dvfs[step].clock, mali_dvfs[step].freq); } else { /*change the clock*/ mali_clk_set_rate(mali_dvfs[step].clock, mali_dvfs[step].freq); #ifdef CONFIG_REGULATOR /*change the voltage*/ mali_regulator_set_voltage(mali_dvfs[step].vol, mali_dvfs[step].vol); #endif } maliDvfsStatus.currentStep = validatedStep; /*for future use*/ maliDvfsStatus.pCurrentDvfs = &mali_dvfs[validatedStep]; return MALI_TRUE; } static void mali_platform_wating(u32 msec) { /*sample wating change this in the future with proper check routine. */ unsigned int read_val; while(1) { read_val = _mali_osk_mem_ioread32(clk_register_map, 0x00); if ((read_val & 0x8000)==0x0000) break; _mali_osk_time_ubusydelay(100); // 1000 -> 100 : 20101218 } /* _mali_osk_time_ubusydelay(msec*1000);*/ } static mali_bool change_mali_dvfs_status(u32 step, mali_bool boostup ) { MALI_DEBUG_PRINT(1, ("> change_mali_dvfs_status: %d, %d \n",step, boostup)); if (!set_mali_dvfs_status(step, boostup)) { MALI_DEBUG_PRINT(1, ("error on set_mali_dvfs_status: %d, %d \n",step, boostup)); return MALI_FALSE; } /*wait until clock and voltage is stablized*/ mali_platform_wating(MALI_DVFS_WATING); /*msec*/ return MALI_TRUE; } static unsigned int decideNextStatus(unsigned int utilization) { unsigned int level=0; // 0:stay, 1:up if (!mali_dvfs_control) { #if MALI_GPU_BOTTOM_LOCK if (_mali_osk_atomic_read(&bottomlock_status) > 0) level = 1; /* or bigger */ else if (utilization > mali_dvfs_threshold[maliDvfsStatus.currentStep].upthreshold) #else if (utilization > mali_dvfs_threshold[maliDvfsStatus.currentStep].upthreshold) #endif level=1; else if (utilization < mali_dvfs_threshold[maliDvfsStatus.currentStep].downthreshold) level=0; else level = maliDvfsStatus.currentStep; } else { if ((mali_dvfs_control > 0) && (mali_dvfs_control < mali_dvfs[1].clock)) level=0; else level=1; } return level; } #ifdef EXYNOS4_ASV_ENABLED static mali_bool mali_dvfs_table_update(void) { unsigned int exynos_result_of_asv_group; unsigned int i; exynos_result_of_asv_group = exynos_result_of_asv & 0xf; MALI_PRINT(("exynos_result_of_asv_group = 0x%x\n", exynos_result_of_asv_group)); if (ASV_LEVEL_SUPPORT) { //asv level information will be added. for (i = 0; i < MALI_DVFS_STEPS; i++) { mali_dvfs[i].vol = asv_3d_volt_5_table[exynos_result_of_asv_group][i]; MALI_PRINT(("mali_dvfs[%d].vol = %d\n", i, mali_dvfs[i].vol)); } } else { for (i = 0; i < MALI_DVFS_STEPS; i++) { mali_dvfs[i].vol = asv_3d_volt_8_table[exynos_result_of_asv_group][i]; MALI_PRINT(("mali_dvfs[%d].vol = %d\n", i, mali_dvfs[i].vol)); } } return MALI_TRUE; } #endif static mali_bool mali_dvfs_status(u32 utilization) { unsigned int nextStatus = 0; unsigned int curStatus = 0; mali_bool boostup = MALI_FALSE; #ifdef EXYNOS4_ASV_ENABLED static mali_bool asv_applied = MALI_FALSE; #endif static int stay_count = 0; // to prevent frequent switch MALI_DEBUG_PRINT(1, ("> mali_dvfs_status: %d \n",utilization)); #ifdef EXYNOS4_ASV_ENABLED if (asv_applied == MALI_FALSE) { mali_dvfs_table_update(); change_mali_dvfs_status(0,0); asv_applied = MALI_TRUE; return MALI_TRUE; } #endif /*decide next step*/ curStatus = get_mali_dvfs_status(); nextStatus = decideNextStatus(utilization); MALI_DEBUG_PRINT(1, ("= curStatus %d, nextStatus %d, maliDvfsStatus.currentStep %d \n", curStatus, nextStatus, maliDvfsStatus.currentStep)); /*if next status is same with current status, don't change anything*/ if ((curStatus!=nextStatus && stay_count==0)) { /*check if boost up or not*/ if (nextStatus > maliDvfsStatus.currentStep) boostup = 1; /*change mali dvfs status*/ if (!change_mali_dvfs_status(nextStatus,boostup)) { MALI_DEBUG_PRINT(1, ("error on change_mali_dvfs_status \n")); return MALI_FALSE; } stay_count = mali_dvfs_staycount[maliDvfsStatus.currentStep].staycount; } else { if (stay_count>0) stay_count--; } return MALI_TRUE; } int mali_dvfs_is_running(void) { return bMaliDvfsRun; } void mali_dvfs_late_resume(void) { // set the init clock as low when resume set_mali_dvfs_status(0,0); } static void mali_dvfs_work_handler(struct work_struct *w) { bMaliDvfsRun=1; MALI_DEBUG_PRINT(3, ("=== mali_dvfs_work_handler\n")); if (!mali_dvfs_status(mali_dvfs_utilization)) MALI_DEBUG_PRINT(1,( "error on mali dvfs status in mali_dvfs_work_handler")); bMaliDvfsRun=0; } mali_bool init_mali_dvfs_status(int step) { /*default status add here with the right function to get initilization value. */ if (!mali_dvfs_wq) mali_dvfs_wq = create_singlethread_workqueue("mali_dvfs"); #if MALI_GPU_BOTTOM_LOCK _mali_osk_atomic_init(&bottomlock_status, 0); #endif /*add a error handling here*/ maliDvfsStatus.currentStep = step; return MALI_TRUE; } void deinit_mali_dvfs_status(void) { #if MALI_GPU_BOTTOM_LOCK _mali_osk_atomic_term(&bottomlock_status); #endif if (mali_dvfs_wq) destroy_workqueue(mali_dvfs_wq); mali_dvfs_wq = NULL; } mali_bool mali_dvfs_handler(u32 utilization) { mali_dvfs_utilization = utilization; queue_work_on(0, mali_dvfs_wq,&mali_dvfs_work); /*add error handle here*/ return MALI_TRUE; } void mali_default_step_set(int step, mali_bool boostup) { mali_clk_set_rate(mali_dvfs[step].clock, mali_dvfs[step].freq); if (maliDvfsStatus.currentStep == 1) set_mali_dvfs_status(step, boostup); } #if MALI_GPU_BOTTOM_LOCK int mali_dvfs_bottom_lock_push(void) { int prev_status = _mali_osk_atomic_read(&bottomlock_status); if (prev_status < 0) { MALI_PRINT(("gpu bottom lock status is not valid for push")); return -1; } if (prev_status == 0) { mali_regulator_set_voltage(mali_dvfs[1].vol, mali_dvfs[1].vol); mali_clk_set_rate(mali_dvfs[1].clock, mali_dvfs[1].freq); set_mali_dvfs_current_step(1); } return _mali_osk_atomic_inc_return(&bottomlock_status); } int mali_dvfs_bottom_lock_pop(void) { if (_mali_osk_atomic_read(&bottomlock_status) <= 0) { MALI_PRINT(("gpu bottom lock status is not valid for pop")); return -1; } return _mali_osk_atomic_dec_return(&bottomlock_status); } #endif \ No newline at end of file
+/* * Copyright (C) 2010-2012 ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence.
+ *
+ * A copy of the licence is included with the program, and can also be obtained from Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * @file mali_platform_dvfs.c
+ * Platform specific Mali driver dvfs functions
+ */
+
+#include "mali_kernel_common.h"
+#include "mali_osk.h"
+#include "mali_platform.h"
+
+#include <linux/clk.h>
+#include <linux/err.h>
+#include <linux/regulator/consumer.h>
+#include <linux/regulator/driver.h>
+
+#include <asm/io.h>
+
+#ifdef CONFIG_CPU_FREQ
+#include <mach/asv.h>
+#include <mach/regs-pmu.h>
+#define EXYNOS4_ASV_ENABLED
+#endif
+
+#include "mali_device_pause_resume.h"
+#include <linux/workqueue.h>
+
+#define MALI_DVFS_WATING 10 // msec
+
+static int bMaliDvfsRun=0;
+
+#if MALI_GPU_BOTTOM_LOCK
+static _mali_osk_atomic_t bottomlock_status;
+#endif
+
+typedef struct mali_dvfs_tableTag{
+ unsigned int clock;
+ unsigned int freq;
+ unsigned int vol;
+}mali_dvfs_table;
+
+typedef struct mali_dvfs_statusTag{
+ unsigned int currentStep;
+ mali_dvfs_table * pCurrentDvfs;
+
+}mali_dvfs_currentstatus;
+
+typedef struct mali_dvfs_thresholdTag{
+ unsigned int downthreshold;
+ unsigned int upthreshold;
+}mali_dvfs_threshold_table;
+
+typedef struct mali_dvfs_staycount{
+ unsigned int staycount;
+}mali_dvfs_staycount_table;
+
+mali_dvfs_staycount_table mali_dvfs_staycount[MALI_DVFS_STEPS]={
+ /*step 0*/{1},
+ /*step 1*/{1},
+ /*step 2*/{1} };
+
+/*dvfs threshold*/
+mali_dvfs_threshold_table mali_dvfs_threshold[MALI_DVFS_STEPS]={
+ /*step 0*/{((int)((255*0)/100)) ,((int)((255*85)/100))},
+ /*step 1*/{((int)((255*80)/100)) ,((int)((255*90)/100))},
+ /*step 2*/{((int)((255*80)/100)) ,((int)((255*100)/100))} };
+
+/*dvfs status*/
+mali_dvfs_currentstatus maliDvfsStatus;
+int mali_dvfs_control=0;
+
+/*dvfs table*/
+mali_dvfs_table mali_dvfs[MALI_DVFS_STEPS]={
+ /*step 0*/{100 ,1000000 , 950000},
+ /*step 1*/{160 ,1000000 , 950000},
+ /*step 2*/{267 ,1000000 ,1000000} };
+
+#ifdef EXYNOS4_ASV_ENABLED
+
+#define ASV_8_LEVEL 8
+#define ASV_5_LEVEL 5
+#define ASV_LEVEL_SUPPORT 0
+
+static unsigned int asv_3d_volt_5_table[ASV_5_LEVEL][MALI_DVFS_STEPS] = {
+ /* L3 (100MHz) L2(160MHz), L1(267MHz) */
+ {1000000, 1000000, 1100000}, /* S */
+ {1000000, 1000000, 1100000}, /* A */
+ { 950000, 950000, 1000000}, /* B */
+ { 950000, 950000, 1000000}, /* C */
+ { 950000, 950000, 950000}, /* D */
+};
+
+static unsigned int asv_3d_volt_8_table[ASV_8_LEVEL][MALI_DVFS_STEPS] = {
+ /* L3 (100MHz) L2(160MHz), L1(267MHz) */
+ {1000000, 1000000, 1100000}, /* SS */
+ {1000000, 1000000, 1100000}, /* A1 */
+ {1000000, 1000000, 1100000}, /* A2 */
+ { 950000, 950000, 1000000}, /* B1 */
+ { 950000, 950000, 1000000}, /* B2 */
+ { 950000, 950000, 1000000}, /* C1 */
+ { 950000, 950000, 1000000}, /* C2 */
+ { 950000, 950000, 950000}, /* D1 */
+};
+#endif
+
+static u32 mali_dvfs_utilization = 255;
+
+static void mali_dvfs_work_handler(struct work_struct *w);
+
+static struct workqueue_struct *mali_dvfs_wq = 0;
+extern mali_io_address clk_register_map;
+
+#if MALI_GPU_BOTTOM_LOCK
+extern _mali_osk_lock_t *mali_dvfs_lock;
+#endif
+
+static DECLARE_WORK(mali_dvfs_work, mali_dvfs_work_handler);
+
+static unsigned int get_mali_dvfs_status(void)
+{
+ return maliDvfsStatus.currentStep;
+}
+
+#if MALI_GPU_BOTTOM_LOCK
+#if MALI_PMM_RUNTIME_JOB_CONTROL_ON
+int get_mali_dvfs_control_status(void)
+{
+ return mali_dvfs_control;
+}
+
+mali_bool set_mali_dvfs_current_step(unsigned int step)
+{
+ _mali_osk_lock_wait(mali_dvfs_lock, _MALI_OSK_LOCKMODE_RW);
+ maliDvfsStatus.currentStep = step;
+ _mali_osk_lock_signal(mali_dvfs_lock, _MALI_OSK_LOCKMODE_RW);
+ return MALI_TRUE;
+}
+#endif
+#endif
+
+static mali_bool set_mali_dvfs_status(u32 step,mali_bool boostup)
+{
+ u32 validatedStep=step;
+
+#ifdef CONFIG_REGULATOR
+ if (mali_regulator_get_usecount()==0) {
+ MALI_DEBUG_PRINT(1, ("regulator use_count is 0 \n"));
+ return MALI_FALSE;
+ }
+#endif
+
+ if (boostup) {
+#ifdef CONFIG_REGULATOR
+ /*change the voltage*/
+ mali_regulator_set_voltage(mali_dvfs[step].vol, mali_dvfs[step].vol);
+#endif
+ /*change the clock*/
+ mali_clk_set_rate(mali_dvfs[step].clock, mali_dvfs[step].freq);
+ } else {
+ /*change the clock*/
+ mali_clk_set_rate(mali_dvfs[step].clock, mali_dvfs[step].freq);
+#ifdef CONFIG_REGULATOR
+ /*change the voltage*/
+ mali_regulator_set_voltage(mali_dvfs[step].vol, mali_dvfs[step].vol);
+#endif
+ }
+
+ maliDvfsStatus.currentStep = validatedStep;
+ /*for future use*/
+ maliDvfsStatus.pCurrentDvfs = &mali_dvfs[validatedStep];
+
+ return MALI_TRUE;
+}
+
+static void mali_platform_wating(u32 msec)
+{
+ /*sample wating
+ change this in the future with proper check routine.
+ */
+ unsigned int read_val;
+ while(1) {
+ read_val = _mali_osk_mem_ioread32(clk_register_map, 0x00);
+ if ((read_val & 0x8000)==0x0000) break;
+
+ _mali_osk_time_ubusydelay(100); // 1000 -> 100 : 20101218
+ }
+ /* _mali_osk_time_ubusydelay(msec*1000);*/
+}
+
+static mali_bool change_mali_dvfs_status(u32 step, mali_bool boostup )
+{
+
+ MALI_DEBUG_PRINT(1, ("> change_mali_dvfs_status: %d, %d \n",step, boostup));
+
+ if (!set_mali_dvfs_status(step, boostup)) {
+ MALI_DEBUG_PRINT(1, ("error on set_mali_dvfs_status: %d, %d \n",step, boostup));
+ return MALI_FALSE;
+ }
+
+ /*wait until clock and voltage is stablized*/
+ mali_platform_wating(MALI_DVFS_WATING); /*msec*/
+
+ return MALI_TRUE;
+}
+
+static unsigned int decideNextStatus(unsigned int utilization)
+{
+ unsigned int level=0; // 0:stay, 1:up
+
+ if (!mali_dvfs_control) {
+#if MALI_GPU_BOTTOM_LOCK
+ if (_mali_osk_atomic_read(&bottomlock_status) > 0)
+ level = 1; /* or bigger */
+ else
+#endif
+ switch(maliDvfsStatus.currentStep)
+ {
+ case 0:
+ if( utilization > mali_dvfs_threshold[maliDvfsStatus.currentStep].upthreshold)
+ level=1;
+ else
+ level = maliDvfsStatus.currentStep;
+ break;
+ case 1:
+ if( utilization > mali_dvfs_threshold[maliDvfsStatus.currentStep].upthreshold)
+ level=2;
+ else if( utilization <
+ (mali_dvfs_threshold[maliDvfsStatus.currentStep].downthreshold*mali_dvfs[maliDvfsStatus.currentStep-1].clock)/
+ mali_dvfs[maliDvfsStatus.currentStep].clock)
+ level=0;
+ else
+ level = maliDvfsStatus.currentStep;
+ break;
+ case 2:
+ if( utilization <
+ (mali_dvfs_threshold[maliDvfsStatus.currentStep].downthreshold*mali_dvfs[maliDvfsStatus.currentStep-1].clock)/
+ mali_dvfs[maliDvfsStatus.currentStep].clock)
+ level=1;
+ else
+ level = maliDvfsStatus.currentStep;
+ break;
+ }
+ }
+ else
+ {
+ if((mali_dvfs_control == 1)||(( mali_dvfs_control > 3) && (mali_dvfs_control < mali_dvfs[0].clock+1)))
+ {
+ level=0;
+ }
+ else if((mali_dvfs_control == 2)||(( mali_dvfs_control > mali_dvfs[0].clock) && (mali_dvfs_control < mali_dvfs[1].clock+1)))
+ {
+ level=1;
+ }
+ else
+ {
+ level=2;
+ }
+ }
+
+ return level;
+}
+
+#ifdef EXYNOS4_ASV_ENABLED
+static mali_bool mali_dvfs_table_update(void)
+{
+ unsigned int exynos_result_of_asv_group;
+ unsigned int i;
+ exynos_result_of_asv_group = exynos_result_of_asv & 0xf;
+ MALI_PRINT(("exynos_result_of_asv_group = 0x%x\n", exynos_result_of_asv_group));
+
+ if (ASV_LEVEL_SUPPORT) { //asv level information will be added.
+ for (i = 0; i < MALI_DVFS_STEPS; i++) {
+ mali_dvfs[i].vol = asv_3d_volt_5_table[exynos_result_of_asv_group][i];
+ MALI_PRINT(("mali_dvfs[%d].vol = %d\n", i, mali_dvfs[i].vol));
+ }
+ } else {
+ for (i = 0; i < MALI_DVFS_STEPS; i++) {
+ mali_dvfs[i].vol = asv_3d_volt_8_table[exynos_result_of_asv_group][i];
+ MALI_PRINT(("mali_dvfs[%d].vol = %d\n", i, mali_dvfs[i].vol));
+ }
+ }
+
+ return MALI_TRUE;
+
+}
+#endif
+
+static mali_bool mali_dvfs_status(u32 utilization)
+{
+ unsigned int nextStatus = 0;
+ unsigned int curStatus = 0;
+ mali_bool boostup = MALI_FALSE;
+#ifdef EXYNOS4_ASV_ENABLED
+ static mali_bool asv_applied = MALI_FALSE;
+#endif
+ static int stay_count = 0; // to prevent frequent switch
+
+ MALI_DEBUG_PRINT(1, ("> mali_dvfs_status: %d \n",utilization));
+#ifdef EXYNOS4_ASV_ENABLED
+ if (asv_applied == MALI_FALSE) {
+ mali_dvfs_table_update();
+ change_mali_dvfs_status(0,0);
+ asv_applied = MALI_TRUE;
+
+ return MALI_TRUE;
+ }
+#endif
+
+ /*decide next step*/
+ curStatus = get_mali_dvfs_status();
+ nextStatus = decideNextStatus(utilization);
+
+ MALI_DEBUG_PRINT(1, ("= curStatus %d, nextStatus %d, maliDvfsStatus.currentStep %d \n", curStatus, nextStatus, maliDvfsStatus.currentStep));
+
+ /*if next status is same with current status, don't change anything*/
+ if ((curStatus!=nextStatus && stay_count==0)) {
+ /*check if boost up or not*/
+ if (nextStatus > maliDvfsStatus.currentStep)
+ boostup = 1;
+
+ /*change mali dvfs status*/
+ if (!change_mali_dvfs_status(nextStatus,boostup)) {
+ MALI_DEBUG_PRINT(1, ("error on change_mali_dvfs_status \n"));
+ return MALI_FALSE;
+ }
+ stay_count = mali_dvfs_staycount[maliDvfsStatus.currentStep].staycount;
+ } else {
+ if (stay_count>0)
+ stay_count--;
+ }
+
+ return MALI_TRUE;
+}
+
+
+
+int mali_dvfs_is_running(void)
+{
+ return bMaliDvfsRun;
+}
+
+
+
+void mali_dvfs_late_resume(void)
+{
+ // set the init clock as low when resume
+ set_mali_dvfs_status(0,0);
+}
+
+
+static void mali_dvfs_work_handler(struct work_struct *w)
+{
+ bMaliDvfsRun=1;
+
+ MALI_DEBUG_PRINT(3, ("=== mali_dvfs_work_handler\n"));
+
+ if (!mali_dvfs_status(mali_dvfs_utilization))
+ MALI_DEBUG_PRINT(1,( "error on mali dvfs status in mali_dvfs_work_handler"));
+
+ bMaliDvfsRun=0;
+}
+
+
+mali_bool init_mali_dvfs_status(int step)
+{
+ /*default status
+ add here with the right function to get initilization value.
+ */
+ if (!mali_dvfs_wq)
+ mali_dvfs_wq = create_singlethread_workqueue("mali_dvfs");
+
+#if MALI_GPU_BOTTOM_LOCK
+ _mali_osk_atomic_init(&bottomlock_status, 0);
+#endif
+
+ /*add a error handling here*/
+ maliDvfsStatus.currentStep = step;
+
+ return MALI_TRUE;
+}
+
+void deinit_mali_dvfs_status(void)
+{
+#if MALI_GPU_BOTTOM_LOCK
+ _mali_osk_atomic_term(&bottomlock_status);
+#endif
+
+ if (mali_dvfs_wq)
+ destroy_workqueue(mali_dvfs_wq);
+ mali_dvfs_wq = NULL;
+}
+
+mali_bool mali_dvfs_handler(u32 utilization)
+{
+ mali_dvfs_utilization = utilization;
+ queue_work_on(0, mali_dvfs_wq,&mali_dvfs_work);
+
+ /*add error handle here*/
+ return MALI_TRUE;
+}
+
+void mali_default_step_set(int step, mali_bool boostup)
+{
+ mali_clk_set_rate(mali_dvfs[step].clock, mali_dvfs[step].freq);
+
+ if (maliDvfsStatus.currentStep == 1)
+ set_mali_dvfs_status(step, boostup);
+}
+
+#if MALI_GPU_BOTTOM_LOCK
+int mali_dvfs_bottom_lock_push(void)
+{
+ int prev_status = _mali_osk_atomic_read(&bottomlock_status);
+
+ if (prev_status < 0) {
+ MALI_PRINT(("gpu bottom lock status is not valid for push"));
+ return -1;
+ }
+
+ if (prev_status == 0) {
+ mali_regulator_set_voltage(mali_dvfs[1].vol, mali_dvfs[1].vol);
+ mali_clk_set_rate(mali_dvfs[1].clock, mali_dvfs[1].freq);
+ set_mali_dvfs_current_step(1);
+ }
+
+ return _mali_osk_atomic_inc_return(&bottomlock_status);
+}
+
+int mali_dvfs_bottom_lock_pop(void)
+{
+ if (_mali_osk_atomic_read(&bottomlock_status) <= 0) {
+ MALI_PRINT(("gpu bottom lock status is not valid for pop"));
+ return -1;
+ }
+
+ return _mali_osk_atomic_dec_return(&bottomlock_status);
+}
+#endif
diff --git a/drivers/motor/max8997_vibrator.c b/drivers/motor/max8997_vibrator.c
index c34716b..c3b07f8 100644
--- a/drivers/motor/max8997_vibrator.c
+++ b/drivers/motor/max8997_vibrator.c
@@ -1,3 +1,16 @@
+/*
+ * haptic motor driver for max8997 - max8997_vibrator.c
+ *
+ * Copyright (C) 2011 Unknown Samsung Employees (Original file was missing copyright header)
+ * Copyright (C) 2012 The CyanogenMod Project
+ * Daniel Hillenbrand <codeworkx@cyanogenmod.com>
+ * Andrew Dodd <atd7@cornell.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/timed_output.h>
@@ -14,6 +27,12 @@
#include "mach/gpio.h"
#endif
+static int pwm_duty_max;
+static int pwm_duty_min;
+
+static unsigned long pwm_val = 50; /* duty in percent */
+static int pwm_duty; /* duty value */
+
struct vibrator_drvdata {
struct max8997_motor_data *pdata;
struct pwm_device *pwm;
@@ -28,7 +47,7 @@ struct vibrator_drvdata {
};
#ifdef CONFIG_VIBETONZ
-struct vibrator_drvdata *g_data;
+static struct vibrator_drvdata *g_data;
#endif
static int vibetonz_clk_on(struct device *dev, bool en)
@@ -89,7 +108,7 @@ static void vibrator_work(struct work_struct *_work)
struct vibrator_drvdata *data =
container_of(_work, struct vibrator_drvdata, work);
- printk(KERN_DEBUG "[VIB] time = %dms\n", data->timeout);
+ pr_debug("[VIB] time = %dms\n", data->timeout);
if (0 == data->timeout) {
if (!data->running)
@@ -110,8 +129,8 @@ static void vibrator_work(struct work_struct *_work)
else
regulator_enable(data->regulator);
i2c_max8997_hapticmotor(data, true);
- pwm_config(data->pwm,
- data->pdata->duty, data->pdata->period);
+ pwm_config(data->pwm, pwm_duty, data->pdata->period);
+ pr_info("[VIB] %s: pwm_config duty=%d\n", __func__, pwm_duty);
pwm_enable(data->pwm);
data->running = true;
@@ -189,7 +208,6 @@ void vibtonz_pwm(int nForce)
/* add to avoid the glitch issue */
static int prev_duty;
int pwm_period = data->pdata->period;
- int pwm_duty = pwm_period/2 + ((pwm_period/2 - 2) * nForce)/127;
#if defined(CONFIG_MACH_P4)
if (pwm_duty > data->pdata->duty)
@@ -201,12 +219,70 @@ void vibtonz_pwm(int nForce)
/* add to avoid the glitch issue */
if (prev_duty != pwm_duty) {
prev_duty = pwm_duty;
+ pr_debug("[VIB] %s: setting pwm_duty=%d", __func__, pwm_duty);
pwm_config(data->pwm, pwm_duty, pwm_period);
}
}
EXPORT_SYMBOL(vibtonz_pwm);
+
+static ssize_t pwm_val_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ int count;
+
+ pwm_val = ((pwm_duty - pwm_duty_min) * 100) / pwm_duty_min;
+
+ count = sprintf(buf, "%lu\n", pwm_val);
+ pr_debug("[VIB] pwm_val: %lu\n", pwm_val);
+
+ return count;
+}
+
+ssize_t pwm_val_store(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf, size_t size)
+{
+ if (kstrtoul(buf, 0, &pwm_val))
+ pr_err("[VIB] %s: error on storing pwm_val\n", __func__);
+
+ pr_info("[VIB] %s: pwm_val=%lu\n", __func__, pwm_val);
+
+ pwm_duty = (pwm_val * pwm_duty_min) / 100 + pwm_duty_min;
+
+ /* make sure new pwm duty is in range */
+ if(pwm_duty > pwm_duty_max) {
+ pwm_duty = pwm_duty_max;
+ }
+ else if (pwm_duty < pwm_duty_min) {
+ pwm_duty = pwm_duty_min;
+ }
+
+ pr_info("[VIB] %s: pwm_duty=%d\n", __func__, pwm_duty);
+
+ return size;
+}
+static DEVICE_ATTR(pwm_val, S_IRUGO | S_IWUSR,
+ pwm_val_show, pwm_val_store);
#endif
+static int create_vibrator_sysfs(void)
+{
+ int ret;
+ struct kobject *vibrator_kobj;
+ vibrator_kobj = kobject_create_and_add("vibrator", NULL);
+ if (unlikely(!vibrator_kobj))
+ return -ENOMEM;
+
+ ret = sysfs_create_file(vibrator_kobj,
+ &dev_attr_pwm_val.attr);
+ if (unlikely(ret < 0)) {
+ pr_err("[VIB] sysfs_create_file failed: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
static int __devinit vibrator_probe(struct platform_device *pdev)
{
struct max8997_dev *max8997 = dev_get_drvdata(pdev->dev.parent);
@@ -247,6 +323,8 @@ static int __devinit vibrator_probe(struct platform_device *pdev)
INIT_WORK(&ddata->work, vibrator_work);
spin_lock_init(&ddata->lock);
+ create_vibrator_sysfs();
+
ddata->pwm = pwm_request(pdata->pwm_id, "vibrator");
if (IS_ERR(ddata->pwm)) {
pr_err("[VIB] Failed to request pwm.\n");
@@ -267,6 +345,9 @@ static int __devinit vibrator_probe(struct platform_device *pdev)
#ifdef CONFIG_VIBETONZ
g_data = ddata;
+ pwm_duty_max = g_data->pdata->duty;
+ pwm_duty_min = pwm_duty_max/2;
+ pwm_duty = (pwm_duty_min + pwm_duty_max)/2;
#endif
return 0;
diff --git a/drivers/video/samsung/mdnie_table_u1.h b/drivers/video/samsung/mdnie_table_u1.h
index 71366c0..1cea4a5 100644
--- a/drivers/video/samsung/mdnie_table_u1.h
+++ b/drivers/video/samsung/mdnie_table_u1.h
@@ -4,6 +4,23 @@
#include "mdnie.h"
+static const unsigned short tune_cyanogenmod[] = {
+ /*start */
+ 0x0001, 0x0000, /* */
+ 0x002c, 0x0fff, /*DNR bypass 0x003C */
+ 0x002d, 0x1900, /*DNR bypass 0x0a08 */
+ 0x002e, 0x0000, /*DNR bypass 0x1010 */
+ 0x002f, 0x0fff, /*DNR bypass 0x0400 */
+ 0x003A, 0x0009, /*HDTR (DE off)(CS only 9) */
+ 0x003B, 0x0000, /*DE SHARPNESS */
+ 0x003C, 0x0000, /*NOISE LEVEL */
+ 0x003F, 0x0000, /*CS GAIN */
+ 0x0042, 0x003f, /*DE TH (MAX DIFF) */
+ 0x0028, 0x0000, /*Register Mask */
+ /*end */
+ END_SEQ, 0x0000,
+};
+
static const unsigned short tune_dynamic_gallery[] = {
/*start U1 dynamic gallery */
0x0001, 0x0041, /*SCR + PCC */