mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
DLKM: Improve ili9881h touch driver
- Remove some unnecessary log. Change-Id: Ie4c81d139f1fb56e04ebd5d01a7bf1b6dfaae6e6 Signed-off-by: wengjun1 <wengjun1@motorola.com> Reviewed-on: https://gerrit.mot.com/1257181 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
1d6836e78e
commit
e99e842bcf
7 changed files with 41 additions and 40 deletions
|
|
@ -132,6 +132,7 @@ enum {
|
|||
DEBUG_NETLINK = BIT(8),
|
||||
DEBUG_PARSER = BIT(9),
|
||||
DEBUG_GESTURE = BIT(10),
|
||||
DEBUG_BOOT = BIT(11),
|
||||
DEBUG_ALL = ~0,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -834,15 +834,15 @@ int core_config_get_tp_info(void)
|
|||
|
||||
core_config->tp_info->nMaxKeyButtonNum = 5;
|
||||
|
||||
ipio_info("minX = %d, minY = %d, maxX = %d, maxY = %d\n",
|
||||
ipio_debug(DEBUG_BOOT,"minX = %d, minY = %d, maxX = %d, maxY = %d\n",
|
||||
core_config->tp_info->nMinX, core_config->tp_info->nMinY,
|
||||
core_config->tp_info->nMaxX, core_config->tp_info->nMaxY);
|
||||
ipio_info("xchannel = %d, ychannel = %d, self_tx = %d, self_rx = %d\n",
|
||||
ipio_debug(DEBUG_BOOT,"xchannel = %d, ychannel = %d, self_tx = %d, self_rx = %d\n",
|
||||
core_config->tp_info->nXChannelNum,
|
||||
core_config->tp_info->nYChannelNum,
|
||||
core_config->tp_info->self_tx_channel_num,
|
||||
core_config->tp_info->self_rx_channel_num);
|
||||
ipio_info("side_touch_type = %d, max_touch_num= %d, touch_key_num = %d, max_key_num = %d\n",
|
||||
ipio_debug(DEBUG_BOOT,"side_touch_type = %d, max_touch_num= %d, touch_key_num = %d, max_key_num = %d\n",
|
||||
core_config->tp_info->side_touch_type,
|
||||
core_config->tp_info->nMaxTouchNum,
|
||||
core_config->tp_info->nKeyCount,
|
||||
|
|
@ -893,7 +893,7 @@ int core_config_get_protocol_ver(void)
|
|||
for (; i < protocol->pro_ver_len - 1; i++)
|
||||
core_config->protocol_ver[i] = g_read_buf[i + 1];
|
||||
|
||||
ipio_info("Procotol Version = %d.%d.%d\n",
|
||||
ipio_debug(DEBUG_BOOT,"Procotol Version = %d.%d.%d\n",
|
||||
core_config->protocol_ver[0], core_config->protocol_ver[1],
|
||||
core_config->protocol_ver[2]);
|
||||
|
||||
|
|
@ -953,7 +953,7 @@ int core_config_get_core_ver(void)
|
|||
core_config->core_ver[i] = g_read_buf[i + 1];
|
||||
|
||||
/* in protocol v5, ignore the first btye because of a header. */
|
||||
ipio_info("Core Version = %d.%d.%d.%d\n",
|
||||
ipio_debug(DEBUG_BOOT,"Core Version = %d.%d.%d.%d\n",
|
||||
core_config->core_ver[1], core_config->core_ver[2],
|
||||
core_config->core_ver[3], core_config->core_ver[4]);
|
||||
|
||||
|
|
@ -1003,11 +1003,11 @@ int core_config_get_fw_ver(void)
|
|||
core_config->firmware_ver[i] = g_read_buf[i];
|
||||
|
||||
if (protocol->mid >= 0x3) {
|
||||
ipio_info("Firmware Version = %d.%d.%d.%d\n",
|
||||
ipio_debug(DEBUG_BOOT,"Firmware Version = %d.%d.%d.%d\n",
|
||||
core_config->firmware_ver[1], core_config->firmware_ver[2],
|
||||
core_config->firmware_ver[3], core_config->firmware_ver[4]);
|
||||
} else {
|
||||
ipio_info("Firmware Version = %d.%d.%d\n",
|
||||
ipio_debug(DEBUG_BOOT,"Firmware Version = %d.%d.%d\n",
|
||||
core_config->firmware_ver[1],
|
||||
core_config->firmware_ver[2],
|
||||
core_config->firmware_ver[3]);
|
||||
|
|
|
|||
|
|
@ -498,7 +498,7 @@ static int tddi_read_flash(uint32_t start, uint32_t end, uint8_t *data, int dlen
|
|||
core_config_ice_mode_write(0x041008, 0xFF, 1); /* Dummy */
|
||||
|
||||
data[cont] = core_config_read_write_onebyte(0x41010);
|
||||
ipio_info("data[%d] = %x\n", cont, data[cont]);
|
||||
ipio_debug(DEBUG_BOOT,"data[%d] = %x\n", cont, data[cont]);
|
||||
cont++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ void core_flash_init(uint16_t mid, uint16_t did)
|
|||
{
|
||||
int i = 0;
|
||||
|
||||
ipio_info("M_ID = %x, DEV_ID = %x", mid, did);
|
||||
ipio_debug(DEBUG_FIRMWARE,"M_ID = %x, DEV_ID = %x", mid, did);
|
||||
|
||||
flashtab = kzalloc(sizeof(ft), GFP_KERNEL);
|
||||
if (ERR_ALLOC_MEM(flashtab)) {
|
||||
|
|
@ -149,7 +149,7 @@ void core_flash_init(uint16_t mid, uint16_t did)
|
|||
|
||||
for (; i < ARRAY_SIZE(ft); i++) {
|
||||
if (mid == ft[i].mid && did == ft[i].dev_id) {
|
||||
ipio_info("Find them in flash table\n");
|
||||
ipio_debug(DEBUG_FIRMWARE,"Find them in flash table\n");
|
||||
|
||||
flashtab->mid = mid;
|
||||
flashtab->dev_id = did;
|
||||
|
|
@ -171,10 +171,10 @@ void core_flash_init(uint16_t mid, uint16_t did)
|
|||
flashtab->block = (64 * K);
|
||||
}
|
||||
|
||||
ipio_info("Max Memory size = %d\n", flashtab->mem_size);
|
||||
ipio_info("Per program page = %d\n", flashtab->program_page);
|
||||
ipio_info("Sector size = %d\n", flashtab->sector);
|
||||
ipio_info("Block size = %d\n", flashtab->block);
|
||||
ipio_debug(DEBUG_FIRMWARE,"Max Memory size = %d\n", flashtab->mem_size);
|
||||
ipio_debug(DEBUG_FIRMWARE,"Per program page = %d\n", flashtab->program_page);
|
||||
ipio_debug(DEBUG_FIRMWARE,"Sector size = %d\n", flashtab->sector);
|
||||
ipio_debug(DEBUG_FIRMWARE,"Block size = %d\n", flashtab->block);
|
||||
}
|
||||
EXPORT_SYMBOL(core_flash_init);
|
||||
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ void core_protocol_func_control(int key, int ctrl)
|
|||
struct DataItem *tmp = search_func(key);
|
||||
|
||||
if (tmp != NULL) {
|
||||
ipio_info("Found func's name: %s, key = %d\n", tmp->name, key);
|
||||
ipio_debug(DEBUG_BOOT,"Found func's name: %s, key = %d\n", tmp->name, key);
|
||||
|
||||
/* last element is used to control this func */
|
||||
if (tmp->key != 9) {
|
||||
|
|
@ -379,7 +379,7 @@ int core_protocol_update_ver(uint8_t major, uint8_t mid, uint8_t minor)
|
|||
protocol->major = major;
|
||||
protocol->mid = mid;
|
||||
protocol->minor = minor;
|
||||
ipio_info("protocol: major = %d, mid = %d, minor = %d\n",
|
||||
ipio_debug(DEBUG_CONFIG, "protocol: major = %d, mid = %d, minor = %d\n",
|
||||
protocol->major, protocol->mid, protocol->minor);
|
||||
|
||||
if (protocol->major == 0x5)
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ static int ilitek_platform_notifier_fb(struct notifier_block *self,
|
|||
int *blank;
|
||||
struct fb_event *evdata = data;
|
||||
|
||||
ipio_info("Notifier's event = %ld\n", event);
|
||||
ipio_debug(DEBUG_BOOT, "Notifier's event = %ld\n", event);
|
||||
|
||||
/*
|
||||
* FB_EVENT_BLANK(0x09): A hardware display blank change occurred.
|
||||
|
|
@ -250,7 +250,7 @@ static int ilitek_platform_notifier_fb(struct notifier_block *self,
|
|||
core_config_ic_suspend();
|
||||
} else if ((*blank == FB_BLANK_UNBLANK
|
||||
|| *blank == FB_BLANK_NORMAL) && event == FB_EVENT_BLANK){
|
||||
ipio_info("TP Resuem\n");
|
||||
ipio_info("TP Resume\n");
|
||||
|
||||
if (!core_firmware->isUpgrading)
|
||||
core_config_ic_resume();
|
||||
|
|
@ -328,7 +328,7 @@ static int ilitek_platform_reg_power_check(void)
|
|||
static int ilitek_platform_reg_suspend(void)
|
||||
{
|
||||
int res = 0;
|
||||
ipio_info("Register suspend/resume callback function\n");
|
||||
ipio_debug(DEBUG_BOOT,"Register suspend/resume callback function\n");
|
||||
#ifdef CONFIG_FB
|
||||
ipd->notifier_fb.notifier_call = ilitek_platform_notifier_fb;
|
||||
res = fb_register_client(&ipd->notifier_fb);
|
||||
|
|
@ -537,8 +537,8 @@ static int ilitek_platform_gpio(void)
|
|||
of_get_named_gpio_flags(dev_node, DTS_RESET_GPIO, 0, &flag);
|
||||
#endif /* CONFIG_OF */
|
||||
|
||||
ipio_info("GPIO INT: %d\n", ipd->int_gpio);
|
||||
ipio_info("GPIO RESET: %d\n", ipd->reset_gpio);
|
||||
ipio_debug(DEBUG_BOOT,"GPIO INT: %d\n", ipd->int_gpio);
|
||||
ipio_debug(DEBUG_BOOT,"GPIO RESET: %d\n", ipd->reset_gpio);
|
||||
|
||||
if (!gpio_is_valid(ipd->int_gpio)) {
|
||||
ipio_err("Invalid INT gpio: %d\n", ipd->int_gpio);
|
||||
|
|
@ -615,7 +615,7 @@ static void ilitek_platform_core_remove(void)
|
|||
*/
|
||||
static int ilitek_platform_core_init(void)
|
||||
{
|
||||
ipio_info("Initialise core's components\n");
|
||||
ipio_debug(DEBUG_BOOT,"Initialise core's components\n");
|
||||
|
||||
if (core_config_init() < 0 || core_protocol_init() < 0 ||
|
||||
core_firmware_init() < 0 || core_fr_init() < 0 ||
|
||||
|
|
@ -703,7 +703,7 @@ static int Ili_parse_dt(struct device *dev,
|
|||
return rc;
|
||||
}
|
||||
|
||||
ipio_err("pdata->TP_IC_TYPE = %s\n", pdata->TP_IC_TYPE);
|
||||
ipio_debug(DEBUG_BOOT,"pdata->TP_IC_TYPE = %s\n", pdata->TP_IC_TYPE);
|
||||
|
||||
prop = of_find_property(np, "ilitek,display-coords", NULL);
|
||||
if (!prop)
|
||||
|
|
@ -728,36 +728,36 @@ static int Ili_parse_dt(struct device *dev,
|
|||
pdata->x_max = coords[2];
|
||||
pdata->y_max = coords[3];
|
||||
|
||||
ipio_info("x_min = %d,y_min = %d,x_max = %d,y_max = %d,coords_size = %d\n ",
|
||||
ipio_debug(DEBUG_BOOT,"x_min = %d,y_min = %d,x_max = %d,y_max = %d,coords_size = %d\n ",
|
||||
ipd->x_min, ipd->y_min, ipd->x_max, ipd->y_max, coords_size);
|
||||
|
||||
pdata->MT_B_TYPE = of_property_read_bool(np,
|
||||
"ilitek,mt_b_type");
|
||||
if (pdata->MT_B_TYPE)
|
||||
ipio_info("pdata->MT_B_TYPE ture ");
|
||||
ipio_debug(DEBUG_BOOT,"pdata->MT_B_TYPE ture ");
|
||||
else
|
||||
ipio_info("pdata->MT_B_TYPE false ");
|
||||
ipio_debug(DEBUG_BOOT,"pdata->MT_B_TYPE false ");
|
||||
|
||||
pdata->REGULATOR_POWER_ON = of_property_read_bool(np,
|
||||
"ilitek,regulator_power_on");
|
||||
if (pdata->REGULATOR_POWER_ON)
|
||||
ipio_info("pdata->REGULATOR_POWER_ON ture ");
|
||||
ipio_debug(DEBUG_BOOT,"pdata->REGULATOR_POWER_ON ture ");
|
||||
else
|
||||
ipio_info("pdata->REGULATOR_POWER_ON false ");
|
||||
ipio_debug(DEBUG_BOOT,"pdata->REGULATOR_POWER_ON false ");
|
||||
|
||||
pdata->BATTERY_CHECK = of_property_read_bool(np,
|
||||
"ilitek,battery_check");
|
||||
if (pdata->BATTERY_CHECK)
|
||||
ipio_info("pdata->BATTERY_CHECK ture ");
|
||||
ipio_debug(DEBUG_BOOT,"pdata->BATTERY_CHECK ture ");
|
||||
else
|
||||
ipio_info("pdata->BATTERY_CHECK false ");
|
||||
ipio_debug(DEBUG_BOOT,"pdata->BATTERY_CHECK false ");
|
||||
|
||||
pdata->ENABLE_BATTERY_CHECK = of_property_read_bool(np,
|
||||
"ilitek,enable_battery_check");
|
||||
if (pdata->ENABLE_BATTERY_CHECK)
|
||||
ipio_info("pdata->ENABLE_BATTERY_CHECK ture ");
|
||||
ipio_debug(DEBUG_BOOT,"pdata->ENABLE_BATTERY_CHECK ture ");
|
||||
else
|
||||
ipio_info("pdata->ENABLE_BATTERY_CHECK false ");
|
||||
ipio_debug(DEBUG_BOOT,"pdata->ENABLE_BATTERY_CHECK false ");
|
||||
|
||||
if (of_property_read_bool(np, "ilitek,x_flip")) {
|
||||
pr_notice("using flipped X axis\n");
|
||||
|
|
@ -854,7 +854,7 @@ static int ilitek_platform_probe(struct spi_device *spi)
|
|||
}
|
||||
|
||||
/* Set i2c slave addr if it's not configured */
|
||||
ipio_info("I2C Slave address = 0x%x\n", client->addr);
|
||||
ipio_debug(DEBUG_BOOT,"I2C Slave address = 0x%x\n", client->addr);
|
||||
if (client->addr != ILI7807_SLAVE_ADDR
|
||||
|| client->addr != ILI9881_SLAVE_ADDR) {
|
||||
client->addr = ILI9881_SLAVE_ADDR;
|
||||
|
|
@ -884,9 +884,9 @@ static int ilitek_platform_probe(struct spi_device *spi)
|
|||
ipd->isEnablePollCheckPower = false;
|
||||
ipd->vpower_reg_nb = false;
|
||||
|
||||
ipio_info("Driver Version : %s\n", DRIVER_VERSION);
|
||||
ipio_info("Driver for Touch IC : %x\n", ipd->chip_id);
|
||||
ipio_info("Driver interface : %s\n",
|
||||
ipio_debug(DEBUG_BOOT,"Driver Version : %s\n", DRIVER_VERSION);
|
||||
ipio_debug(DEBUG_BOOT,"Driver for Touch IC : %x\n", ipd->chip_id);
|
||||
ipio_debug(DEBUG_BOOT,"Driver interface : %s\n",
|
||||
(INTERFACE == I2C_INTERFACE) ? "I2C" : "SPI");
|
||||
|
||||
/*
|
||||
|
|
@ -1116,7 +1116,7 @@ static int __init ilitek_platform_init(void)
|
|||
ipio_info("TP driver init\n");
|
||||
|
||||
#if (INTERFACE == I2C_INTERFACE)
|
||||
ipio_info("TP driver add i2c interface\n");
|
||||
ipio_debug(DEBUG_BOOT,"TP driver add i2c interface\n");
|
||||
res = i2c_add_driver(&tp_i2c_driver);
|
||||
if (res < 0) {
|
||||
ipio_err("Failed to add i2c driver\n");
|
||||
|
|
@ -1124,7 +1124,7 @@ static int __init ilitek_platform_init(void)
|
|||
return -ENODEV;
|
||||
}
|
||||
#else
|
||||
ipio_info("TP driver add spi interface\n");
|
||||
ipio_debug(DEBUG_BOOT,"TP driver add spi interface\n");
|
||||
res = spi_register_driver(&tp_spi_driver);
|
||||
if (res < 0) {
|
||||
ipio_err("Failed to add ilitek driver\n");
|
||||
|
|
|
|||
|
|
@ -1682,7 +1682,7 @@ static int netlink_init(void)
|
|||
_gNetLinkSkb = netlink_kernel_create(&init_net, NETLINK_USER, &cfg);
|
||||
#endif
|
||||
|
||||
ipio_info("Initialise Netlink and create its socket\n");
|
||||
ipio_debug(DEBUG_BOOT,"Initialise Netlink and create its socket\n");
|
||||
|
||||
if (!_gNetLinkSkb) {
|
||||
ipio_err("Failed to create nelink socket\n");
|
||||
|
|
@ -1717,7 +1717,7 @@ int ilitek_proc_init(void)
|
|||
res = -ENODEV;
|
||||
} else {
|
||||
proc_table[i].isCreated = true;
|
||||
ipio_info("Succeed to create %s under /proc\n",
|
||||
ipio_debug(DEBUG_BOOT,"Succeed to create %s under /proc\n",
|
||||
proc_table[i].name);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue