summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--touch/fst2/fts.c222
-rw-r--r--touch/fst2/fts.h17
-rw-r--r--touch/fst2/fts_lib/fts_flash.c362
-rw-r--r--touch/fst2/fts_lib/fts_io.c258
-rw-r--r--touch/fst2/fts_lib/fts_test.c440
-rw-r--r--touch/fst2/fts_proc.c156
-rw-r--r--touch/ftm5/fts.h6
7 files changed, 726 insertions, 735 deletions
diff --git a/touch/fst2/fts.c b/touch/fst2/fts.c
index 6ff920e..01e6b82 100644
--- a/touch/fst2/fts.c
+++ b/touch/fst2/fts.c
@@ -218,10 +218,10 @@ static int fts_mode_handler(struct fts_ts_info *info, int force)
disable_irq_wake(info->client->irq);
info->mode = SCAN_MODE_HIBERNATE;
- LOGI("%s: Mode Handler starting...\n", __func__);
+ pr_info("%s: Mode Handler starting...\n", __func__);
switch (info->resume_bit) {
case 0: /* screen down */
- LOGI("%s: Screen OFF...\n", __func__);
+ pr_info("%s: Screen OFF...\n", __func__);
/* do sense off in order to avoid the flooding of the fifo with
* touch events if someone is touching the panel during suspend
*/
@@ -233,7 +233,7 @@ static int fts_mode_handler(struct fts_ts_info *info, int force)
break;
case 1: /* screen up */
- LOGI("%s: Screen ON...\n", __func__);
+ pr_info("%s: Screen ON...\n", __func__);
data = SCAN_MODE_ACTIVE;
res = fts_write_fw_reg(SCAN_MODE_ADDR, &data, 1);
if (res == OK)
@@ -242,13 +242,13 @@ static int fts_mode_handler(struct fts_ts_info *info, int force)
break;
default:
- LOGE("%s: invalid resume_bit value = %d! ERROR %08X\n",
+ pr_err("%s: invalid resume_bit value = %d! ERROR %08X\n",
__func__, info->resume_bit, ERROR_OP_NOT_ALLOW);
res = ERROR_OP_NOT_ALLOW;
}
/*TODO : For all the gesture related modes */
- LOGI("%s: Mode Handler finished! res = %08X mode = %08X\n",
+ pr_info("%s: Mode Handler finished! res = %08X mode = %08X\n",
__func__, res, info->mode);
return res;
}
@@ -275,7 +275,7 @@ static irqreturn_t fts_interrupt_handler(int irq, void *handle)
error = fts_read_fw_reg(FIFO_READ_ADDR,
&info->evt_data[count * FIFO_EVENT_SIZE], FIFO_EVENT_SIZE);
if (error != OK) {
- LOGE("%s: Failed to read fifo event (error=%d)",
+ pr_err("%s: Failed to read fifo event (error=%d)",
__func__, error);
break;
}
@@ -290,7 +290,7 @@ static irqreturn_t fts_interrupt_handler(int irq, void *handle)
if (evt_data[0] == EVT_ID_NOEVENT)
goto exit;
if (total_events == MAX_FIFO_EVENT)
- LOGI("%s: Warnning: total_events = MAX_FIFO_EVENT(%d)",
+ pr_info("%s: Warnning: total_events = MAX_FIFO_EVENT(%d)",
__func__, MAX_FIFO_EVENT);
/*
* Parsing all the events ID and specifically handle the
@@ -380,7 +380,7 @@ static irqreturn_t fts_isr(int irq, void *handle)
static void fts_nop_event_handler(struct fts_ts_info *info,
unsigned char *event)
{
- LOGI("%s: Doing nothing for event = %02X %02X %02X %02X %02X %02X %02X %02X\n",
+ pr_info("%s: Doing nothing for event = %02X %02X %02X %02X %02X %02X %02X %02X\n",
__func__, event[0], event[1], event[2], event[3],
event[4], event[5], event[6], event[7]);
}
@@ -429,14 +429,14 @@ static void fts_enter_pointer_event_handler(struct fts_ts_info *info, unsigned
case TOUCH_TYPE_FINGER:
case TOUCH_TYPE_GLOVE:
case TOUCH_TYPE_LARGE:
- LOGD("%s: touch type = %d!\n", __func__, touch_type);
+ pr_debug("%s: touch type = %d!\n", __func__, touch_type);
tool = MT_TOOL_FINGER;
touch_condition = 1;
__set_bit(touch_id, &info->touch_id);
break;
case TOUCH_TYPE_FINGER_HOVER:
- LOGD("%s: touch type = %d!\n", __func__, touch_type);
+ pr_debug("%s: touch type = %d!\n", __func__, touch_type);
tool = MT_TOOL_FINGER;
touch_condition = 0; /* need to hover */
z = 0; /* no pressure */
@@ -446,7 +446,7 @@ static void fts_enter_pointer_event_handler(struct fts_ts_info *info, unsigned
break;
default:
- LOGE("%s: Invalid touch type = %d! No Report...\n",
+ pr_err("%s: Invalid touch type = %d! No Report...\n",
__func__, touch_type);
goto no_report;
}
@@ -503,12 +503,12 @@ static void fts_leave_pointer_event_handler(struct fts_ts_info *info, unsigned
case TOUCH_TYPE_GLOVE:
case TOUCH_TYPE_LARGE:
case TOUCH_TYPE_FINGER_HOVER:
- LOGD("%s: touch type = %d!\n", __func__, touch_type);
+ pr_debug("%s: touch type = %d!\n", __func__, touch_type);
tool = MT_TOOL_FINGER;
__clear_bit(touch_id, &info->touch_id);
break;
default:
- LOGE("%s: Invalid touch type = %d! No Report...\n",
+ pr_err("%s: Invalid touch type = %d! No Report...\n",
__func__, touch_type);
return;
}
@@ -546,7 +546,7 @@ int fts_system_reset(struct fts_ts_info *info, int poll_event)
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE, SYS_RST_ADDR,
&data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
} else {
@@ -560,7 +560,7 @@ int fts_system_reset(struct fts_ts_info *info, int poll_event)
res = poll_for_event(&event_to_search, 1, read_data,
TIMEOUT_GENERAL);
if (res < OK)
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
} else
msleep(100);
@@ -568,21 +568,21 @@ int fts_system_reset(struct fts_ts_info *info, int poll_event)
res = fts_write_read_u8ux(FTS_CMD_HW_REG_R, HW_ADDR_SIZE,
FLASH_CTRL_ADDR, &data, 1, DUMMY_BYTE);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
data |= 0x80;
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE,
FLASH_CTRL_ADDR, &data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
#endif
res = fts_write_fw_reg(add, &int_data, 1);
if (res < OK)
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE)
if (info->gti)
@@ -606,7 +606,7 @@ static void fts_error_event_handler(struct fts_ts_info *info, unsigned
{
int error = 0;
- LOGW("%s: Received event %02X %02X %02X %02X %02X %02X %02X %02X\n",
+ pr_warn("%s: Received event %02X %02X %02X %02X %02X %02X %02X %02X\n",
__func__, event[0], event[1], event[2], event[3], event[4],
event[5], event[6], event[7]);
@@ -631,7 +631,7 @@ static void fts_error_event_handler(struct fts_ts_info *info, unsigned
error |= fts_mode_handler(info, 0);
error |= fts_set_interrupt(info, true);
if (error < OK)
- LOGE("%s: Cannot reset the device ERROR %08X\n",
+ pr_err("%s: Cannot reset the device ERROR %08X\n",
__func__, error);
}
break;
@@ -648,7 +648,7 @@ static void fts_controller_ready_event_handler(struct fts_ts_info *info,
{
int error;
- LOGI("%s: controller event %02X %02X %02X %02X %02X %02X %02X %02X\n",
+ pr_info("%s: controller event %02X %02X %02X %02X %02X %02X %02X %02X\n",
__func__, event[0], event[1], event[2], event[3], event[4],
event[5], event[6], event[7]);
#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE)
@@ -660,7 +660,7 @@ static void fts_controller_ready_event_handler(struct fts_ts_info *info,
set_system_reseted_down(1);
error = fts_mode_handler(info, 0);
if (error < OK)
- LOGE("%s: Cannot restore the device status ERROR %08X\n",
+ pr_err("%s: Cannot restore the device status ERROR %08X\n",
__func__, error);
}
@@ -668,13 +668,13 @@ static void fts_controller_ready_event_handler(struct fts_ts_info *info,
do { \
u8 type = evt_ptr[1]; \
if (force) \
- LOGI("%s: %s =" \
+ pr_info("%s: %s =" \
" %02X %02X %02X %02X %02X %02X\n", \
__func__, event_type_str[type], \
evt_ptr[2], evt_ptr[3], evt_ptr[4], \
evt_ptr[5], evt_ptr[6], evt_ptr[7]); \
else \
- LOGD("%s: %s =" \
+ pr_debug("%s: %s =" \
" %02X %02X %02X %02X %02X %02X\n", \
__func__, event_type_str[type], \
evt_ptr[2], evt_ptr[3], evt_ptr[4], \
@@ -685,13 +685,13 @@ do { \
do { \
u8 type = evt_ptr[1]; \
if (force) \
- LOGI("%s: %s - %s =" \
+ pr_info("%s: %s - %s =" \
" %02X %02X %02X %02X %02X %02X\n", \
__func__, event_type_str[type], sub_str, \
evt_ptr[2], evt_ptr[3], evt_ptr[4], \
evt_ptr[5], evt_ptr[6], evt_ptr[7]); \
else \
- LOGD("%s: %s - %s =" \
+ pr_debug("%s: %s - %s =" \
" %02X %02X %02X %02X %02X %02X\n", \
__func__, event_type_str[type], sub_str, \
evt_ptr[2], evt_ptr[3], evt_ptr[4], \
@@ -771,7 +771,7 @@ static void fts_status_event_handler(struct fts_ts_info *info, u8 *event)
if (noise_level != event[2] || scanning_frequency != event[3]) {
log_status_event2(1, "changed", event);
- LOGI("%s: level:[%02X->%02X],freq:[%02X->%02X]\n",
+ pr_info("%s: level:[%02X->%02X],freq:[%02X->%02X]\n",
__func__, noise_level, event[2],
scanning_frequency, event[3]);
noise_level = event[2];
@@ -835,7 +835,7 @@ static void fts_status_event_handler(struct fts_ts_info *info, u8 *event)
break;
default:
- LOGE("%s: Unknown status event (%02X) ="
+ pr_err("%s: Unknown status event (%02X) ="
" %02X %02X %02X %02X %02X %02X\n",
__func__, event[1], event[2], event[3],
event[4], event[5], event[6], event[7]);
@@ -932,7 +932,7 @@ static int fts_interrupt_install(struct fts_ts_info *info)
info->event_dispatch_table = kzalloc(sizeof(event_dispatch_handler_t) *
NUM_EVT_ID, GFP_KERNEL);
if (!info->event_dispatch_table) {
- LOGE("%s: OOM allocating event dispatch table\n", __func__);
+ pr_err("%s: OOM allocating event dispatch table\n", __func__);
return -ENOMEM;
}
@@ -953,7 +953,7 @@ static int fts_interrupt_install(struct fts_ts_info *info)
error = fts_set_interrupt(info, false);
if (error) return error;
- LOGI("%s: Interrupt Mode\n", __func__);
+ pr_info("%s: Interrupt Mode\n", __func__);
#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE)
if (goog_request_threaded_irq(info->gti, info->client->irq, fts_isr,
#else
@@ -961,7 +961,7 @@ static int fts_interrupt_install(struct fts_ts_info *info)
#endif
fts_interrupt_handler, IRQF_ONESHOT | IRQF_TRIGGER_LOW,
FTS_TS_DRV_NAME, info)) {
- LOGE("%s: Request irq failed\n", __func__);
+ pr_err("%s: Request irq failed\n", __func__);
kfree(info->event_dispatch_table);
error = -EBUSY;
}
@@ -992,14 +992,14 @@ static int gti_default_handler(void *private_data, enum gti_cmd_type cmd_type,
cmd->grip_cmd.setting = (grip_enabled) ?
GTI_GRIP_ENABLE : GTI_GRIP_DISABLE;
res = 0;
- LOGI("grip %s.\n", (grip_enabled) ? "enable" : "disable");
+ pr_info("grip %s.\n", (grip_enabled) ? "enable" : "disable");
break;
case GTI_CMD_GET_PALM_MODE:
cmd->palm_cmd.setting = (palm_enabled) ?
GTI_PALM_ENABLE : GTI_PALM_DISABLE;
res = 0;
- LOGI("palm %s.\n", (palm_enabled) ? "enable" : "disable");
+ pr_info("palm %s.\n", (palm_enabled) ? "enable" : "disable");
break;
case GTI_CMD_NOTIFY_DISPLAY_STATE:
@@ -1018,7 +1018,7 @@ static int gti_default_handler(void *private_data, enum gti_cmd_type cmd_type,
if (fts_write(spi_buf, sizeof(spi_buf)))
res = -EIO;
- LOGD("%s continuous report %s.\n",
+ pr_debug("%s continuous report %s.\n",
(spi_buf[4] == CONTINUOUS_ENABLE) ? "Enable" : "Disable",
!res ? "successfully" : "unsuccessfully");
}
@@ -1037,7 +1037,7 @@ static int gti_default_handler(void *private_data, enum gti_cmd_type cmd_type,
else
grip_enabled = spi_buf[4] == GRIP_ENABLE ? true : false;
- LOGI("%s FW grip %s, status(%d).\n",
+ pr_info("%s FW grip %s, status(%d).\n",
(spi_buf[4] == GRIP_ENABLE) ? "Enable" : "Disable",
!res ? "successfully" : "unsuccessfully",
grip_enabled);
@@ -1057,7 +1057,7 @@ static int gti_default_handler(void *private_data, enum gti_cmd_type cmd_type,
else
palm_enabled = spi_buf[4] == PALM_ENABLE ? true : false;
- LOGI("%s FW palm %s, status(%d).\n",
+ pr_info("%s FW palm %s, status(%d).\n",
(spi_buf[4] == PALM_ENABLE) ? "Enable" : "Disable",
!res ? "successfully" : "unsuccessfully",
palm_enabled);
@@ -1108,15 +1108,15 @@ int goog_get_ms_frame(struct fts_ts_info *info, ms_frame_type_t type)
offset = system_info.u16_ms_scr_baseline_addr;
break;
default:
- LOGE("%s: Invalid MS type %d\n", __func__, type);
+ pr_err("%s: Invalid MS type %d\n", __func__, type);
return -EINVAL;
}
- LOGD("%s: type = %d Offset = 0x%04X\n", __func__, type, offset);
+ pr_debug("%s: type = %d Offset = 0x%04X\n", __func__, type, offset);
res = get_frame_data(offset, info->mutual_data_size, info->fw_ms_data);
if (res < OK) {
- LOGE("%s: error while reading sense data ERROR %08X\n",
+ pr_err("%s: error while reading sense data ERROR %08X\n",
__func__, res);
return -EIO;
}
@@ -1124,7 +1124,7 @@ int goog_get_ms_frame(struct fts_ts_info *info, ms_frame_type_t type)
/* if you want to access one node i,j,
* compute the offset like: offset = i*columns + j = > frame[i, j] */
- LOGD("%s: Frame acquired!\n", __func__);
+ pr_debug("%s: Frame acquired!\n", __func__);
return res;
/* return the number of data put inside frame */
@@ -1154,7 +1154,7 @@ int goog_get_ss_frame(struct fts_ts_info *info, ss_frame_type_t type)
if (force_len == 0x00 || sense_len == 0x00 ||
force_len == 0xFF || sense_len == 0xFF) {
- LOGE("%s: number of channels not initialized\n", __func__);
+ pr_err("%s: number of channels not initialized\n", __func__);
return -EINVAL;
}
@@ -1200,11 +1200,11 @@ int goog_get_ss_frame(struct fts_ts_info *info, ss_frame_type_t type)
tmp_sense_len = (self_sense_offset == 0) ? 0 : sense_len;
break;
default:
- LOGE("%s: Invalid SS type = %d\n", __func__, type);
+ pr_err("%s: Invalid SS type = %d\n", __func__, type);
return -EINVAL;
}
- LOGD("%s: type = %d Force_len = %d Sense_len = %d"
+ pr_debug("%s: type = %d Force_len = %d Sense_len = %d"
" Offset_force = 0x%04X Offset_sense = 0x%04X\n",
__func__, type, tmp_force_len, tmp_sense_len,
self_force_offset, self_sense_offset);
@@ -1214,7 +1214,7 @@ int goog_get_ss_frame(struct fts_ts_info *info, ss_frame_type_t type)
res = get_frame_data(self_force_offset,
tmp_force_len * BYTES_PER_NODE, ss_ptr);
if (res < OK) {
- LOGE("%s: error while reading force data ERROR %08X\n",
+ pr_err("%s: error while reading force data ERROR %08X\n",
__func__, res);
return -EIO;
}
@@ -1225,13 +1225,13 @@ int goog_get_ss_frame(struct fts_ts_info *info, ss_frame_type_t type)
res = get_frame_data(self_sense_offset,
tmp_sense_len * BYTES_PER_NODE, ss_ptr);
if (res < OK) {
- LOGE("%s: error while reading sense data ERROR %08X\n",
+ pr_err("%s: error while reading sense data ERROR %08X\n",
__func__, res);
return -EIO;
}
}
- LOGD("%s: Frame acquired!\n", __func__);
+ pr_debug("%s: Frame acquired!\n", __func__);
return res;
}
@@ -1240,7 +1240,7 @@ static int get_fw_version(void *private_data, struct gti_fw_version_cmd *cmd)
int cmd_buf_size = sizeof(cmd->buffer);
ssize_t buf_idx = 0;
- LOGI("%s\n", __func__);
+ pr_info("%s\n", __func__);
buf_idx += scnprintf(cmd->buffer + buf_idx, cmd_buf_size - buf_idx,
"\nREG Revision: 0x%04X\n", system_info.u16_reg_ver);
buf_idx += scnprintf(cmd->buffer + buf_idx, cmd_buf_size - buf_idx,
@@ -1272,13 +1272,13 @@ static int get_mutual_sensor_data(void *private_data, struct gti_sensor_data_cmd
else if (cmd->type & TOUCH_DATA_TYPE_RAW)
cmd_type = MS_RAW;
else {
- LOGE("%s: Invalid command type(0x%X).\n", __func__, cmd->type);
+ pr_err("%s: Invalid command type(0x%X).\n", __func__, cmd->type);
return -EINVAL;
}
res = goog_get_ms_frame(info, cmd_type);
if (res < 0) {
- LOGE("%s: failed with res=0x%08X.\n", __func__, res);
+ pr_err("%s: failed with res=0x%08X.\n", __func__, res);
return res;
}
@@ -1310,13 +1310,13 @@ static int get_self_sensor_data(void *private_data, struct gti_sensor_data_cmd *
else if (cmd->type & TOUCH_DATA_TYPE_RAW)
cmd_type = SS_RAW;
else {
- LOGE("%s: Invalid command type(0x%X).\n", __func__, cmd->type);
+ pr_err("%s: Invalid command type(0x%X).\n", __func__, cmd->type);
return -EINVAL;
}
res = goog_get_ss_frame(info, cmd_type);
if (res < 0) {
- LOGE("%s: failed with res=0x%08X.\n", __func__, res);
+ pr_err("%s: failed with res=0x%08X.\n", __func__, res);
return res;
}
cmd->buffer = (u8 *)info->self_data;
@@ -1333,7 +1333,7 @@ static int get_self_sensor_data(void *private_data, struct gti_sensor_data_cmd *
static void fts_resume(struct fts_ts_info *info)
{
if (!info->sensor_sleep) return;
- LOGI("%s\n", __func__);
+ pr_info("%s\n", __func__);
pm_stay_awake(info->dev);
fts_pinctrl_setup(info, true);
@@ -1351,7 +1351,7 @@ static void fts_resume(struct fts_ts_info *info)
static void fts_suspend(struct fts_ts_info *info)
{
if (info->sensor_sleep) return;
- LOGI("%s\n", __func__);
+ pr_info("%s\n", __func__);
info->sensor_sleep = true;
fts_set_interrupt(info, false);
@@ -1381,17 +1381,17 @@ static int fts_init_sensing(struct fts_ts_info *info)
int res = 0;
error |= fts_interrupt_install(info);
- LOGI("%s: Sensing on..\n", __func__);
+ pr_info("%s: Sensing on..\n", __func__);
error |= fts_mode_handler(info, 0);
error |= fts_set_interrupt(info, true); /* enable the interrupt */
res = fts_write_fw_reg(add, &int_data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
}
if (error < OK)
- LOGE("%s: Init error (ERROR = %08X)\n", __func__, error);
+ pr_err("%s: Init error (ERROR = %08X)\n", __func__, error);
return error;
@@ -1416,24 +1416,24 @@ static int fts_chip_init(struct fts_ts_info *info)
force_burn.panel_init = 0;
for (; i < FLASH_MAX_SECTIONS; i++)
force_burn.section_update[i] = 0;
- LOGI("%s: [1]: FW UPDATE..\n", __func__);
+ pr_info("%s: [1]: FW UPDATE..\n", __func__);
res = flash_update(info, &force_burn);
if (res != OK) {
- LOGE("%s: [1]: FW UPDATE FAILED.. res = %d\n", __func__, res);
+ pr_err("%s: [1]: FW UPDATE FAILED.. res = %d\n", __func__, res);
return res;
}
if (force_burn.panel_init) {
- LOGI("%s: [2]: MP TEST..\n", __func__);
+ pr_info("%s: [2]: MP TEST..\n", __func__);
res = fts_production_test_main(info, LIMITS_FILE, 0, &tests, 0);
if (res != OK)
- LOGE("%s: [2]: MP TEST FAILED.. res = %d\n",
+ pr_err("%s: [2]: MP TEST FAILED.. res = %d\n",
__func__, res);
}
- LOGI("%s: [3]: TOUCH INIT..\n", __func__);
+ pr_info("%s: [3]: TOUCH INIT..\n", __func__);
res = fts_init_sensing(info);
if (res != OK) {
- LOGE("%s: [3]: TOUCH INIT FAILED.. res = %d\n", __func__, res);
+ pr_err("%s: [3]: TOUCH INIT FAILED.. res = %d\n", __func__, res);
return res;
}
@@ -1475,10 +1475,10 @@ static int fts_init(struct fts_ts_info *info)
init_test_to_do();
#ifndef I2C_INTERFACE
#ifdef SPI4_WIRE
- LOGI("%s: Configuring SPI4..\n", __func__);
+ pr_info("%s: Configuring SPI4..\n", __func__);
res = configure_spi4();
if (res < OK) {
- LOGE("%s: Error configuring IC in spi4 mode: %08X\n",
+ pr_err("%s: Error configuring IC in spi4 mode: %08X\n",
__func__, res);
return res;
}
@@ -1488,13 +1488,13 @@ static int fts_init(struct fts_ts_info *info)
res = fts_write_read_u8ux(FTS_CMD_HW_REG_R, HW_ADDR_SIZE,
CHIP_ID_ADDRESS, data, 2, DUMMY_BYTE);
if (res < OK) {
- LOGE("%s: Bus Connection issue: %08X\n", __func__, res);
+ pr_err("%s: Bus Connection issue: %08X\n", __func__, res);
return res;
}
chip_id = (u16)((data[0] << 8) + data[1]);
- LOGI("%s: Chip id: 0x%04X, retry: %d\n", __func__, chip_id, retry_cnt);
+ pr_info("%s: Chip id: 0x%04X, retry: %d\n", __func__, chip_id, retry_cnt);
if (chip_id != CHIP_ID) {
- LOGE("%s: Wrong Chip detected.. Expected|Detected: 0x%04X|0x%04X\n",
+ pr_err("%s: Wrong Chip detected.. Expected|Detected: 0x%04X|0x%04X\n",
__func__, CHIP_ID, chip_id);
if (retry_cnt >= MAX_PROBE_RETRY)
return ERROR_WRONG_CHIP_ID;
@@ -1502,7 +1502,7 @@ static int fts_init(struct fts_ts_info *info)
res = fts_system_reset(info, 1);
if (res < OK) {
if (res == ERROR_BUS_W) {
- LOGE("%s: Bus Connection issue\n", __func__);
+ pr_err("%s: Bus Connection issue\n", __func__);
return res;
}
/*
@@ -1515,7 +1515,7 @@ static int fts_init(struct fts_ts_info *info)
res = read_sys_info();
if (res < 0)
- LOGE("%s: Couldnot read sys info.. No FW..\n", __func__);
+ pr_err("%s: Couldnot read sys info.. No FW..\n", __func__);
return OK;
}
@@ -1540,7 +1540,7 @@ static int fts_get_reg(struct fts_ts_info *info, bool get)
if (of_property_read_bool(info->dev->of_node, "vdd-supply")) {
info->vdd_reg = regulator_get(info->dev, "vdd");
if (IS_ERR(info->vdd_reg)) {
- LOGE("%s: Failed to get power regulator\n", __func__);
+ pr_err("%s: Failed to get power regulator\n", __func__);
ret_val = -EPROBE_DEFER;
goto regulator_put;
}
@@ -1549,7 +1549,7 @@ static int fts_get_reg(struct fts_ts_info *info, bool get)
if (of_property_read_bool(info->dev->of_node, "avdd-supply")) {
info->avdd_reg = regulator_get(info->dev, "avdd");
if (IS_ERR(info->avdd_reg)) {
- LOGE("%s: Failed to get bus pullup regulator\n",
+ pr_err("%s: Failed to get bus pullup regulator\n",
__func__);
ret_val = -EPROBE_DEFER;
goto regulator_put;
@@ -1592,7 +1592,7 @@ static int fts_enable_reg(struct fts_ts_info *info, bool enable)
if (info->vdd_reg) {
ret_val = regulator_enable(info->vdd_reg);
if (ret_val < 0) {
- LOGE("%s: Failed to enable bus regulator\n", __func__);
+ pr_err("%s: Failed to enable bus regulator\n", __func__);
goto exit;
}
}
@@ -1600,7 +1600,7 @@ static int fts_enable_reg(struct fts_ts_info *info, bool enable)
if (info->avdd_reg) {
ret_val = regulator_enable(info->avdd_reg);
if (ret_val < 0) {
- LOGE("%s: Failed to enable power regulator\n",
+ pr_err("%s: Failed to enable power regulator\n",
__func__);
goto disable_bus_reg;
}
@@ -1640,7 +1640,7 @@ static int fts_gpio_setup(int gpio, bool config, int dir, int state)
ret_val = gpio_request(gpio, buf);
if (ret_val) {
- LOGE("%s: Failed to get gpio %d (code: %d)",
+ pr_err("%s: Failed to get gpio %d (code: %d)",
__func__, gpio, ret_val);
return ret_val;
}
@@ -1650,7 +1650,7 @@ static int fts_gpio_setup(int gpio, bool config, int dir, int state)
else
ret_val = gpio_direction_output(gpio, state);
if (ret_val) {
- LOGE("%s: Failed to set gpio %d direction",
+ pr_err("%s: Failed to set gpio %d direction",
__func__, gpio);
return ret_val;
}
@@ -1672,14 +1672,14 @@ static int fts_set_gpio(struct fts_ts_info *info)
ret_val = fts_gpio_setup(bdata->irq_gpio, true, 0, 0);
if (ret_val < 0) {
- LOGE("%s: Failed to configure irq GPIO\n", __func__);
+ pr_err("%s: Failed to configure irq GPIO\n", __func__);
goto err_gpio_irq;
}
if (bdata->reset_gpio >= 0) {
ret_val = fts_gpio_setup(bdata->reset_gpio, true, 1, 0);
if (ret_val < 0) {
- LOGE("%s: Failed to configure reset GPIO\n", __func__);
+ pr_err("%s: Failed to configure reset GPIO\n", __func__);
goto err_gpio_reset;
}
}
@@ -1834,20 +1834,20 @@ static int parse_dt(struct device *dev, struct fts_hw_platform_data *bdata)
bdata->irq_gpio = of_get_named_gpio_flags(np, "st,irq-gpio", 0, NULL);
- LOGI("%s: irq_gpio = %d\n", __func__, bdata->irq_gpio);
+ pr_info("%s: irq_gpio = %d\n", __func__, bdata->irq_gpio);
if (of_property_read_bool(np, "st,reset-gpio")) {
bdata->reset_gpio = of_get_named_gpio_flags(np,
"st,reset-gpio", 0, NULL);
- LOGI("%s: reset_gpio = %d\n", __func__, bdata->reset_gpio);
+ pr_info("%s: reset_gpio = %d\n", __func__, bdata->reset_gpio);
} else
bdata->reset_gpio = GPIO_NOT_DEFINED;
if (of_property_read_u8(np, "st,mm2px", &bdata->mm2px)) {
- LOGE("%s: Unable to get mm2px, please check dts", __func__);
+ pr_err("%s: Unable to get mm2px, please check dts", __func__);
bdata->mm2px = 1;
} else {
- LOGI("%s: mm2px = %d", __func__, bdata->mm2px);
+ pr_info("%s: mm2px = %d", __func__, bdata->mm2px);
}
return OK;
@@ -1882,8 +1882,8 @@ static int fts_probe(struct spi_device *client)
struct gti_optional_configuration *options;
#endif
- LOGI("%s: driver probe begin!\n", __func__);
- LOGI("%s: driver ver. %s\n", __func__, FTS_TS_DRV_VERSION);
+ pr_info("%s: driver probe begin!\n", __func__);
+ pr_info("%s: driver ver. %s\n", __func__, FTS_TS_DRV_VERSION);
info = kzalloc(sizeof(struct fts_ts_info), GFP_KERNEL);
if (!info) {
@@ -1893,14 +1893,14 @@ static int fts_probe(struct spi_device *client)
}
#ifdef I2C_INTERFACE
- LOGI("%s: I2C interface...\n", __func__);
+ pr_info("%s: I2C interface...\n", __func__);
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
- LOGE("%s: Unsupported I2C functionality\n", __func__);
+ pr_err("%s: Unsupported I2C functionality\n", __func__);
error = -EIO;
goto probe_error_exit_1;
}
- LOGI("%s: I2C address: %x\n", __func__, client->addr);
+ pr_info("%s: I2C address: %x\n", __func__, client->addr);
bus_type = BUS_I2C;
#else
client->mode = SPI_MODE_0;
@@ -1911,7 +1911,7 @@ static int fts_probe(struct spi_device *client)
client->rt = true;
ret_val = spi_setup(client);
if (ret_val < 0) {
- LOGE("%s: setup SPI rt failed(%d)\n", __func__, ret_val);
+ pr_err("%s: setup SPI rt failed(%d)\n", __func__, ret_val);
error = -EIO;
goto probe_error_exit_1;
}
@@ -1920,11 +1920,11 @@ static int fts_probe(struct spi_device *client)
#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE)
info->dma_mode = goog_check_spi_dma_enabled(client);
#endif
- LOGI("%s: SPI interface: dma_mode %d.\n", __func__, info->dma_mode);
+ pr_info("%s: SPI interface: dma_mode %d.\n", __func__, info->dma_mode);
bus_type = BUS_SPI;
#endif
- LOGI("%s: SET Device driver INFO:\n", __func__);
+ pr_info("%s: SET Device driver INFO:\n", __func__);
info->client = client;
info->dev = &info->client->dev;
@@ -1935,7 +1935,7 @@ static int fts_probe(struct spi_device *client)
sizeof(struct fts_hw_platform_data),
GFP_KERNEL);
if (!info->board) {
- LOGE("%s: ERROR:info.board kzalloc failed\n",
+ pr_err("%s: ERROR:info.board kzalloc failed\n",
__func__);
goto probe_error_exit_1;
}
@@ -1943,25 +1943,25 @@ static int fts_probe(struct spi_device *client)
bdata = info->board;
}
- LOGI("%s: SET Regulators:\n", __func__);
+ pr_info("%s: SET Regulators:\n", __func__);
error = fts_get_reg(info, true);
if (error < 0) {
- LOGE("%s: ERROR:Failed to get regulators\n",
+ pr_err("%s: ERROR:Failed to get regulators\n",
__func__);
goto probe_error_exit_1;
}
ret_val = fts_enable_reg(info, true);
if (ret_val < 0) {
- LOGE("%s: ERROR Failed to enable regulators\n",
+ pr_err("%s: ERROR Failed to enable regulators\n",
__func__);
goto probe_error_exit_2;
}
- LOGI("%s: SET GPIOS_Test:\n", __func__);
+ pr_info("%s: SET GPIOS_Test:\n", __func__);
ret_val = fts_set_gpio(info);
if (ret_val < 0) {
- LOGE("%s: ERROR Failed to set up GPIO's\n",
+ pr_err("%s: ERROR Failed to set up GPIO's\n",
__func__);
goto probe_error_exit_2;
}
@@ -1975,10 +1975,10 @@ static int fts_probe(struct spi_device *client)
mutex_init(&info->fts_int_mutex);
- LOGI("%s: SET Input Device Property:\n", __func__);
+ pr_info("%s: SET Input Device Property:\n", __func__);
info->input_dev = input_allocate_device();
if (!info->input_dev) {
- LOGE("%s: ERROR: No such input device defined!\n", __func__);
+ pr_err("%s: ERROR: No such input device defined!\n", __func__);
error = -ENODEV;
goto probe_error_exit_2;
}
@@ -2018,7 +2018,7 @@ static int fts_probe(struct spi_device *client)
DISTANCE_MAX, 0, 0);
error = input_register_device(info->input_dev);
if (error) {
- LOGE("%s: ERROR: No such input device\n", __func__);
+ pr_err("%s: ERROR: No such input device\n", __func__);
error = -ENODEV;
goto probe_error_exit_5;
}
@@ -2027,7 +2027,7 @@ static int fts_probe(struct spi_device *client)
info->resume_bit = 1;
ret_val = fts_init(info);
if (ret_val < OK) {
- LOGE("%s: Initialization fails.. exiting..\n", __func__);
+ pr_err("%s: Initialization fails.. exiting..\n", __func__);
if (ret_val == ERROR_WRONG_CHIP_ID)
error = -EPROBE_DEFER;
else
@@ -2037,21 +2037,21 @@ static int fts_probe(struct spi_device *client)
ret_val = fts_proc_init(info);
if (ret_val < OK)
- LOGE("%s: Cannot create /proc filenode..\n", __func__);
+ pr_err("%s: Cannot create /proc filenode..\n", __func__);
#if defined(FW_UPDATE_ON_PROBE) && defined(FW_H_FILE)
ret_val = fts_chip_init(info);
if (ret_val < OK) {
- LOGE("%s: Flashing FW/Production Test/Touch Init Failed..\n",
+ pr_err("%s: Flashing FW/Production Test/Touch Init Failed..\n",
__func__);
goto probe_error_exit_6;
}
#else
- LOGI("%s: SET Auto Fw Update:\n", __func__);
+ pr_info("%s: SET Auto Fw Update:\n", __func__);
info->fwu_workqueue = alloc_workqueue("fts-fwu-queue", WQ_UNBOUND |
WQ_HIGHPRI | WQ_CPU_INTENSIVE, 1);
if (!info->fwu_workqueue) {
- LOGE("%s: ERROR: Cannot create fwu work thread\n", __func__);
+ pr_err("%s: ERROR: Cannot create fwu work thread\n", __func__);
goto probe_error_exit_6;
}
INIT_DELAYED_WORK(&info->fwu_work, flash_update_auto);
@@ -2068,7 +2068,7 @@ static int fts_probe(struct spi_device *client)
info->mutual_data = (short *)kmalloc(info->mutual_data_size,
GFP_KERNEL);
if (!info->mutual_data) {
- LOGE("%s: Failed to allocate mutual_data.\n", __func__);
+ pr_err("%s: Failed to allocate mutual_data.\n", __func__);
goto probe_error_exit_6;
}
@@ -2077,25 +2077,25 @@ static int fts_probe(struct spi_device *client)
sizeof(int16_t);
info->self_data = kmalloc(info->self_data_size, GFP_KERNEL);
if (!info->self_data) {
- LOGE("%s: Failed to allocate self data.\n", __func__);
+ pr_err("%s: Failed to allocate self data.\n", __func__);
goto probe_error_exit_6;
}
info->fw_ms_data = (short *)kmalloc(info->mutual_data_size,
GFP_KERNEL);
if (!info->fw_ms_data) {
- LOGE("%s: Failed to allocate fw mutual_data.\n", __func__);
+ pr_err("%s: Failed to allocate fw mutual_data.\n", __func__);
goto probe_error_exit_6;
}
} else {
- LOGE("%s: Incorrect system information ForceLen=%d SenseLen=%d.\n",
+ pr_err("%s: Incorrect system information ForceLen=%d SenseLen=%d.\n",
__func__, system_info.u8_scr_tx_len, system_info.u8_scr_rx_len);
goto probe_error_exit_6;
}
options = devm_kzalloc(info->dev, sizeof(struct gti_optional_configuration), GFP_KERNEL);
if (!options) {
- LOGE("%s: GTI optional configuration kzalloc failed.\n",
+ pr_err("%s: GTI optional configuration kzalloc failed.\n",
__func__);
goto probe_error_exit_6;
}
@@ -2108,12 +2108,12 @@ static int fts_probe(struct spi_device *client)
info, info->dev, info->input_dev, gti_default_handler, options);
ret_val = goog_pm_register_notification(info->gti, &fts_pm_ops);
if (ret_val < 0) {
- LOGE("%s: Failed to register gti pm", __func__);
+ pr_err("%s: Failed to register gti pm", __func__);
goto probe_error_exit_7;
}
#endif
- LOGI("%s: Probe Finished!\n", __func__);
+ pr_info("%s: Probe Finished!\n", __func__);
return OK;
#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE)
probe_error_exit_7:
@@ -2139,7 +2139,7 @@ probe_error_exit_1:
kfree(info);
probe_error_exit_0:
- LOGE("%s: Probe Failed!\n", __func__);
+ pr_err("%s: Probe Failed!\n", __func__);
return error;
}
diff --git a/touch/fst2/fts.h b/touch/fst2/fts.h
index 2efe06e..b710111 100644
--- a/touch/fst2/fts.h
+++ b/touch/fst2/fts.h
@@ -26,19 +26,10 @@
#include <goog_touch_interface.h>
#endif
-#define LOG_PREFIX "[FTS] "
-
-#define LOGD(fmt, args...) \
- pr_debug(LOG_PREFIX fmt, ##args)
-
-#define LOGI(fmt, args...) \
- pr_info(LOG_PREFIX fmt, ##args)
-
-#define LOGW(fmt, args...) \
- pr_warn(LOG_PREFIX fmt, ##args)
-
-#define LOGE(fmt, args...) \
- pr_err(LOG_PREFIX fmt, ##args)
+#undef pr_fmt
+#define pr_fmt(fmt) "gtd: fst2: " fmt
+#undef dev_fmt
+#define dev_fmt(fmt) "gtd: " fmt
#define FTS_TS_DRV_NAME "fst2"
#define FTS_TS_DRV_VERSION "6.0.3"
diff --git a/touch/fst2/fts_lib/fts_flash.c b/touch/fst2/fts_lib/fts_flash.c
index 7c912d6..8d1dc7f 100644
--- a/touch/fst2/fts_lib/fts_flash.c
+++ b/touch/fst2/fts_lib/fts_flash.c
@@ -85,20 +85,20 @@ int read_sys_info(void)
res = fts_request_hdm(HDM_REQ_SYS_INFO);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
res = fts_read_hdm(FRAME_BUFFER_ADDR, data, SYS_INFO_SIZE);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
- LOGI("%s: type: %02X, cnt: %02X, len: %d words\n",
+ pr_info("%s: type: %02X, cnt: %02X, len: %d words\n",
__func__, data[0], data[1],
(u16)((data[3] << 8) + data[2]));
if (data[0] != HDM_REQ_SYS_INFO) {
- LOGE("%s: parsing ERROR %08X\n", __func__, ERROR_TIMEOUT);
+ pr_err("%s: parsing ERROR %08X\n", __func__, ERROR_TIMEOUT);
return ERROR_TIMEOUT;
}
index += 4;
@@ -217,133 +217,133 @@ int read_sys_info(void)
index += 4;
u8_to_u32(&data[index], &system_info.u32_pure_raw_ss_det_flash_addr);
- LOGI("%s: API Version: 0x%04X\n",
+ pr_info("%s: API Version: 0x%04X\n",
__func__, system_info.u16_api_ver_rev);
- LOGI("%s: API Major Version: 0x%02X\n",
+ pr_info("%s: API Major Version: 0x%02X\n",
__func__, system_info.u8_api_ver_major);
- LOGI("%s: API Minor Version: 0x%02X\n",
+ pr_info("%s: API Minor Version: 0x%02X\n",
__func__, system_info.u8_api_ver_minor);
- LOGI("%s: ChipId0: 0x%04X\n",
+ pr_info("%s: ChipId0: 0x%04X\n",
__func__, system_info.u16_chip0_id);
- LOGI("%s: ChipVer0: 0x%04X\n",
+ pr_info("%s: ChipVer0: 0x%04X\n",
__func__, system_info.u16_chip0_ver);
- LOGI("%s: ChipId1: 0x%04X\n",
+ pr_info("%s: ChipId1: 0x%04X\n",
__func__, system_info.u16_chip1_id);
- LOGI("%s: ChipVer1: 0x%04X\n",
+ pr_info("%s: ChipVer1: 0x%04X\n",
__func__, system_info.u16_chip1_ver);
- LOGI("%s: FW Version: 0x%04X\n",
+ pr_info("%s: FW Version: 0x%04X\n",
__func__, system_info.u16_fw_ver);
- LOGI("%s: SVN Revision: 0x%04X\n",
+ pr_info("%s: SVN Revision: 0x%04X\n",
__func__, system_info.u16_svn_rev);
- LOGI("%s: PE Version: 0x%04X\n",
+ pr_info("%s: PE Version: 0x%04X\n",
__func__, system_info.u16_pe_ver);
- LOGI("%s: REG Revision: 0x%04X\n",
+ pr_info("%s: REG Revision: 0x%04X\n",
__func__, system_info.u16_reg_ver);
- LOGI("%s: Scr-X Resolution: %d\n",
+ pr_info("%s: Scr-X Resolution: %d\n",
__func__, system_info.u16_scr_x_res);
- LOGI("%s: Scr-Y Resolution: %d\n",
+ pr_info("%s: Scr-Y Resolution: %d\n",
__func__, system_info.u16_scr_y_res);
- LOGI("%s: Tx Length: %d\n",
+ pr_info("%s: Tx Length: %d\n",
__func__, system_info.u8_scr_tx_len);
- LOGI("%s: Rx Length: %d\n",
+ pr_info("%s: Rx Length: %d\n",
__func__, system_info.u8_scr_rx_len);
- LOGI("%s: DIE Info: ", __func__);
+ pr_info("%s: DIE Info: ", __func__);
for (i = 0; i < DIE_INFO_SIZE; i++)
printk("%02X ", system_info.u8_die_info[i]);
printk("\n");
- LOGI("%s: External Release Info: ", __func__);
+ pr_info("%s: External Release Info: ", __func__);
for (i = 0; i < RELEASE_INFO_SIZE; i++)
printk("%02X ", system_info.u8_release_info[i]);
printk("\n");
- LOGI("%s: Flash Org Info: 0x%08X\n",
+ pr_info("%s: Flash Org Info: 0x%08X\n",
__func__, system_info.u32_flash_org_info);
- LOGI("%s: Config Afe Ver: 0x%02X\n",
+ pr_info("%s: Config Afe Ver: 0x%02X\n",
__func__, system_info.u8_cfg_afe_ver);
- LOGI("%s: Mutual Afe Ver: 0x%02X\n",
+ pr_info("%s: Mutual Afe Ver: 0x%02X\n",
__func__, system_info.u8_ms_scr_afe_ver);
- LOGI("%s: Mutual GV Ver: 0x%02X\n",
+ pr_info("%s: Mutual GV Ver: 0x%02X\n",
__func__, system_info.u8_ms_scr_gv_ver);
- LOGI("%s: Mutual LP Afe Ver: 0x%02X\n",
+ pr_info("%s: Mutual LP Afe Ver: 0x%02X\n",
__func__, system_info.u8_ms_scr_lp_afe_ver);
- LOGI("%s: Mutual LP GV Ver: 0x%02X\n",
+ pr_info("%s: Mutual LP GV Ver: 0x%02X\n",
__func__, system_info.u8_ms_scr_lp_gv_ver);
- LOGI("%s: Self Afe Ver: 0x%02X\n",
+ pr_info("%s: Self Afe Ver: 0x%02X\n",
__func__, system_info.u8_ss_tch_afe_ver);
- LOGI("%s: Self GV Ver: 0x%02X\n",
+ pr_info("%s: Self GV Ver: 0x%02X\n",
__func__, system_info.u8_ss_tch_gv_ver);
- LOGI("%s: Self Detect Afe Ver: 0x%02X\n",
+ pr_info("%s: Self Detect Afe Ver: 0x%02X\n",
__func__, system_info.u8_ss_det_afe_ver);
- LOGI("%s: Self Detect GV Ver: 0x%02X\n",
+ pr_info("%s: Self Detect GV Ver: 0x%02X\n",
__func__, system_info.u8_ss_det_gv_ver);
- LOGI("%s: Debug Info Address: 0x%04X\n",
+ pr_info("%s: Debug Info Address: 0x%04X\n",
__func__, system_info.u16_dbg_info_addr);
- LOGI("%s: Mutual Raw Address: 0x%04X\n",
+ pr_info("%s: Mutual Raw Address: 0x%04X\n",
__func__, system_info.u16_ms_scr_raw_addr);
- LOGI("%s: Mutual Filter Address: 0x%04X\n",
+ pr_info("%s: Mutual Filter Address: 0x%04X\n",
__func__, system_info.u16_ms_scr_filter_addr);
- LOGI("%s: Mutual Strength Address: 0x%04X\n",
+ pr_info("%s: Mutual Strength Address: 0x%04X\n",
__func__, system_info.u16_ms_scr_strength_addr);
- LOGI("%s: Mutual Baseline Address: 0x%04X\n",
+ pr_info("%s: Mutual Baseline Address: 0x%04X\n",
__func__, system_info.u16_ms_scr_baseline_addr);
- LOGI("%s: Self Tx Raw Address: 0x%04X\n",
+ pr_info("%s: Self Tx Raw Address: 0x%04X\n",
__func__, system_info.u16_ss_tch_tx_raw_addr);
- LOGI("%s: Self Tx Filter Address: 0x%04X\n",
+ pr_info("%s: Self Tx Filter Address: 0x%04X\n",
__func__, system_info.u16_ss_tch_tx_filter_addr);
- LOGI("%s: Self Tx Strength Address: 0x%04X\n",
+ pr_info("%s: Self Tx Strength Address: 0x%04X\n",
__func__, system_info.u16_ss_tch_tx_strength_addr);
- LOGI("%s: Self Tx Baseline Address: 0x%04X\n",
+ pr_info("%s: Self Tx Baseline Address: 0x%04X\n",
__func__, system_info.u16_ss_tch_tx_baseline_addr);
- LOGI("%s: Self Rx Raw Address: 0x%04X\n",
+ pr_info("%s: Self Rx Raw Address: 0x%04X\n",
__func__, system_info.u16_ss_tch_rx_raw_addr);
- LOGI("%s: Self Rx Filter Address: 0x%04X\n",
+ pr_info("%s: Self Rx Filter Address: 0x%04X\n",
__func__, system_info.u16_ss_tch_rx_filter_addr);
- LOGI("%s: Self Rx Strength Address: 0x%04X\n",
+ pr_info("%s: Self Rx Strength Address: 0x%04X\n",
__func__, system_info.u16_ss_tch_rx_strength_addr);
- LOGI("%s: Self Rx Baseline Address: 0x%04X\n",
+ pr_info("%s: Self Rx Baseline Address: 0x%04X\n",
__func__, system_info.u16_ss_tch_rx_baseline_addr);
- LOGI("%s: Self Detect Tx Raw Address: 0x%04X\n",
+ pr_info("%s: Self Detect Tx Raw Address: 0x%04X\n",
__func__, system_info.u16_ss_det_tx_raw_addr);
- LOGI("%s: Self Detect Tx Filter Address: 0x%04X\n",
+ pr_info("%s: Self Detect Tx Filter Address: 0x%04X\n",
__func__, system_info.u16_ss_det_tx_filter_addr);
- LOGI("%s: Self Detect Tx Strength Address: 0x%04X\n",
+ pr_info("%s: Self Detect Tx Strength Address: 0x%04X\n",
__func__, system_info.u16_ss_det_tx_strength_addr);
- LOGI("%s: Self Detect Tx Baseline Address: 0x%04X\n",
+ pr_info("%s: Self Detect Tx Baseline Address: 0x%04X\n",
__func__, system_info.u16_ss_det_tx_baseline_addr);
- LOGI("%s: Self Detect Rx Raw Address: 0x%04X\n",
+ pr_info("%s: Self Detect Rx Raw Address: 0x%04X\n",
__func__, system_info.u16_ss_det_rx_raw_addr);
- LOGI("%s: Self Detect Rx Filter Address: 0x%04X\n",
+ pr_info("%s: Self Detect Rx Filter Address: 0x%04X\n",
__func__, system_info.u16_ss_det_rx_filter_addr);
- LOGI("%s: Self Detect Rx Strength Address: 0x%04X\n",
+ pr_info("%s: Self Detect Rx Strength Address: 0x%04X\n",
__func__, system_info.u16_ss_det_rx_strength_addr);
- LOGI("%s: Self Detect Rx Baseline Address: 0x%04X\n",
+ pr_info("%s: Self Detect Rx Baseline Address: 0x%04X\n",
__func__, system_info.u16_ss_det_rx_baseline_addr);
- LOGI("%s: Default Flash Address: 0x%08X\n",
+ pr_info("%s: Default Flash Address: 0x%08X\n",
__func__, system_info.u32_reg_default_sect_flash_addr);
- LOGI("%s: Misc Flash Address: 0x%08X\n",
+ pr_info("%s: Misc Flash Address: 0x%08X\n",
__func__, system_info.u32_misc_sect_flash_addr);
- LOGI("%s: Cx Mutual Flash Address: 0x%08X\n",
+ pr_info("%s: Cx Mutual Flash Address: 0x%08X\n",
__func__, system_info.u32_cx_ms_scr_flash_addr);
- LOGI("%s: Cx Mutual LP Flash Address: 0x%08X\n",
+ pr_info("%s: Cx Mutual LP Flash Address: 0x%08X\n",
__func__, system_info.u32_cx_ms_scr_lp_flash_addr);
- LOGI("%s: Cx Self Flash Address: 0x%08X\n",
+ pr_info("%s: Cx Self Flash Address: 0x%08X\n",
__func__, system_info.u32_cx_ss_tch_flash_addr);
- LOGI("%s: Cx Self Detect Flash Address: 0x%08X\n",
+ pr_info("%s: Cx Self Detect Flash Address: 0x%08X\n",
__func__, system_info.u32_cx_ss_det_flash_addr);
- LOGI("%s: Ioff Mutual Flash Address: 0x%08X\n",
+ pr_info("%s: Ioff Mutual Flash Address: 0x%08X\n",
__func__, system_info.u32_ioff_ms_scr_flash_addr);
- LOGI("%s: Ioff Mutual LP Flash Address: 0x%08X\n",
+ pr_info("%s: Ioff Mutual LP Flash Address: 0x%08X\n",
__func__, system_info.u32_ioff_ms_scr_lp_flash_addr);
- LOGI("%s: Ioff Self LP Flash Address: 0x%08X\n",
+ pr_info("%s: Ioff Self LP Flash Address: 0x%08X\n",
__func__, system_info.u32_ioff_ss_tch_flash_addr);
- LOGI("%s: Ioff Self Detect Flash Address: 0x%08X\n",
+ pr_info("%s: Ioff Self Detect Flash Address: 0x%08X\n",
__func__, system_info.u32_ioff_ss_det_flash_addr);
- LOGI("%s: Pure Raw Mutual Flash Address: 0x%08X\n",
+ pr_info("%s: Pure Raw Mutual Flash Address: 0x%08X\n",
__func__, system_info.u32_pure_raw_ms_scr_flash_addr);
- LOGI("%s: Pure Raw Mutual Lp Flash Address: 0x%08X\n",
+ pr_info("%s: Pure Raw Mutual Lp Flash Address: 0x%08X\n",
__func__, system_info.u32_pure_raw_ms_scr_lp_flash_addr);
- LOGI("%s: Pure Raw Self Flash Address: 0x%08X\n",
+ pr_info("%s: Pure Raw Self Flash Address: 0x%08X\n",
__func__, system_info.u32_pure_raw_ss_tch_flash_addr);
- LOGI("%s: Pure Raw Self Detect Flash Address: 0x%08X\n",
+ pr_info("%s: Pure Raw Self Detect Flash Address: 0x%08X\n",
__func__, system_info.u32_pure_raw_ss_det_flash_addr);
return res;
}
@@ -366,22 +366,22 @@ int get_fw_file_data(const char *path_to_file, u8 **data, int *size)
int from = 0;
char *path = (char *)path_to_file;
- LOGI("%s: Getting FW file data...\n", __func__);
+ pr_info("%s: Getting FW file data...\n", __func__);
if (strncmp(path_to_file, "NULL", 4) == 0) {
from = 1;
path = PATH_FILE_FW;
- LOGI("%s: Getting FW file data...\n", __func__);
+ pr_info("%s: Getting FW file data...\n", __func__);
}
/* keep the switch case because if the argument passed is null but
* the option from .h is not set we still try to load from bin */
switch (from) {
#ifdef FW_H_FILE
case 1:
- LOGI("%s: Read FW from .h file!\n", __func__);
+ pr_info("%s: Read FW from .h file!\n", __func__);
*size = FW_SIZE_NAME;
*data = (u8 *)kmalloc((*size) * sizeof(u8), GFP_KERNEL);
if (*data == NULL) {
- LOGE("%s: Impossible to allocate memory! ERROR %08X\n",
+ pr_err("%s: Impossible to allocate memory! ERROR %08X\n",
__func__, ERROR_ALLOC);
return ERROR_ALLOC;
}
@@ -390,7 +390,7 @@ int get_fw_file_data(const char *path_to_file, u8 **data, int *size)
break;
#endif
default:
- LOGI("%s: Read FW from BIN file %s !\n", __func__, path);
+ pr_info("%s: Read FW from BIN file %s !\n", __func__, path);
dev = get_dev();
if (dev != NULL) {
@@ -400,7 +400,7 @@ int get_fw_file_data(const char *path_to_file, u8 **data, int *size)
*data = (u8 *)kmalloc((*size) * sizeof(u8),
GFP_KERNEL);
if (*data == NULL) {
- LOGE("%s: Impossible to allocate memory! ERROR %08X\n",
+ pr_err("%s: Impossible to allocate memory! ERROR %08X\n",
__func__, ERROR_ALLOC);
release_firmware(fw);
return ERROR_ALLOC;
@@ -408,18 +408,18 @@ int get_fw_file_data(const char *path_to_file, u8 **data, int *size)
memcpy(*data, (u8 *)fw->data, (*size));
release_firmware(fw);
} else {
- LOGE("%s: No File found! ERROR %08X\n",
+ pr_err("%s: No File found! ERROR %08X\n",
__func__ , ERROR_FILE_NOT_FOUND);
return ERROR_FILE_NOT_FOUND;
}
} else {
- LOGE("%s: No device found! ERROR %08X\n",
+ pr_err("%s: No device found! ERROR %08X\n",
__func__, ERROR_OP_NOT_ALLOW);
return ERROR_OP_NOT_ALLOW;
}
}
- LOGI("%s: get fw file data finished!\n", __func__);
+ pr_info("%s: get fw file data finished!\n", __func__);
return OK;
}
@@ -445,37 +445,37 @@ int parse_bin_file(u8 *ubin_data, int ubin_size,
crc = calculate_crc(ubin_data + 4, ubin_size - 4);
if (crc == (u32)((ubin_data[0] << 24) + (ubin_data[1] << 16) +
(ubin_data[2] << 8) + ubin_data[3]))
- LOGI("%s: BIN CRC OK\n", __func__);
+ pr_info("%s: BIN CRC OK\n", __func__);
else {
- LOGE("%s: BIN CRC error... ERROR %08X\n", __func__, ERROR_FILE_PARSE);
+ pr_err("%s: BIN CRC error... ERROR %08X\n", __func__, ERROR_FILE_PARSE);
return ERROR_FILE_PARSE;
}
index += 4;
if (ubin_size <= (BIN_HEADER_SIZE + SECTION_HEADER_SIZE) ||
ubin_data == NULL) {
- LOGE("%s: Read only %d instead of %d... ERROR %08X\n",
+ pr_err("%s: Read only %d instead of %d... ERROR %08X\n",
__func__, ubin_size, BIN_HEADER_SIZE, ERROR_FILE_PARSE);
return ERROR_FILE_PARSE;
}
u8_to_u32_be(&ubin_data[index], &temp);
if (temp != BIN_HEADER) {
- LOGE("%s: Wrong Signature 0x%08X ... ERROR %08X\n",
+ pr_err("%s: Wrong Signature 0x%08X ... ERROR %08X\n",
__func__, temp, ERROR_FILE_PARSE);
return ERROR_FILE_PARSE;
}
index += 5;
u8_to_u16_be(&ubin_data[index], &u16_temp);
if (u16_temp != CHIP_ID) {
- LOGE("%s: Wrong Chip ID 0x%04X ... ERROR %08X\n",
+ pr_err("%s: Wrong Chip ID 0x%04X ... ERROR %08X\n",
__func__, u16_temp, ERROR_FILE_PARSE);
return ERROR_FILE_PARSE;
}
- LOGI("%s: Chip ID: 0x%04X\n", __func__, u16_temp);
+ pr_info("%s: Chip ID: 0x%04X\n", __func__, u16_temp);
index += 27;
while (index < ubin_size) {
u8_to_u32_be(&ubin_data[index], &temp);
if (temp != SECTION_HEADER) {
- LOGE("%s: Wrong Section Signature %08X ... ERROR %08X\n",
+ pr_err("%s: Wrong Section Signature %08X ... ERROR %08X\n",
__func__, temp, ERROR_FILE_PARSE);
return ERROR_FILE_PARSE;
}
@@ -483,7 +483,7 @@ int parse_bin_file(u8 *ubin_data, int ubin_size,
u8_to_u16_be(&ubin_data[index], &u16_temp);
if (u16_temp == FINGERTIP_FW_CODE) {
if (code_data_found) {
- LOGE("%s: Cannot have more than one code memh ... ERROR %08X\n",
+ pr_err("%s: Cannot have more than one code memh ... ERROR %08X\n",
__func__, ERROR_FILE_PARSE);
return ERROR_FILE_PARSE;
}
@@ -492,7 +492,7 @@ int parse_bin_file(u8 *ubin_data, int ubin_size,
u8_to_u32_be(&ubin_data[index], &temp);
fw_data->fw_code_size = temp;
if (fw_data->fw_code_size == 0) {
- LOGE("%s: Code data cannot be empty ... ERROR %08X\n",
+ pr_err("%s: Code data cannot be empty ... ERROR %08X\n",
__func__, ERROR_FILE_PARSE);
return ERROR_FILE_PARSE;
}
@@ -500,7 +500,7 @@ int parse_bin_file(u8 *ubin_data, int ubin_size,
(u8 *)kmalloc(fw_data->fw_code_size *
sizeof(u8), GFP_KERNEL);
if (fw_data->fw_code_data == NULL) {
- LOGE("%s: Error allocating memory... ERROR %08X\n",
+ pr_err("%s: Error allocating memory... ERROR %08X\n",
__func__, ERROR_FILE_PARSE);
return ERROR_FILE_PARSE;
}
@@ -509,9 +509,9 @@ int parse_bin_file(u8 *ubin_data, int ubin_size,
if (fw_data->fw_code_size % FLASH_PAGE_SIZE)
fw_data->num_code_pages++;
- LOGI("%s: code pages: %d\n",
+ pr_info("%s: code pages: %d\n",
__func__, fw_data->num_code_pages);
- LOGI("%s: code size: %d bytes\n",
+ pr_info("%s: code size: %d bytes\n",
__func__, fw_data->fw_code_size);
index += 12;
memcpy(fw_data->fw_code_data,
@@ -520,9 +520,9 @@ int parse_bin_file(u8 *ubin_data, int ubin_size,
fw_data->fw_ver =
(u16)((fw_data->fw_code_data[209] << 8) +
fw_data->fw_code_data[208]);
- LOGI("%s: FW version: 0x%04X\n",
+ pr_info("%s: FW version: 0x%04X\n",
__func__, fw_data->fw_ver);
- LOGI("%s: SVN revision: 0x%04X\n",
+ pr_info("%s: SVN revision: 0x%04X\n",
__func__,
(u16)((fw_data->fw_code_data[211]
<< 8) + fw_data->fw_code_data[210]));
@@ -530,13 +530,13 @@ int parse_bin_file(u8 *ubin_data, int ubin_size,
fw_data->fw_code_data[216];
fw_data->panel_info_pages =
fw_data->fw_code_data[217];
- LOGI("%s: Code Pages(in org info): %02X,Panel Info "
+ pr_info("%s: Code Pages(in org info): %02X,Panel Info "
"Pages(in org info): %02X\n",
__func__, fw_data->flash_code_pages,
fw_data->panel_info_pages);
if ((fw_data->flash_code_pages +
fw_data->panel_info_pages) > NUM_FLASH_PAGES) {
- LOGE("%s: FW code + panel Info pages(%d) is "
+ pr_err("%s: FW code + panel Info pages(%d) is "
"more the maximum flash pages(%d)\n",
__func__, (fw_data->flash_code_pages +
fw_data->panel_info_pages),
@@ -545,7 +545,7 @@ int parse_bin_file(u8 *ubin_data, int ubin_size,
}
if (fw_data->num_code_pages >
fw_data->flash_code_pages) {
- LOGE("%s: FW code size in the bin file(%d) is "
+ pr_err("%s: FW code size in the bin file(%d) is "
"more than the FW code pages(%d) allocated by FW\n",
__func__, fw_data->num_code_pages,
fw_data->flash_code_pages);
@@ -559,7 +559,7 @@ int parse_bin_file(u8 *ubin_data, int ubin_size,
fw_data->sections[sec_index].sec_size = temp;
if (fw_data->sections[sec_index].
sec_size == 0) {
- LOGE("%s: section data cannot be empty ... ERROR %08X\n",
+ pr_err("%s: section data cannot be empty ... ERROR %08X\n",
__func__, ERROR_FILE_PARSE);
return ERROR_FILE_PARSE;
}
@@ -569,14 +569,14 @@ int parse_bin_file(u8 *ubin_data, int ubin_size,
sizeof(u8), GFP_KERNEL);
if (fw_data->sections[sec_index].
sec_data == NULL) {
- LOGE("%s: Error allocating memory... ERROR %08X\n",
+ pr_err("%s: Error allocating memory... ERROR %08X\n",
__func__, ERROR_FILE_PARSE);
return ERROR_FILE_PARSE;
}
- LOGI("%s: section%d type : 0x%02X\n",
+ pr_info("%s: section%d type : 0x%02X\n",
__func__, sec_index,
fw_data->sections[sec_index].sec_id);
- LOGI("%s: section%d size : %d bytes\n",
+ pr_info("%s: section%d size : %d bytes\n",
__func__, sec_index,
fw_data->sections[sec_index].sec_size);
index += 12;
@@ -591,14 +591,14 @@ int parse_bin_file(u8 *ubin_data, int ubin_size,
sec_data[15] << 8) +
fw_data->sections[sec_index].
sec_data[14]);
- LOGI("%s: section version : 0x%04X\n",
+ pr_info("%s: section version : 0x%04X\n",
__func__,
fw_data->sections[sec_index].sec_ver);
}
sec_index++;
}
}
- LOGI("%s: Total number of sections : %d\n", __func__,
+ pr_info("%s: Total number of sections : %d\n", __func__,
fw_data->num_sections);
return OK;
}
@@ -621,14 +621,14 @@ int read_fw_file(const char *path, struct firmware_file *fw_file)
res = get_fw_file_data(path, &orig_data, &orig_size);
if (res < OK) {
- LOGE("%s: Impossible to retrieve FW file data... ERROR %08X\n",
+ pr_err("%s: Impossible to retrieve FW file data... ERROR %08X\n",
__func__, ERROR_MEMH_READ);
res |= ERROR_MEMH_READ;
goto goto_end;
}
res = parse_bin_file(orig_data, orig_size, fw_file);
if (res < OK) {
- LOGE("%s: BIN file parse ERROR %08X\n", __func__,
+ pr_err("%s: BIN file parse ERROR %08X\n", __func__,
ERROR_MEMH_READ);
res |= ERROR_MEMH_READ;
goto goto_end;
@@ -655,14 +655,14 @@ int configure_spi4(void)
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE, GPIO_GPIO_PU_ADDR,
&data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
data = 0x07;
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE,
GPIO_MISO_CONFIG_ADDR, &data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
@@ -670,7 +670,7 @@ int configure_spi4(void)
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE, SPI4_CONFIG_ADDR,
&data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
@@ -690,16 +690,16 @@ int flash_update_preset(void)
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE, SYS_RST_ADDR,
&data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
#ifndef I2C_INTERFACE
#ifdef SPI4_WIRE
- LOGI("%s: Configuring SPI4..\n", __func__);
+ pr_info("%s: Configuring SPI4..\n", __func__);
res = configure_spi4();
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
#endif
@@ -709,35 +709,35 @@ int flash_update_preset(void)
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE, UVLO_CTRL_ADDR,
&data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
data = 0x13;
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE,
FLASH_FSM_CTRL_ADDR, &data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
data = 0x20;
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE, BOOT_OPT_ADDR,
&data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
data = 0x00;
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE, PAGE_SEL_ADDR,
&data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
res = fts_write_read_u8ux(FTS_CMD_HW_REG_R, HW_ADDR_SIZE,
FLASH_CTRL_ADDR, &data, 1, DUMMY_BYTE);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
data |= 0x03;
@@ -749,7 +749,7 @@ int flash_update_preset(void)
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE, FLASH_CTRL_ADDR,
&data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
return res;
@@ -767,11 +767,11 @@ int wait_for_flash_ready(u8 type)
u8 read_data[2] = { 0 };
int i, res = -1;
- LOGI("%s: Waiting for flash ready ...\n", __func__);
+ pr_info("%s: Waiting for flash ready ...\n", __func__);
for (i = 0; i < FLASH_RETRY_COUNT && res != 0; i++) {
res = fts_write_read(cmd, 5, read_data, 2);
if (res < OK)
- LOGE("%s: ERROR %08X\n",
+ pr_err("%s: ERROR %08X\n",
__func__, ERROR_BUS_W);
else {
#ifdef I2C_INTERFACE
@@ -779,18 +779,18 @@ int wait_for_flash_ready(u8 type)
#else
res = read_data[1] & 0x80;
#endif
- LOGI("%s: flash status = %d\n", __func__, res);
+ pr_info("%s: flash status = %d\n", __func__, res);
}
msleep(FLASH_WAIT_BEFORE_RETRY);
}
if (i == FLASH_RETRY_COUNT && res != 0) {
- LOGE("%s: Wait for flash TIMEOUT! ERROR %08X\n", __func__,
+ pr_err("%s: Wait for flash TIMEOUT! ERROR %08X\n", __func__,
ERROR_TIMEOUT);
return ERROR_TIMEOUT;
}
- LOGI("%s: Flash READY!\n", __func__);
+ pr_info("%s: Flash READY!\n", __func__);
return OK;
}
@@ -817,46 +817,46 @@ int flash_erase(int flash_pages)
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE,
FLASH_PAGE_MASK_ADDR, mask, mask_cnt);
if (res < OK) {
- LOGE("%s: mask set ERROR %08X\n", __func__, res);
+ pr_err("%s: mask set ERROR %08X\n", __func__, res);
return res;
}
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE, PAGE_SEL_ADDR,
&data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
res = fts_write_read_u8ux(FTS_CMD_HW_REG_R, HW_ADDR_SIZE,
FLASH_MULTI_PAGE_ERASE_ADDR, &data, 1, DUMMY_BYTE);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
data |= 0x80;
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE,
FLASH_MULTI_PAGE_ERASE_ADDR, &data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
data = 0x80;
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE,
FLASH_ERASE_CTRL_ADDR, &data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
res = wait_for_flash_ready(FLASH_ERASE_READY_VAL);
if (res != OK) {
- LOGE("%s: ERROR %08X\n", __func__, res | ERROR_FLASH_NOT_READY);
+ pr_err("%s: ERROR %08X\n", __func__, res | ERROR_FLASH_NOT_READY);
return res | ERROR_FLASH_NOT_READY;
/* Flash not ready within the chosen time, better exit! */
}
- LOGI("%s: Erase flash page by page DONE!\n", __func__);
+ pr_info("%s: Erase flash page by page DONE!\n", __func__);
return OK;
}
@@ -875,21 +875,21 @@ int start_flash_dma(void)
FLASH_DMA_CODE_VAL };
/* write the command to erase the flash */
- LOGI("%s: Command flash DMA ...\n", __func__);
+ pr_info("%s: Command flash DMA ...\n", __func__);
if (fts_write(cmd, 12) < OK) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_BUS_W);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_BUS_W);
return ERROR_BUS_W;
}
res = wait_for_flash_ready(FLASH_PGM_READY_VAL);
if (res != OK) {
- LOGE("%s: ERROR %08X\n", __func__, res | ERROR_FLASH_NOT_READY);
+ pr_err("%s: ERROR %08X\n", __func__, res | ERROR_FLASH_NOT_READY);
return res | ERROR_FLASH_NOT_READY;
/* Flash not ready within the chosen time, better exit! */
}
- LOGI("%s: flash DMA DONE!\n", __func__);
+ pr_info("%s: flash DMA DONE!\n", __func__);
return OK;
}
@@ -914,18 +914,18 @@ int flash_dma(u32 address, u8 *data, int size)
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE, dram_address,
data, size);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
res = fts_write_u8ux(FTS_CMD_HW_REG_W, HW_ADDR_SIZE, FLASH_DMA_ADDR,
cmd, 7);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
res = start_flash_dma();
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
return res;
@@ -956,12 +956,12 @@ int fill_flash(u32 address, u8 *data, int size)
to_write = remaining;
remaining = 0;
}
- LOGI("%s: Flash address: 0x%08X, write_count: %d bytes\n",
+ pr_info("%s: Flash address: 0x%08X, write_count: %d bytes\n",
__func__, start_address, to_write);
res = flash_dma(start_address, data + written_already,
to_write);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
@@ -989,14 +989,14 @@ int flash_section_burn(struct firmware_file fw,
res = fts_write_hdm(FRAME_BUFFER_ADDR,
fw.sections[i].sec_data, fw.sections[i].sec_size);
if (res < OK) {
- LOGE("%s: ERROR %08X\n",
+ pr_err("%s: ERROR %08X\n",
__func__, res | ERROR_FLASH_SEC_UPDATE);
return res | ERROR_FLASH_SEC_UPDATE;
}
res = fts_hdm_write_request(0);
if (res < OK) {
- LOGE("%s: ERROR %08X\n",
+ pr_err("%s: ERROR %08X\n",
__func__, res | ERROR_FLASH_SEC_UPDATE);
return res | ERROR_FLASH_SEC_UPDATE;
}
@@ -1008,7 +1008,7 @@ int flash_section_burn(struct firmware_file fw,
TIMEOUT_FW_REG_STATUS);
if (res < OK) {
res |= ERROR_FLASH_SEC_UPDATE;
- LOGE("%s: ERROR while saving to flash: %08X\n",
+ pr_err("%s: ERROR while saving to flash: %08X\n",
__func__, res);
}
}
@@ -1032,27 +1032,27 @@ int flash_burn(struct fts_ts_info *info, struct firmware_file fw,
u8 data[4] = { 0x00 };
int section_updated = 0;
- LOGI("%s: FW code version: Current FW|Bin FW: 0x%04X|0x%04X\n",
+ pr_info("%s: FW code version: Current FW|Bin FW: 0x%04X|0x%04X\n",
__func__, system_info.u16_fw_ver, fw.fw_ver);
if (!force_burn->code_update) {
if (system_info.u16_fw_ver != fw.fw_ver) {
- LOGI("%s: Different FW version: force updating the FW..\n",
+ pr_info("%s: Different FW version: force updating the FW..\n",
__func__);
force_burn->code_update = 1;
} else
- LOGD("%s: FW version is same.. No need to update FW..\n",
+ pr_debug("%s: FW version is same.. No need to update FW..\n",
__func__);
}
- LOGI("%s: flash code pages allocated: Current|Bin: %d|%d\n",
+ pr_info("%s: flash code pages allocated: Current|Bin: %d|%d\n",
__func__, (system_info.u32_flash_org_info & 0xFF),
fw.flash_code_pages);
- LOGI("%s: flash panel info pages allocated: Current|Bin: %d|%d\n",
+ pr_info("%s: flash panel info pages allocated: Current|Bin: %d|%d\n",
__func__, ((system_info.u32_flash_org_info & 0xFF00) >> 8),
fw.panel_info_pages);
if (fw.flash_code_pages > (system_info.u32_flash_org_info & 0xFF))
- LOGI("%s: WARNING!! No FW or There is change in the number of "
+ pr_info("%s: WARNING!! No FW or There is change in the number of "
"pages allocated for FW code. Flashing the new FW will "
"delete the CX/Reg/Panel config data already saved in "
"the flash..Touch may not work\n",
@@ -1061,44 +1061,44 @@ int flash_burn(struct fts_ts_info *info, struct firmware_file fw,
if (force_burn->code_update) {
res = flash_update_preset();
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__,
+ pr_err("%s: ERROR %08X\n", __func__,
res | ERROR_FLASH_CODE_UPDATE);
return res | ERROR_FLASH_CODE_UPDATE;
}
- LOGI("%s: Erasing flash..\n", __func__);
+ pr_info("%s: Erasing flash..\n", __func__);
res = flash_erase(fw.num_code_pages);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__,
+ pr_err("%s: ERROR %08X\n", __func__,
res | ERROR_FLASH_CODE_UPDATE);
return res | ERROR_FLASH_CODE_UPDATE;
}
- LOGI("%s: Updating Flash FW Code..\n", __func__);
+ pr_info("%s: Updating Flash FW Code..\n", __func__);
res = fill_flash(FLASH_START_ADDR, fw.fw_code_data,
fw.fw_code_size);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__,
+ pr_err("%s: ERROR %08X\n", __func__,
res | ERROR_FLASH_CODE_UPDATE);
return res | ERROR_FLASH_CODE_UPDATE;
}
- LOGI("%s: Flash Code update finished..\n", __func__);
+ pr_info("%s: Flash Code update finished..\n", __func__);
res = fts_system_reset(info, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__,
+ pr_err("%s: ERROR %08X\n", __func__,
res | ERROR_FLASH_CODE_UPDATE);
return res | ERROR_FLASH_CODE_UPDATE;
}
res = read_sys_info();
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__,
+ pr_err("%s: ERROR %08X\n", __func__,
res | ERROR_FLASH_CODE_UPDATE);
return res | ERROR_FLASH_CODE_UPDATE;
}
- LOGI("%s: FW version after FW code update, New FW|Bin FW: 0x%04X|0x%04X\n",
+ pr_info("%s: FW version after FW code update, New FW|Bin FW: 0x%04X|0x%04X\n",
__func__, system_info.u16_fw_ver, fw.fw_ver);
if (system_info.u16_fw_ver != fw.fw_ver) {
- LOGE("%s: Different FW version after FW code update\n",
+ pr_err("%s: Different FW version after FW code update\n",
__func__);
return ERROR_FLASH_CODE_UPDATE;
}
@@ -1106,14 +1106,14 @@ int flash_burn(struct fts_ts_info *info, struct firmware_file fw,
res = fts_read_fw_reg(SYS_ERROR_ADDR + 4, data, 4);
if (res < OK) {
- LOGE("%s: ERROR reading system error registers %08X\n",
+ pr_err("%s: ERROR reading system error registers %08X\n",
__func__, res);
return ERROR_FLASH_UPDATE;
}
- LOGI("%s: Section System Errors: reg section: %02X, ms_section: %02X, ss_section: %02X\n",
+ pr_info("%s: Section System Errors: reg section: %02X, ms_section: %02X, ss_section: %02X\n",
__func__, (data[0] & REG_CRC_MASK), (data[1] & MS_CRC_MASK),
(data[1] & SS_CRC_MASK));
- LOGI("%s: System Crc Errors: misc: %02X, ioff: %02X, pure_raw_ms: %02X\n",
+ pr_info("%s: System Crc Errors: misc: %02X, ioff: %02X, pure_raw_ms: %02X\n",
__func__, (data[0] & REG_MISC_MASK), (data[2] & IOFF_CRC_MASK),
(data[3] & RAWMS_CRC_MASK));
force_burn->section_update[0] = (force_burn->section_update[0] == 1) ?
@@ -1126,27 +1126,27 @@ int flash_burn(struct fts_ts_info *info, struct firmware_file fw,
force_burn->panel_init : (((data[0] & REG_MISC_MASK) != 0) ||
((data[2] & IOFF_CRC_MASK) != 0) ||
((data[3] & RAWMS_CRC_MASK) != 0));
- LOGI("%s: Force update flags: reg section: %02X, ms_section:%02X, "
+ pr_info("%s: Force update flags: reg section: %02X, ms_section:%02X, "
"ss_section: %02X, panel_init: %02X\n",
__func__, force_burn->section_update[0],
force_burn->section_update[1], force_burn->section_update[2],
force_burn->panel_init);
- LOGI("%s: Reg version before update, Current reg|Bin reg: 0x%04X|0x%04X\n",
+ pr_info("%s: Reg version before update, Current reg|Bin reg: 0x%04X|0x%04X\n",
__func__, system_info.u16_reg_ver, fw.sections[0].sec_ver);
if ((force_burn->section_update[0]) ||
(system_info.u16_reg_ver != fw.sections[0].sec_ver)) {
section_updated = 1;
- LOGI("%s: Updating reg section..\n", __func__);
+ pr_info("%s: Updating reg section..\n", __func__);
res = flash_section_burn(fw, FINGERTIP_FW_REG, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res | ERROR_FLASH_SEC_UPDATE;
}
- LOGI("%s: Flash Reg update done..checking for errors..\n",
+ pr_info("%s: Flash Reg update done..checking for errors..\n",
__func__);
} else
- LOGD("%s: No need to update reg section..\n", __func__);
+ pr_debug("%s: No need to update reg section..\n", __func__);
#ifdef MS_GV_METHOD
/*check cfg_afe_ver with ms_scr_gv_ver/ms_scr_lp_gv_ver
@@ -1160,29 +1160,29 @@ int flash_burn(struct fts_ts_info *info, struct firmware_file fw,
if (section_updated) {
res = fts_system_reset(info, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__,
+ pr_err("%s: ERROR %08X\n", __func__,
res | ERROR_FLASH_UPDATE);
return res | ERROR_FLASH_UPDATE;
}
res = read_sys_info();
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__,
+ pr_err("%s: ERROR %08X\n", __func__,
res | ERROR_FLASH_UPDATE);
return res | ERROR_FLASH_UPDATE;
}
res = fts_read_fw_reg(SYS_ERROR_ADDR + 4, data, 2);
if (res < OK) {
- LOGE("%s: ERROR reading system error registers %08X\n",
+ pr_err("%s: ERROR reading system error registers %08X\n",
__func__, res);
return ERROR_FLASH_UPDATE;
}
- LOGI("%s: Section System Errors After section update: reg section: "
+ pr_info("%s: Section System Errors After section update: reg section: "
"%02X, ms_section: %02X, ss_section: %02X\n",
__func__, (data[0] & REG_CRC_MASK),
(data[1] & MS_CRC_MASK), (data[1] & SS_CRC_MASK));
if (((data[0] & REG_CRC_MASK) != 0) ||
(system_info.u16_reg_ver != fw.sections[0].sec_ver)) {
- LOGE("%s: Error updating flash reg section\n",
+ pr_err("%s: Error updating flash reg section\n",
__func__);
return ERROR_FLASH_UPDATE;
}
@@ -1230,13 +1230,13 @@ int full_panel_init(struct fts_ts_info *info, struct force_update_flag *force_up
//Save MPFlag
u8 data = MP_FLAG_BOOT;
- LOGI("%s: Saving MP Flag Boot..\n", __func__);
+ pr_info("%s: Saving MP Flag Boot..\n", __func__);
fts_write_fw_reg(MP_FLAG_ADDR, &data, 1);
- LOGI("%s: Starting Init..\n", __func__);
+ pr_info("%s: Starting Init..\n", __func__);
res = fts_fw_request(PI_ADDR, 1, 1, TIMEOUT_FPI);
if (res < OK) {
- LOGE("%s: Error performing autotune.. %08X\n",
+ pr_err("%s: Error performing autotune.. %08X\n",
__func__, res | ERROR_INIT);
return res | ERROR_INIT;
}
@@ -1244,16 +1244,16 @@ int full_panel_init(struct fts_ts_info *info, struct force_update_flag *force_up
res = poll_for_event(&event_to_search, 1, read_data,
TIMEOUT_GENERAL);
if (res < OK)
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
res = fts_system_reset(info, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res | ERROR_INIT);
+ pr_err("%s: ERROR %08X\n", __func__, res | ERROR_INIT);
return res | ERROR_INIT;
}
res = read_sys_info();
if (res < OK) {
- LOGE("%s: Error reading sys info %08X\n",
+ pr_err("%s: Error reading sys info %08X\n",
__func__, res);
res |= ERROR_INIT;
}
@@ -1265,7 +1265,7 @@ int full_panel_init(struct fts_ts_info *info, struct force_update_flag *force_up
(system_info.u8_cfg_afe_ver !=
system_info.u8_ms_scr_lp_afe_ver)) {
res |= ERROR_INIT;
- LOGE("%s: config afe version doesn't match with MS CX"
+ pr_err("%s: config afe version doesn't match with MS CX"
" fields after autotune.. Touch may not work. %08X\n",
__func__, res);
}
@@ -1276,14 +1276,14 @@ int full_panel_init(struct fts_ts_info *info, struct force_update_flag *force_up
(system_info.u8_cfg_afe_ver !=
system_info.u8_ss_det_afe_ver)) {
res |= ERROR_INIT;
- LOGE("%s: config afe version doesn't match with SS CX "
+ pr_err("%s: config afe version doesn't match with SS CX "
"fields after autotune.. Touch may not work. %08X\n",
__func__, res);
}
#endif
- LOGI("%s: Init completed..\n", __func__);
+ pr_info("%s: Init completed..\n", __func__);
} else
- LOGD("%s: No need to start Init..\n", __func__);
+ pr_debug("%s: No need to start Init..\n", __func__);
return res;
}
@@ -1316,12 +1316,12 @@ int flash_update(struct fts_ts_info *info, struct force_update_flag *force_updat
}
res = read_fw_file(PATH_FILE_FW, &fw);
if (res < OK) {
- LOGE("%s: ERROR reading file %08X\n", __func__, res);
+ pr_err("%s: ERROR reading file %08X\n", __func__, res);
goto goto_end;
}
res = fts_system_reset(info, 1);
if (res < OK) {
- LOGE("%s: Cannot read Controller Ready..No FW or Connection "
+ pr_err("%s: Cannot read Controller Ready..No FW or Connection "
"issue.. ERROR %08X\n",
__func__, res);
force_update->code_update = 1;
@@ -1329,16 +1329,16 @@ int flash_update(struct fts_ts_info *info, struct force_update_flag *force_updat
res = flash_burn(info, fw, force_update);
if (res < OK) {
- LOGE("%s: ERROR flash update %08X\n", __func__, res);
+ pr_err("%s: ERROR flash update %08X\n", __func__, res);
goto goto_end;
}
res = full_panel_init(info, force_update);
if (res < OK) {
- LOGE("%s: ERROR auto tune %08X\n", __func__, res);
+ pr_err("%s: ERROR auto tune %08X\n", __func__, res);
res = OK;
force_update->panel_init = 0;
- LOGI("%s: Continue with boot up, production test is skipped "
+ pr_info("%s: Continue with boot up, production test is skipped "
"and touch may not work\n",
__func__);
goto goto_end;
diff --git a/touch/fst2/fts_lib/fts_io.c b/touch/fst2/fts_lib/fts_io.c
index 8d4bfa0..f8eb2f3 100644
--- a/touch/fst2/fts_lib/fts_io.c
+++ b/touch/fst2/fts_lib/fts_io.c
@@ -92,15 +92,15 @@ int open_channel(void *clt)
{
client = clt;
#ifndef I2C_INTERFACE
- LOGI("%s: spi_master: flags = %04X !\n", __func__,
+ pr_info("%s: spi_master: flags = %04X !\n", __func__,
((struct spi_device *)client)->master->flags);
- LOGI("%s: spi_device: max_speed = %d chip select = %02X bits_per_words = %d mode = %04X!\n",
+ pr_info("%s: spi_device: max_speed = %d chip select = %02X bits_per_words = %d mode = %04X!\n",
__func__,
((struct spi_device *)client)->max_speed_hz,
((struct spi_device *)client)->chip_select,
((struct spi_device *)client)->bits_per_word,
((struct spi_device *)client)->mode);
- LOGI("%s: openChannel: completed!\n", __func__);
+ pr_info("%s: openChannel: completed!\n", __func__);
#endif
return OK;
}
@@ -155,7 +155,7 @@ int fts_read(u8 *out_buf, int byte_to_read)
msleep(I2C_WAIT_BEFORE_RETRY);
}
if (ret < 0) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_BUS_R);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_BUS_R);
return ERROR_BUS_R;
}
return OK;
@@ -237,7 +237,7 @@ int fts_write_read(u8 *cmd, int cmd_length, u8 *out_buf, int byte_to_read)
msleep(I2C_WAIT_BEFORE_RETRY);
}
#ifdef DEBUG_LOG
- LOGI("%s: W: ", __func__);
+ pr_info("%s: W: ", __func__);
for (i = 0; i < cmd_length; i++)
printk(KERN_CONT "%02X ", cmd[i]);
printk(KERN_CONT "R: ");
@@ -246,7 +246,7 @@ int fts_write_read(u8 *cmd, int cmd_length, u8 *out_buf, int byte_to_read)
printk(KERN_CONT "\n");
#endif
if (ret < 0) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_BUS_WR);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_BUS_WR);
return ERROR_BUS_WR;
}
return OK;
@@ -296,7 +296,7 @@ int fts_write(u8 *cmd, int cmd_length)
if (client == NULL) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_BUS_O);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_BUS_O);
return ERROR_BUS_O;
}
while (retry < I2C_RETRY && ret < OK) {
@@ -310,14 +310,14 @@ int fts_write(u8 *cmd, int cmd_length)
msleep(I2C_WAIT_BEFORE_RETRY);
}
#ifdef DEBUG_LOG
- LOGI("%s: W: ", __func__);
+ pr_info("%s: W: ", __func__);
for (i = 0; i < cmd_length; i++)
printk(KERN_CONT "%02X ", cmd[i]);
printk(KERN_CONT "\n");
#endif
if (ret < 0) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_BUS_W);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_BUS_W);
return ERROR_BUS_W;
}
return OK;
@@ -345,7 +345,7 @@ int fts_write_u8ux(u8 cmd, addr_size_t addr_size, u64 address, u8 *data,
final_cmd = kmalloc(ALIGN(sizeof(u8) *
(addr_size + WRITE_CHUNK), 4), GFP_KERNEL);
if (final_cmd == NULL) {
- LOGE("%s: Error allocating memory\n", __func__);
+ pr_err("%s: Error allocating memory\n", __func__);
return ERROR_BUS_W;
}
offset = 0;
@@ -353,7 +353,7 @@ int fts_write_u8ux(u8 cmd, addr_size_t addr_size, u64 address, u8 *data,
final_cmd = kmalloc(ALIGN(sizeof(u8) *
(1 + addr_size + WRITE_CHUNK), 4), GFP_KERNEL);
if (final_cmd == NULL) {
- LOGE("%s: Error allocating memory\n", __func__);
+ pr_err("%s: Error allocating memory\n", __func__);
return ERROR_BUS_W;
}
offset = 1;
@@ -370,27 +370,27 @@ int fts_write_u8ux(u8 cmd, addr_size_t addr_size, u64 address, u8 *data,
}
if (cmd != FTS_CMD_NONE) {
final_cmd[0] = cmd;
- LOGD("%s: cmd[0] = %02X\n",
+ pr_debug("%s: cmd[0] = %02X\n",
__func__, final_cmd[0]);
}
- LOGD("%s: addr_size_t = %d\n", __func__,
+ pr_debug("%s: addr_size_t = %d\n", __func__,
addr_size);
for (i = 0; i < addr_size; i++) {
final_cmd[i + offset] =
(u8)((address >> ((addr_size - 1 - i) *
8)) & 0xFF);
- LOGD("%s: cmd[%d] = %02X\n", __func__,
+ pr_debug("%s: cmd[%d] = %02X\n", __func__,
i + offset, final_cmd[i + offset]);
}
for (i = 0; i < to_write; i++)
- LOGD("%s: data[%d] = %02X\n",
+ pr_debug("%s: data[%d] = %02X\n",
__func__, i, data[i]);
memcpy(&final_cmd[addr_size + offset], data, to_write);
if (fts_write(final_cmd, offset +
addr_size + to_write) < OK) {
- LOGD("%s: ERROR %08X\n",
+ pr_debug("%s: ERROR %08X\n",
__func__, ERROR_BUS_W);
kfree(final_cmd);
return ERROR_BUS_W;
@@ -400,7 +400,7 @@ int fts_write_u8ux(u8 cmd, addr_size_t addr_size, u64 address, u8 *data,
data += to_write;
}
} else
- LOGE("%s: address size bigger than max allowed %ld... ERROR %08X\n",
+ pr_err("%s: address size bigger than max allowed %ld... ERROR %08X\n",
__func__, sizeof(u64), ERROR_OP_NOT_ALLOW);
kfree(final_cmd);
@@ -431,7 +431,7 @@ int fts_write_read_u8ux(u8 cmd, addr_size_t addr_size, u64 address,
buff = kmalloc(ALIGN(sizeof(u8) * (READ_CHUNK + 1), 4), GFP_KERNEL);
if (buff == NULL) {
- LOGE("%s: Error allocating memory\n", __func__);
+ pr_err("%s: Error allocating memory\n", __func__);
return ERROR_BUS_WR;
}
@@ -439,7 +439,7 @@ int fts_write_read_u8ux(u8 cmd, addr_size_t addr_size, u64 address,
final_cmd = kmalloc(ALIGN(sizeof(u8) *
(addr_size + WRITE_CHUNK), 4), GFP_KERNEL);
if (final_cmd == NULL) {
- LOGE("%s: Error allocating memory\n", __func__);
+ pr_err("%s: Error allocating memory\n", __func__);
kfree(buff);
return ERROR_BUS_WR;
}
@@ -448,7 +448,7 @@ int fts_write_read_u8ux(u8 cmd, addr_size_t addr_size, u64 address,
final_cmd = kmalloc(ALIGN(sizeof(u8) *
(1 + addr_size + WRITE_CHUNK), 4), GFP_KERNEL);
if (final_cmd == NULL) {
- LOGE("%s: Error allocating memory\n", __func__);
+ pr_err("%s: Error allocating memory\n", __func__);
kfree(buff);
return ERROR_BUS_WR;
}
@@ -466,20 +466,20 @@ int fts_write_read_u8ux(u8 cmd, addr_size_t addr_size, u64 address,
if (cmd != FTS_CMD_NONE) {
final_cmd[0] = cmd;
- LOGD("%s: cmd[0] = %02X\n",
+ pr_debug("%s: cmd[0] = %02X\n",
__func__, final_cmd[0]);
}
for (i = 0; i < addr_size; i++) {
final_cmd[i + offset] =
(u8)((address >> ((addr_size - 1 - i) * 8)) & 0xFF);
- LOGD("%s: cmd[%d] = %02X\n",
+ pr_debug("%s: cmd[%d] = %02X\n",
__func__, i + offset, final_cmd[i + offset]);
}
if (has_dummy_byte == 1) {
if (fts_write_read(final_cmd, offset + addr_size,
buff, to_read + 1) < OK) {
- LOGE("%s: read error... ERROR %08X\n",
+ pr_err("%s: read error... ERROR %08X\n",
__func__, ERROR_BUS_WR);
kfree(final_cmd);
kfree(buff);
@@ -489,7 +489,7 @@ int fts_write_read_u8ux(u8 cmd, addr_size_t addr_size, u64 address,
} else {
if (fts_write_read(final_cmd, offset + addr_size, buff,
to_read) < OK) {
- LOGE("%s: read error... ERROR %08X\n",
+ pr_err("%s: read error... ERROR %08X\n",
__func__, ERROR_BUS_WR);
kfree(final_cmd);
kfree(buff);
@@ -536,7 +536,7 @@ int poll_for_event(int *event_to_search, int event_bytes, u8 *read_data,
fts_read_fw_reg(FIFO_READ_ADDR, read_data, 8) >= OK) {
/* Log of errors */
if (read_data[0] == EVT_ID_ERROR) {
- LOGE("%s: %s", __func__,
+ pr_err("%s: %s", __func__,
print_hex("ERROR EVENT = ", read_data,
FIFO_EVENT_SIZE, temp));
switch (read_data[1]) {
@@ -582,14 +582,14 @@ int poll_for_event(int *event_to_search, int event_bytes, u8 *read_data,
count_err++;
} else {
if (read_data[0] != EVT_ID_NOEVENT) {
- LOGI("%s: %s\n",
+ pr_info("%s: %s\n",
__func__, print_hex("READ EVENT = ",
read_data, FIFO_EVENT_SIZE, temp));
memset(temp, 0, 128);
}
if (read_data[0] == EVT_ID_CONTROLLER_READY &&
event_to_search[0] != EVT_ID_CONTROLLER_READY) {
- LOGI("%s: Unmanned Controller Ready Event!"
+ pr_info("%s: Unmanned Controller Ready Event!"
" Setting reset flags...\n",
__func__);
}
@@ -607,19 +607,19 @@ int poll_for_event(int *event_to_search, int event_bytes, u8 *read_data,
msleep(TIMEOUT_RESOLUTION);
}
if ((retry >= time_to_wait) && find != 1) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_TIMEOUT);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_TIMEOUT);
return ERROR_TIMEOUT;
} else if (find == 1) {
- LOGI("%s: %s\n", __func__,
+ pr_info("%s: %s\n", __func__,
print_hex("FOUND EVENT = ",
read_data, FIFO_EVENT_SIZE, temp));
memset(temp, 0, 128);
/* kfree(temp); */
- LOGD("%s: Event found in (%d iterations)! Number of errors found = %d\n",
+ pr_debug("%s: Event found in (%d iterations)! Number of errors found = %d\n",
__func__, retry, count_err);
return count_err;
} else {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_BUS_R);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_BUS_R);
return ERROR_BUS_R;
}
}
@@ -857,12 +857,12 @@ int u64_to_u8_be(u64 src, u8 *dest, int size)
int from_id_to_mask(u8 id, u8 *mask, int size)
{
if (((int)((id) / 8)) < size) {
- LOGI("%s: ID = %d Index = %d Position = %d !\n",
+ pr_info("%s: ID = %d Index = %d Position = %d !\n",
__func__, id, ((int)((id) / 8)), (id % 8));
mask[((int)((id) / 8))] |= 0x01 << (id % 8);
return OK;
}
- LOGE("%s: Bitmask too small! Impossible contain ID = %d %d>=%d! ERROR %08X\n",
+ pr_err("%s: Bitmask too small! Impossible contain ID = %d %d>=%d! ERROR %08X\n",
__func__, id, ((int)((id) / 8)), size, ERROR_OP_NOT_ALLOW);
return ERROR_OP_NOT_ALLOW;
}
@@ -897,7 +897,7 @@ int fts_write_fw_reg(u16 address, u8 *data, uint32_t length)
}
#endif
if (res < OK)
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
@@ -933,7 +933,7 @@ int fts_read_fw_reg(u16 address, u8 *read_data, uint32_t read_length)
}
#endif
if (res < OK)
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
@@ -968,7 +968,7 @@ int fts_write_hdm(u16 address, u8 *data, int length)
}
#endif
if (res < OK)
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
@@ -1004,7 +1004,7 @@ int fts_read_hdm(u16 address, u8 *read_data, uint32_t read_length)
}
#endif
if (res < OK)
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
@@ -1027,14 +1027,14 @@ int poll_fw_reg_clear_status(u16 address, u8 bit_to_check, int time_to_wait)
msleep(TIMEOUT_RESOLUTION);
res = fts_read_fw_reg(address, &data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
if ((data & (0x01 << bit_to_check)) == 0x00)
break;
}
if (i == time_to_wait) {
- LOGE("%s: FW reg status timeout.. RegVal: %02X\n", __func__, data);
+ pr_err("%s: FW reg status timeout.. RegVal: %02X\n", __func__, data);
return ERROR_TIMEOUT;
}
return OK;
@@ -1062,7 +1062,7 @@ int fts_fw_request(u16 address, u8 bit_to_set, u8 auto_clear,
* final solution when they find the root cause.
*/
u8 sense_on;
- LOGI("%s: sensing on and sense off before FPI.", __func__);
+ pr_info("%s: sensing on and sense off before FPI.", __func__);
sense_on = 0x01;
fts_write_fw_reg(0x10, &sense_on, 1);
msleep(200);
@@ -1072,13 +1072,13 @@ int fts_fw_request(u16 address, u8 bit_to_set, u8 auto_clear,
}
res = fts_read_fw_reg(address, &data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
data = data | (0x01 << bit_to_set);
res = fts_write_fw_reg(address, &data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
@@ -1086,7 +1086,7 @@ int fts_fw_request(u16 address, u8 bit_to_set, u8 auto_clear,
res = poll_fw_reg_clear_status(address, bit_to_set,
time_to_wait);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
} else
@@ -1109,7 +1109,7 @@ int fts_hdm_write_request(u8 save_to_flash)
res = fts_fw_request(HDM_WRITE_REQ_ADDR, 0, 1,
TIMEOUT_FW_REG_STATUS);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
@@ -1117,7 +1117,7 @@ int fts_hdm_write_request(u8 save_to_flash)
res = fts_fw_request(FLASH_SAVE_ADDR, 7, 1,
TIMEOUT_FW_REG_STATUS);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
}
@@ -1139,7 +1139,7 @@ int fts_request_hdm(u8 type)
res = fts_write_fw_reg(HDM_REQ_ADDR, &data, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
@@ -1147,14 +1147,14 @@ int fts_request_hdm(u8 type)
msleep(TIMEOUT_RESOLUTION);
res = fts_read_fw_reg(HDM_REQ_ADDR, &read_buff, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
if (read_buff == 0x00)
break;
}
if (i == TIMEOUT_FW_REG_STATUS) {
- LOGE("%s: HDM Request timeout.. RegVal: %02X\n", __func__, read_buff);
+ pr_err("%s: HDM Request timeout.. RegVal: %02X\n", __func__, read_buff);
return ERROR_TIMEOUT;
}
return OK;
@@ -1173,12 +1173,12 @@ int fts_read_sys_errors(void)
res = fts_read_fw_reg(SYS_ERROR_ADDR, data, 8);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
return res;
}
- LOGI("%s: system errors:\n", __func__);
+ pr_info("%s: system errors:\n", __func__);
for (; i < 8; i++)
- LOGI("%s: 0x%04X: %02X\n", __func__, SYS_ERROR_ADDR + i, data[i]);
+ pr_info("%s: 0x%04X: %02X\n", __func__, SYS_ERROR_ADDR + i, data[i]);
return res;
}
@@ -1198,20 +1198,20 @@ int read_hdm_header(uint8_t type, u8 *header)
res = fts_request_hdm(type);
if (res < OK) {
- LOGE("%s: error requesting hdm: %02X\n", __func__, type);
+ pr_err("%s: error requesting hdm: %02X\n", __func__, type);
return res;
}
res = fts_read_hdm(FRAME_BUFFER_ADDR, header, COMP_HEADER_SIZE);
if (res < OK) {
- LOGE("%s: read total cx header ERROR %08X\n",
+ pr_err("%s: read total cx header ERROR %08X\n",
__func__, res);
return res;
}
- LOGI("%s: type: %02X, cnt: %02X, len: %d words\n", __func__,
+ pr_info("%s: type: %02X, cnt: %02X, len: %d words\n", __func__,
header[0], header[1], (u16)((header[3] << 8) + header[2]));
if ((header[0] != type) && header[1] != 0)
- LOGE("%s: HDM request error %08X\n", __func__, ERROR_TIMEOUT);
+ pr_err("%s: HDM request error %08X\n", __func__, ERROR_TIMEOUT);
return res;
}
/**
@@ -1228,14 +1228,14 @@ int get_frame_data(u16 address, int size, short *frame)
u8 *data = (u8 *)kmalloc(size * sizeof(u8), GFP_KERNEL);
if (data == NULL) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_ALLOC);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_ALLOC);
return ERROR_ALLOC;
}
res = fts_write_read_u8ux(FTS_CMD_HW_REG_R, BITS_32,
FRAME_BUFFER_ADDRESS + address, data, size, DUMMY_BYTE);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_BUS_R);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_BUS_R);
kfree(data);
data = NULL;
return ERROR_BUS_R;
@@ -1267,14 +1267,14 @@ int get_ms_frame(ms_frame_type_t type, struct mutual_sense_frame *frame)
if (force_len == 0x00 || sense_len == 0x00 ||
force_len == 0xFF || sense_len == 0xFF) {
- LOGE("%s: number of channels not initialized ERROR %08X\n",
+ pr_err("%s: number of channels not initialized ERROR %08X\n",
__func__, ERROR_CH_LEN);
return ERROR_CH_LEN | ERROR_GET_FRAME;
}
frame->node_data = NULL;
- LOGI("%s: Starting to get frame %02X\n", __func__, type);
+ pr_info("%s: Starting to get frame %02X\n", __func__, type);
switch (type) {
case MS_RAW:
offset = system_info.u16_ms_scr_raw_addr;
@@ -1289,7 +1289,7 @@ int get_ms_frame(ms_frame_type_t type, struct mutual_sense_frame *frame)
offset = system_info.u16_ms_scr_baseline_addr;
break;
default:
- LOGE("%s: Invalid type ERROR %08X\n",
+ pr_err("%s: Invalid type ERROR %08X\n",
__func__, ERROR_OP_NOT_ALLOW | ERROR_GET_FRAME);
return ERROR_OP_NOT_ALLOW | ERROR_GET_FRAME;
}
@@ -1299,20 +1299,20 @@ int get_ms_frame(ms_frame_type_t type, struct mutual_sense_frame *frame)
frame->header.sense_node = sense_len;
frame->header.type = type;
- LOGI("%s: Force_len = %d Sense_len = %d Offset = %04X\n",
+ pr_info("%s: Force_len = %d Sense_len = %d Offset = %04X\n",
__func__, force_len, sense_len, offset);
frame->node_data = (short *)kmalloc(frame->node_data_size *
sizeof(short), GFP_KERNEL);
if (frame->node_data == NULL) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
return ERROR_ALLOC | ERROR_GET_FRAME;
}
res = get_frame_data(offset, frame->node_data_size *
BYTES_PER_NODE, (frame->node_data));
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_GET_FRAME_DATA);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_GET_FRAME_DATA);
kfree(frame->node_data);
frame->node_data = NULL;
return res | ERROR_GET_FRAME_DATA | ERROR_GET_FRAME;
@@ -1320,7 +1320,7 @@ int get_ms_frame(ms_frame_type_t type, struct mutual_sense_frame *frame)
/* if you want to access one node i,j,
* compute the offset like: offset = i*columns + j = > frame[i, j] */
- LOGI("%s: Frame acquired!\n", __func__);
+ pr_info("%s: Frame acquired!\n", __func__);
return OK;
/* return the number of data put inside frame */
@@ -1343,7 +1343,7 @@ int get_ss_frame(ss_frame_type_t type, struct self_sense_frame *frame)
if (force_len == 0x00 || sense_len == 0x00 ||
force_len == 0xFF || sense_len == 0xFF) {
- LOGE("%s: number of channels not initialized ERROR %08X\n",
+ pr_err("%s: number of channels not initialized ERROR %08X\n",
__func__, ERROR_CH_LEN);
return ERROR_CH_LEN | ERROR_GET_FRAME;
}
@@ -1353,7 +1353,7 @@ int get_ss_frame(ss_frame_type_t type, struct self_sense_frame *frame)
frame->header.force_node = force_len;
frame->header.sense_node = sense_len;
- LOGI("%s: Starting to get frame %02X\n", __func__, type);
+ pr_info("%s: Starting to get frame %02X\n", __func__, type);
switch (type) {
case SS_RAW:
self_force_offset = system_info.u16_ss_tch_tx_raw_addr;
@@ -1404,26 +1404,26 @@ int get_ss_frame(ss_frame_type_t type, struct self_sense_frame *frame)
0 : frame->header.sense_node;
break;
default:
- LOGE("%s: Invalid type ERROR %08X\n",
+ pr_err("%s: Invalid type ERROR %08X\n",
__func__, ERROR_OP_NOT_ALLOW | ERROR_GET_FRAME);
return ERROR_OP_NOT_ALLOW | ERROR_GET_FRAME;
}
frame->header.type = type;
- LOGI("%s: Force_len = %d Sense_len = %d Offset_force = %04X Offset_sense = %04X\n",
+ pr_info("%s: Force_len = %d Sense_len = %d Offset_force = %04X Offset_sense = %04X\n",
__func__, frame->header.force_node, frame->header.sense_node,
self_force_offset, self_sense_offset);
tmp_size = frame->header.force_node * sizeof(short);
frame->force_data = kmalloc(tmp_size, GFP_KERNEL);
if (frame->force_data == NULL) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
return ERROR_ALLOC | ERROR_GET_FRAME;
}
tmp_size = frame->header.sense_node * sizeof(short);
frame->sense_data = kmalloc(tmp_size, GFP_KERNEL);
if (frame->sense_data == NULL) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
kfree(frame->force_data);
frame->force_data = NULL;
return ERROR_ALLOC | ERROR_GET_FRAME;
@@ -1434,7 +1434,7 @@ int get_ss_frame(ss_frame_type_t type, struct self_sense_frame *frame)
frame->header.force_node *
BYTES_PER_NODE, (frame->force_data));
if (res < OK) {
- LOGE("%s: error while reading force data ERROR %08X\n",
+ pr_err("%s: error while reading force data ERROR %08X\n",
__func__, ERROR_GET_FRAME_DATA);
kfree(frame->force_data);
frame->force_data = NULL;
@@ -1449,7 +1449,7 @@ int get_ss_frame(ss_frame_type_t type, struct self_sense_frame *frame)
frame->header.sense_node *
BYTES_PER_NODE, (frame->sense_data));
if (res < OK) {
- LOGE("%s: error while reading force data ERROR %08X\n",
+ pr_err("%s: error while reading force data ERROR %08X\n",
__func__, res | ERROR_GET_FRAME_DATA | ERROR_GET_FRAME);
kfree(frame->force_data);
frame->force_data = NULL;
@@ -1458,7 +1458,7 @@ int get_ss_frame(ss_frame_type_t type, struct self_sense_frame *frame)
return res | ERROR_GET_FRAME_DATA | ERROR_GET_FRAME;
}
}
- LOGI("%s: Frame acquired!\n", __func__);
+ pr_info("%s: Frame acquired!\n", __func__);
return OK;
}
@@ -1491,7 +1491,7 @@ int get_sync_frame(u8 type, struct mutual_sense_frame *ms_frame,
res = read_hdm_header(type, header_data);
if (res < OK) {
- LOGE("%s: read hdm header error\n", __func__);
+ pr_err("%s: read hdm header error\n", __func__);
return res | ERROR_GET_FRAME;
}
ms_frame->header.force_node = ss_frame->header.force_node =
@@ -1499,31 +1499,31 @@ int get_sync_frame(u8 type, struct mutual_sense_frame *ms_frame,
ms_frame->header.sense_node = ss_frame->header.sense_node =
header_data[6];
ms_frame->header.type = type;
- LOGI("%s: tx_count: %d rx_count: %d\n", __func__,
+ pr_info("%s: tx_count: %d rx_count: %d\n", __func__,
ms_frame->header.force_node, ms_frame->header.sense_node);
if (ms_frame->header.force_node == 0x00 ||
ms_frame->header.sense_node == 0x00 ||
ms_frame->header.force_node == 0xFF ||
ms_frame->header.sense_node == 0xFF) {
- LOGE("%s: force/sense length cannot be empty.Invalid sync frame header\n",
+ pr_err("%s: force/sense length cannot be empty.Invalid sync frame header\n",
__func__);
return ERROR_CH_LEN | ERROR_GET_FRAME;
}
sync_frame_size = (header_data[5] * header_data[6] * 2) +
(header_data[5] * 2) + (header_data[6] * 2);
- LOGI("%s: sync frame size: %lld\n", __func__, (unsigned long long)sync_frame_size);
+ pr_info("%s: sync frame size: %lld\n", __func__, (unsigned long long)sync_frame_size);
sync_frame_data = (u8 *)kmalloc(sync_frame_size *
sizeof(u8), GFP_KERNEL);
if (sync_frame_data == NULL) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
return ERROR_ALLOC | ERROR_GET_FRAME;
}
address = FRAME_BUFFER_ADDR + SYNC_FRAME_HEADER_SIZE + header_data[4];
- LOGI("%s: sync frame address: 0x%04X\n", __func__, address);
+ pr_info("%s: sync frame address: 0x%04X\n", __func__, address);
res = fts_read_hdm(address, sync_frame_data, sync_frame_size);
if (res < OK) {
- LOGE("%s: sync frame read ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
+ pr_err("%s: sync frame read ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
kfree(sync_frame_data);
sync_frame_data = NULL;
return res | ERROR_ALLOC | ERROR_GET_FRAME;
@@ -1534,7 +1534,7 @@ int get_sync_frame(u8 type, struct mutual_sense_frame *ms_frame,
ms_frame->node_data = (short *)kmalloc(ms_frame->node_data_size *
sizeof(short), GFP_KERNEL);
if (ms_frame->node_data == NULL) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
res = ERROR_ALLOC | ERROR_GET_FRAME;
goto goto_end;
}
@@ -1548,14 +1548,14 @@ int get_sync_frame(u8 type, struct mutual_sense_frame *ms_frame,
ss_frame->force_data = (short *)kmalloc(ss_frame->header.force_node *
sizeof(short), GFP_KERNEL);
if (ss_frame->force_data == NULL) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
res = ERROR_ALLOC | ERROR_GET_FRAME;
goto goto_end;
}
j = 0;
offset = ss_frame->header.force_node * 2 + i;
- LOGI("%s: sync frame ss force: %d\n", __func__, i);
+ pr_info("%s: sync frame ss force: %d\n", __func__, i);
for (; i < offset; i += 2) {
ss_frame->force_data[j] =
(short)((sync_frame_data[i + 1] << 8) + sync_frame_data[i]);
@@ -1565,13 +1565,13 @@ int get_sync_frame(u8 type, struct mutual_sense_frame *ms_frame,
ss_frame->sense_data = (short *)kmalloc(ss_frame->header.sense_node *
sizeof(short), GFP_KERNEL);
if (ss_frame->sense_data == NULL) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
res = ERROR_ALLOC | ERROR_GET_FRAME;
goto goto_end;
}
offset = ss_frame->header.sense_node * 2 + i;
- LOGI("%s: sync frame ss sense: %d\n", __func__, i);
+ pr_info("%s: sync frame ss sense: %d\n", __func__, i);
j = 0;
for (; i < offset; i += 2) {
ss_frame->sense_data[j] =
@@ -1598,9 +1598,9 @@ goto_end:
kfree(ss_frame->sense_data);
ss_frame->sense_data = NULL;
}
- LOGE("%s: Getting Sync Frame FAILED! ERROR %08X!\n", __func__, res);
+ pr_err("%s: Getting Sync Frame FAILED! ERROR %08X!\n", __func__, res);
} else
- LOGI("%s: Getting Sync Frame Finished!!\n", __func__);
+ pr_info("%s: Getting Sync Frame Finished!!\n", __func__);
return res;
}
@@ -1621,43 +1621,43 @@ int get_mutual_cx_data(u8 type, struct mutual_sense_cx_data *ms_cx_data)
ms_cx_data->node_data = NULL;
if (!(type == HDM_REQ_CX_MS_TOUCH || type == HDM_REQ_CX_MS_LOW_POWER)) {
- LOGE("%s: Choose a MS type of compensation data ERROR %08X\n",
+ pr_err("%s: Choose a MS type of compensation data ERROR %08X\n",
__func__, ERROR_OP_NOT_ALLOW | ERROR_GET_CX);
return ERROR_OP_NOT_ALLOW | ERROR_GET_CX;
}
res = read_hdm_header(type, header_data);
if (res < OK) {
- LOGE("%s: read hdm header error\n", __func__);
+ pr_err("%s: read hdm header error\n", __func__);
return res | ERROR_GET_CX;
}
ms_cx_data->header.force_node = header_data[4];
ms_cx_data->header.sense_node = header_data[5];
ms_cx_data->header.type = type;
- LOGI("%s: tx_count: %d rx_count: %d\n", __func__,
+ pr_info("%s: tx_count: %d rx_count: %d\n", __func__,
ms_cx_data->header.force_node, ms_cx_data->header.sense_node);
if (ms_cx_data->header.force_node == 0x00 ||
ms_cx_data->header.sense_node == 0x00 ||
ms_cx_data->header.force_node == 0xFF ||
ms_cx_data->header.sense_node == 0xFF) {
- LOGE("%s: force/sense length cannot be empty.Invalid header\n",
+ pr_err("%s: force/sense length cannot be empty.Invalid header\n",
__func__);
return ERROR_CH_LEN | ERROR_GET_CX;
}
ms_cx_data->cx1 = header_data[8];
- LOGI("%s: cx1: %d\n", __func__, ms_cx_data->cx1);
+ pr_info("%s: cx1: %d\n", __func__, ms_cx_data->cx1);
ms_cx_data->node_data_size = ms_cx_data->header.force_node *
ms_cx_data->header.sense_node;
address = FRAME_BUFFER_ADDR + COMP_HEADER_SIZE;
- LOGI("%s: compensation data address: 0x%04X, size: %d\n",
+ pr_info("%s: compensation data address: 0x%04X, size: %d\n",
__func__, address, ms_cx_data->node_data_size);
ms_cx_data->node_data = (i8 *)kmalloc(ms_cx_data->node_data_size *
(sizeof(i8)), GFP_KERNEL);
if (ms_cx_data->node_data == NULL) {
- LOGE("%s: can not allocate node_data... ERROR %08X",
+ pr_err("%s: can not allocate node_data... ERROR %08X",
__func__, ERROR_ALLOC);
return ERROR_ALLOC;
}
@@ -1665,13 +1665,13 @@ int get_mutual_cx_data(u8 type, struct mutual_sense_cx_data *ms_cx_data)
res = fts_read_hdm(address, ms_cx_data->node_data,
ms_cx_data->node_data_size);
if (res < OK) {
- LOGE("%s: sync frame read ERROR %08X\n",
+ pr_err("%s: sync frame read ERROR %08X\n",
__func__, ERROR_ALLOC | ERROR_GET_FRAME);
kfree(ms_cx_data->node_data);
ms_cx_data->node_data = NULL;
return ERROR_ALLOC | ERROR_GET_FRAME;
}
- LOGI("%s: Read Mutual CX data done!!\n", __func__);
+ pr_info("%s: Read Mutual CX data done!!\n", __func__);
return OK;
}
@@ -1699,28 +1699,28 @@ int get_self_cx_data(u8 type, struct self_sense_cx_data *ss_cx_data)
if (!(type == HDM_REQ_CX_SS_TOUCH ||
type == HDM_REQ_CX_SS_TOUCH_IDLE)) {
- LOGE("%s: Choose a SS type of compensation data ERROR %08X\n",
+ pr_err("%s: Choose a SS type of compensation data ERROR %08X\n",
__func__, ERROR_OP_NOT_ALLOW | ERROR_GET_CX);
return ERROR_OP_NOT_ALLOW | ERROR_GET_CX;
}
res = read_hdm_header(type, header_data);
if (res < OK) {
- LOGE("%s: read hdm header error\n", __func__);
+ pr_err("%s: read hdm header error\n", __func__);
return res | ERROR_GET_CX;
}
ss_cx_data->header.force_node = header_data[4];
ss_cx_data->header.sense_node = header_data[5];
ss_cx_data->header.type = type;
- LOGI("%s: tx_count: %d rx_count: %d\n", __func__,
+ pr_info("%s: tx_count: %d rx_count: %d\n", __func__,
ss_cx_data->header.force_node,
ss_cx_data->header.sense_node);
if (ss_cx_data->header.force_node == 0x00 ||
ss_cx_data->header.sense_node == 0x00 ||
ss_cx_data->header.force_node == 0xFF ||
ss_cx_data->header.sense_node == 0xFF) {
- LOGE("%s: force/sense length cannot be empty.Invalid header\n",
+ pr_err("%s: force/sense length cannot be empty.Invalid header\n",
__func__);
return ERROR_CH_LEN | ERROR_GET_CX;
}
@@ -1732,10 +1732,10 @@ int get_self_cx_data(u8 type, struct self_sense_cx_data *ss_cx_data)
ss_cx_data->rx_max_n = header_data[13];
ss_cx_data->tx_cx1 = (i8)header_data[14];
ss_cx_data->rx_cx1 = (i8)header_data[15];
- LOGI("%s: tx_ix1 = %d rx_ix1 = %d tx_cx1 = %d rx_cx1 = %d\n",
+ pr_info("%s: tx_ix1 = %d rx_ix1 = %d tx_cx1 = %d rx_cx1 = %d\n",
__func__, ss_cx_data->tx_ix1, ss_cx_data->rx_ix1,
ss_cx_data->tx_cx1, ss_cx_data->rx_cx1);
- LOGI("%s: tx_max_n = %d rx_max_n = %d tx_ix0 = %d rx_ix0 = %d\n",
+ pr_info("%s: tx_max_n = %d rx_max_n = %d tx_ix0 = %d rx_ix0 = %d\n",
__func__, ss_cx_data->tx_max_n, ss_cx_data->rx_max_n,
ss_cx_data->tx_ix0, ss_cx_data->rx_ix0);
@@ -1743,18 +1743,18 @@ int get_self_cx_data(u8 type, struct self_sense_cx_data *ss_cx_data)
(ss_cx_data->header.sense_node * 2);
data = (u8 *)kmalloc(size * (sizeof(u8)), GFP_KERNEL);
if (data == NULL) {
- LOGE("%s: ERROR %08X\n", __func__,
+ pr_err("%s: ERROR %08X\n", __func__,
ERROR_ALLOC | ERROR_GET_FRAME);
return ERROR_ALLOC | ERROR_GET_CX;
}
address = FRAME_BUFFER_ADDR + COMP_HEADER_SIZE;
- LOGI("%s: compensation data address: 0x%04X, size: %d\n",
+ pr_info("%s: compensation data address: 0x%04X, size: %d\n",
__func__, address, size);
res = fts_read_hdm(address, data, size);
if (res < OK) {
- LOGE("%s: sync frame read ERROR %08X\n",
+ pr_err("%s: sync frame read ERROR %08X\n",
__func__, ERROR_ALLOC | ERROR_GET_FRAME);
kfree(data);
data = NULL;
@@ -1764,7 +1764,7 @@ int get_self_cx_data(u8 type, struct self_sense_cx_data *ss_cx_data)
ss_cx_data->ix2_tx = (u8 *)kmalloc(ss_cx_data->header.force_node *
(sizeof(i8)), GFP_KERNEL);
if (ss_cx_data->ix2_tx == NULL) {
- LOGE("%s: can not allocate node_data... ERROR %08X",
+ pr_err("%s: can not allocate node_data... ERROR %08X",
__func__, ERROR_ALLOC);
res = ERROR_ALLOC | ERROR_GET_CX;
goto goto_end;
@@ -1772,7 +1772,7 @@ int get_self_cx_data(u8 type, struct self_sense_cx_data *ss_cx_data)
ss_cx_data->ix2_rx = (u8 *)kmalloc(ss_cx_data->header.sense_node *
(sizeof(i8)), GFP_KERNEL);
if (ss_cx_data->ix2_rx == NULL) {
- LOGE("%s: can not allocate node_data... ERROR %08X",
+ pr_err("%s: can not allocate node_data... ERROR %08X",
__func__, ERROR_ALLOC);
res = ERROR_ALLOC | ERROR_GET_CX;
goto goto_end;
@@ -1780,7 +1780,7 @@ int get_self_cx_data(u8 type, struct self_sense_cx_data *ss_cx_data)
ss_cx_data->cx2_tx = (i8 *)kmalloc(ss_cx_data->header.force_node *
(sizeof(i8)), GFP_KERNEL);
if (ss_cx_data->cx2_tx == NULL) {
- LOGE("%s: can not allocate node_data... ERROR %08X",
+ pr_err("%s: can not allocate node_data... ERROR %08X",
__func__, ERROR_ALLOC);
res = ERROR_ALLOC | ERROR_GET_CX;
goto goto_end;
@@ -1788,7 +1788,7 @@ int get_self_cx_data(u8 type, struct self_sense_cx_data *ss_cx_data)
ss_cx_data->cx2_rx = (i8 *)kmalloc(ss_cx_data->header.sense_node *
(sizeof(i8)), GFP_KERNEL);
if (ss_cx_data->cx2_rx == NULL) {
- LOGE("%s: can not allocate node_data... ERROR %08X",
+ pr_err("%s: can not allocate node_data... ERROR %08X",
__func__, ERROR_ALLOC);
res = ERROR_ALLOC | ERROR_GET_CX;
goto goto_end;
@@ -1825,7 +1825,7 @@ goto_end:
ss_cx_data->cx2_rx = NULL;
}
} else
- LOGI("%s: Read Self CX data done!!\n", __func__);
+ pr_info("%s: Read Self CX data done!!\n", __func__);
return res;
@@ -1850,28 +1850,28 @@ int get_mutual_total_cx_data(u8 type, struct mutual_total_cx_data *tot_ms_cx_dat
tot_ms_cx_data->node_data = NULL;
if (!(type == HDM_REQ_TOT_CX_MS_TOUCH ||
type == HDM_REQ_TOT_CX_MS_LOW_POWER)) {
- LOGE("%s: Choose a MS total type of compensation data ERROR %08X\n",
+ pr_err("%s: Choose a MS total type of compensation data ERROR %08X\n",
__func__, ERROR_OP_NOT_ALLOW);
return ERROR_OP_NOT_ALLOW;
}
res = read_hdm_header(type, header_data);
if (res < OK) {
- LOGE("%s: read hdm header error\n", __func__);
+ pr_err("%s: read hdm header error\n", __func__);
return res | ERROR_GET_CX;
}
tot_ms_cx_data->header.force_node = header_data[4];
tot_ms_cx_data->header.sense_node = header_data[5];
tot_ms_cx_data->header.type = type;
- LOGI("%s: tx_count: %d rx_count: %d\n", __func__,
+ pr_info("%s: tx_count: %d rx_count: %d\n", __func__,
tot_ms_cx_data->header.force_node,
tot_ms_cx_data->header.sense_node);
if (tot_ms_cx_data->header.force_node == 0x00 ||
tot_ms_cx_data->header.sense_node == 0x00 ||
tot_ms_cx_data->header.force_node == 0xFF ||
tot_ms_cx_data->header.sense_node == 0xFF) {
- LOGE("%s: force/sense length cannot be empty.. Invalid sysn frame header\n",
+ pr_err("%s: force/sense length cannot be empty.. Invalid sysn frame header\n",
__func__);
return ERROR_CH_LEN | ERROR_GET_CX;
}
@@ -1879,19 +1879,19 @@ int get_mutual_total_cx_data(u8 type, struct mutual_total_cx_data *tot_ms_cx_dat
size = tot_ms_cx_data->header.force_node *
tot_ms_cx_data->header.sense_node * 2;
address = FRAME_BUFFER_ADDR + COMP_HEADER_SIZE;
- LOGI("%s: compensation data address: 0x%04X, size: %d\n",
+ pr_info("%s: compensation data address: 0x%04X, size: %d\n",
__func__, address, size);
data = (u8 *)kmalloc(size * sizeof(u8), GFP_KERNEL);
if (data == NULL) {
- LOGE("%s: can not allocate node_data... ERROR %08X",
+ pr_err("%s: can not allocate node_data... ERROR %08X",
__func__, ERROR_ALLOC);
return ERROR_ALLOC | ERROR_GET_CX;
}
res = fts_read_hdm(address, data, size);
if (res < OK) {
- LOGE("%s: Total Mutual CX read ERROR %08X\n", __func__,
+ pr_err("%s: Total Mutual CX read ERROR %08X\n", __func__,
ERROR_ALLOC | ERROR_GET_FRAME);
kfree(tot_ms_cx_data->node_data);
tot_ms_cx_data->node_data = NULL;
@@ -1903,7 +1903,7 @@ int get_mutual_total_cx_data(u8 type, struct mutual_total_cx_data *tot_ms_cx_dat
tot_ms_cx_data->node_data_size *
(sizeof(short)), GFP_KERNEL);
if (tot_ms_cx_data->node_data == NULL) {
- LOGE("%s: can not allocate node_data... ERROR %08X",
+ pr_err("%s: can not allocate node_data... ERROR %08X",
__func__, ERROR_ALLOC);
return ERROR_ALLOC;
}
@@ -1914,7 +1914,7 @@ int get_mutual_total_cx_data(u8 type, struct mutual_total_cx_data *tot_ms_cx_dat
j++;
}
- LOGI("%s: Read Mutual Total CX data done!!\n", __func__);
+ pr_info("%s: Read Mutual Total CX data done!!\n", __func__);
return OK;
}
@@ -1940,28 +1940,28 @@ int get_self_total_cx_data(u8 type, struct self_total_cx_data *tot_ss_cx_data)
if (!(type == HDM_REQ_TOT_IX_SS_TOUCH ||
type == HDM_REQ_TOT_IX_SS_TOUCH_IDLE)) {
- LOGE("%s: Choose a SS type of compensation data ERROR %08X\n",
+ pr_err("%s: Choose a SS type of compensation data ERROR %08X\n",
__func__, ERROR_OP_NOT_ALLOW | ERROR_GET_CX);
return ERROR_OP_NOT_ALLOW | ERROR_GET_CX;
}
res = read_hdm_header(type, header_data);
if (res < OK) {
- LOGE("%s: read hdm header error\n", __func__);
+ pr_err("%s: read hdm header error\n", __func__);
return res | ERROR_GET_CX;
}
tot_ss_cx_data->header.force_node = header_data[4];
tot_ss_cx_data->header.sense_node = header_data[5];
tot_ss_cx_data->header.type = type;
- LOGI("%s: tx_count: %d rx_count: %d\n", __func__,
+ pr_info("%s: tx_count: %d rx_count: %d\n", __func__,
tot_ss_cx_data->header.force_node,
tot_ss_cx_data->header.sense_node);
if (tot_ss_cx_data->header.force_node == 0x00 ||
tot_ss_cx_data->header.sense_node == 0x00 ||
tot_ss_cx_data->header.force_node == 0xFF ||
tot_ss_cx_data->header.sense_node == 0xFF) {
- LOGE("%s: force/sense length cannot be empty.. Invalid sysn frame header\n",
+ pr_err("%s: force/sense length cannot be empty.. Invalid sysn frame header\n",
__func__);
return ERROR_CH_LEN | ERROR_GET_CX;
}
@@ -1970,17 +1970,17 @@ int get_self_total_cx_data(u8 type, struct self_total_cx_data *tot_ss_cx_data)
(tot_ss_cx_data->header.sense_node * 2);
data = (u8 *)kmalloc(size * (sizeof(u8)), GFP_KERNEL);
if (data == NULL) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_ALLOC | ERROR_GET_FRAME);
return ERROR_ALLOC | ERROR_GET_CX;
}
address = FRAME_BUFFER_ADDR + COMP_HEADER_SIZE;
- LOGI("%s: compensation data address: 0x%04X, size: %d\n",
+ pr_info("%s: compensation data address: 0x%04X, size: %d\n",
__func__, address, size);
res = fts_read_hdm(address, data, size);
if (res < OK) {
- LOGE("%s: self cx read ERROR %08X\n", __func__,
+ pr_err("%s: self cx read ERROR %08X\n", __func__,
ERROR_ALLOC | ERROR_GET_FRAME);
kfree(data);
data = NULL;
@@ -1990,7 +1990,7 @@ int get_self_total_cx_data(u8 type, struct self_total_cx_data *tot_ss_cx_data)
tot_ss_cx_data->ix_tx = (u16 *)kmalloc(tot_ss_cx_data->header.force_node
* (sizeof(u16)), GFP_KERNEL);
if (tot_ss_cx_data->ix_tx == NULL) {
- LOGE("%s: can not allocate node_data... ERROR %08X",
+ pr_err("%s: can not allocate node_data... ERROR %08X",
__func__, ERROR_ALLOC);
res = ERROR_ALLOC | ERROR_GET_CX;
goto goto_end;
@@ -1998,7 +1998,7 @@ int get_self_total_cx_data(u8 type, struct self_total_cx_data *tot_ss_cx_data)
tot_ss_cx_data->ix_rx = (u16 *)kmalloc(tot_ss_cx_data->header.sense_node
* (sizeof(u16)), GFP_KERNEL);
if (tot_ss_cx_data->ix_rx == NULL) {
- LOGE("%s: can not allocate node_data... ERROR %08X",
+ pr_err("%s: can not allocate node_data... ERROR %08X",
__func__, ERROR_ALLOC);
res = ERROR_ALLOC | ERROR_GET_CX;
goto goto_end;
@@ -2030,7 +2030,7 @@ goto_end:
tot_ss_cx_data->ix_rx = NULL;
}
} else
- LOGI("%s: Read Self CX data done!!\n", __func__);
+ pr_info("%s: Read Self CX data done!!\n", __func__);
return res;
diff --git a/touch/fst2/fts_lib/fts_test.c b/touch/fst2/fts_lib/fts_test.c
index 57b95b7..c3540cd 100644
--- a/touch/fst2/fts_lib/fts_test.c
+++ b/touch/fst2/fts_lib/fts_test.c
@@ -90,13 +90,13 @@ int compute_adj_horiz_total(short *data, int row, int column, u16 **result)
int size = row * (column - 1);
if (column < 2) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_OP_NOT_ALLOW);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_OP_NOT_ALLOW);
return ERROR_OP_NOT_ALLOW;
}
*result = (u16 *)kmalloc(size * sizeof(u16), GFP_KERNEL);
if (*result == NULL) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_ALLOC);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_ALLOC);
return ERROR_ALLOC;
}
@@ -128,13 +128,13 @@ int compute_adj_vert_total(short *data, int row, int column, u16 **result)
int size = (row - 1) * (column);
if (row < 2) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_OP_NOT_ALLOW);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_OP_NOT_ALLOW);
return ERROR_OP_NOT_ALLOW;
}
*result = (u16 *)kmalloc(size * sizeof(u16), GFP_KERNEL);
if (*result == NULL) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_ALLOC);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_ALLOC);
return ERROR_ALLOC;
}
@@ -166,7 +166,7 @@ int check_limits_map_adj_total(u16 *data, int row, int column, int *max)
for (i = 0; i < row; i++) {
for (j = 0; j < column; j++) {
if (data[i * column + j] > max[i * column + j]) {
- LOGE("%s: Node[%d,%d] = %d exceed limit > %d\n",
+ pr_err("%s: Node[%d,%d] = %d exceed limit > %d\n",
__func__, i, j, data[i * column + j], max[i *
column + j]);
count++;
@@ -200,7 +200,7 @@ int check_limits_map_total(short *data, int row, int column,
for (j = 0; j < column; j++) {
if (data[i * column + j] < min[i * column + j] ||
data[i * column + j] > max[i * column + j]) {
- LOGI("%s: Node[%d,%d] = %d exceed limit [%d, %d]\n",
+ pr_info("%s: Node[%d,%d] = %d exceed limit [%d, %d]\n",
__func__, i, j, data[i * column + j],
min[i *
column
@@ -227,7 +227,7 @@ void print_frame_i8(char *label, i8 **matrix, int row, int column)
int buff_len, index;
char *buff;
- LOGI("%s\n", label);
+ pr_info("%s\n", label);
if (matrix == NULL)
return;
@@ -235,7 +235,7 @@ void print_frame_i8(char *label, i8 **matrix, int row, int column)
buff_len = (4 + 1) * column + 1; /* -128 str len: 4 */
buff = kzalloc(buff_len, GFP_KERNEL);
if (buff == NULL) {
- LOGE("%s: fail to allocate buffer\n", __func__);
+ pr_err("%s: fail to allocate buffer\n", __func__);
return;
}
@@ -246,7 +246,7 @@ void print_frame_i8(char *label, i8 **matrix, int row, int column)
for (j = 0; j < column; j++)
index += scnprintf(buff + index, buff_len - index,
"%d ", matrix[i][j]);
- LOGI("%s\n", buff);
+ pr_info("%s\n", buff);
kfree(matrix[i]);
}
kfree(matrix);
@@ -267,7 +267,7 @@ void print_frame_short(char *label, short **matrix, int row, int column)
int buff_len, index;
char *buff;
- LOGI("%s\n", label);
+ pr_info("%s\n", label);
if (matrix == NULL)
return;
@@ -275,7 +275,7 @@ void print_frame_short(char *label, short **matrix, int row, int column)
buff_len = (6 + 1) * column + 1; /* -32768 str len: 6 */
buff = kzalloc(buff_len, GFP_KERNEL);
if (buff == NULL) {
- LOGE("%s: fail to allocate buffer\n", __func__);
+ pr_err("%s: fail to allocate buffer\n", __func__);
return;
}
@@ -286,7 +286,7 @@ void print_frame_short(char *label, short **matrix, int row, int column)
for (j = 0; j < column; j++)
index += scnprintf(buff + index, buff_len - index,
"%d ", matrix[i][j]);
- LOGI("%s\n", buff);
+ pr_info("%s\n", buff);
kfree(matrix[i]);
}
kfree(matrix);
@@ -307,7 +307,7 @@ void print_frame_u16(char *label, u16 **matrix, int row, int column)
int buff_len, index;
char *buff;
- LOGI("%s\n", label);
+ pr_info("%s\n", label);
if (matrix == NULL)
return;
@@ -315,7 +315,7 @@ void print_frame_u16(char *label, u16 **matrix, int row, int column)
buff_len = (5 + 1) * column + 1; /* 65535 str len: 5 */
buff = kzalloc(buff_len, GFP_KERNEL);
if (buff == NULL) {
- LOGE("%s: fail to allocate buffer\n", __func__);
+ pr_err("%s: fail to allocate buffer\n", __func__);
return;
}
@@ -326,7 +326,7 @@ void print_frame_u16(char *label, u16 **matrix, int row, int column)
for (j = 0; j < column; j++)
index += scnprintf(buff + index, buff_len - index,
"%d ", matrix[i][j]);
- LOGI("%s\n", buff);
+ pr_info("%s\n", buff);
kfree(matrix[i]);
}
kfree(matrix);
@@ -463,11 +463,11 @@ int get_limits_file(char *path, struct limit_file *file)
struct device *dev = NULL;
int fd = -1;
- LOGI("%s: Get Limits File starting... %s\n", __func__, path);
+ pr_info("%s: Get Limits File starting... %s\n", __func__, path);
if (file->data != NULL) {/* to avoid memory leak on consecutive call of
* the function with the same pointer */
- LOGD("%s: Pointer to Limits Data already contains something..."
+ pr_debug("%s: Pointer to Limits Data already contains something..."
"freeing its content!\n", __func__);
kfree(file->data);
file->data = NULL;
@@ -477,7 +477,7 @@ int get_limits_file(char *path, struct limit_file *file)
strlcpy(file->name, path, MAX_LIMIT_FILE_NAME);
if (strncmp(path, "NULL", 4) == 0) {
#ifdef LIMITS_H_FILE
- LOGI("%s: Loading Limits File from .h!\n", __func__);
+ pr_info("%s: Loading Limits File from .h!\n", __func__);
file->size = LIMITS_SIZE_NAME;
file->data = (char *)kmalloc((file->size) * sizeof(char),
GFP_KERNEL);
@@ -486,22 +486,22 @@ int get_limits_file(char *path, struct limit_file *file)
file->size);
return OK;
} else {
- LOGE("%s: Error while allocating data... ERROR %08X\n",
+ pr_err("%s: Error while allocating data... ERROR %08X\n",
__func__, path, ERROR_ALLOC);
return ERROR_ALLOC;
}
#else
- LOGE("%s: limit file path NULL... ERROR %08X\n",
+ pr_err("%s: limit file path NULL... ERROR %08X\n",
__func__, ERROR_FILE_NOT_FOUND);
return ERROR_FILE_NOT_FOUND;
#endif
} else {
dev = get_dev();
if (dev != NULL) {
- LOGI("%s: Loading Limits File from .csv!\n", __func__);
+ pr_info("%s: Loading Limits File from .csv!\n", __func__);
fd = request_firmware(&fw, path, dev);
if (fd == 0) {
- LOGI("%s: Start to copy %s...\n",
+ pr_info("%s: Start to copy %s...\n",
__func__, path);
file->size = fw->size;
file->data = (char *)kmalloc((file->size) *
@@ -510,21 +510,21 @@ int get_limits_file(char *path, struct limit_file *file)
if (file->data != NULL) {
memcpy(file->data, (char *)fw->data,
file->size);
- LOGD("%s: Limit file Size = %d\n",
+ pr_debug("%s: Limit file Size = %d\n",
__func__, file->size);
release_firmware(fw);
return OK;
}
- LOGE("%s: Error while allocating data... ERROR %08X\n",
+ pr_err("%s: Error while allocating data... ERROR %08X\n",
__func__, ERROR_ALLOC);
release_firmware(fw);
return ERROR_ALLOC;
}
- LOGE("%s: Request the file %s failed... ERROR %08X\n",
+ pr_err("%s: Request the file %s failed... ERROR %08X\n",
__func__, path, ERROR_FILE_NOT_FOUND);
return ERROR_FILE_NOT_FOUND;
}
- LOGE("%s: Error while getting the device ERROR %08X\n",
+ pr_err("%s: Error while getting the device ERROR %08X\n",
__func__, ERROR_FILE_READ);
return ERROR_FILE_READ;
}
@@ -539,19 +539,19 @@ int get_limits_file(char *path, struct limit_file *file)
*/
int free_limits_file(struct limit_file *file)
{
- LOGD("%s: Freeing Limit File ...\n", __func__);
+ pr_debug("%s: Freeing Limit File ...\n", __func__);
if (file != NULL) {
if (file->data != NULL) {
kfree(file->data);
file->data = NULL;
} else
- LOGD("%s: Limit File was already freed!\n",
+ pr_debug("%s: Limit File was already freed!\n",
__func__);
file->size = 0;
strlcpy(file->name, " ", MAX_LIMIT_FILE_NAME);
return OK;
}
- LOGE("%s: Passed a NULL argument! ERROR %08X\n",
+ pr_err("%s: Passed a NULL argument! ERROR %08X\n",
__func__, ERROR_OP_NOT_ALLOW);
return ERROR_OP_NOT_ALLOW;
}
@@ -604,23 +604,23 @@ int parse_production_test_limits(char *path, struct limit_file *file,
if (file == NULL || strcmp(path, file->name) != 0 || file->size == 0) {
- LOGI("%s: No limit File data passed...try to get them from the system!\n",
+ pr_info("%s: No limit File data passed...try to get them from the system!\n",
__func__);
ret = get_limits_file(LIMITS_FILE, &limit_file);
if (ret < OK) {
- LOGE("%s: ERROR %08X\n",
+ pr_err("%s: ERROR %08X\n",
__func__, ERROR_FILE_NOT_FOUND);
return ERROR_FILE_NOT_FOUND;
}
size = limit_file.size;
data_file = limit_file.data;
} else {
- LOGI("%s: Limit File data passed as arguments!\n", __func__);
+ pr_info("%s: Limit File data passed as arguments!\n", __func__);
size = file->size;
data_file = file->data;
}
- LOGI("%s: The size of the limits file is %d bytes...\n",
+ pr_info("%s: The size of the limits file is %d bytes...\n",
__func__, size);
while (find == 0) {
@@ -633,7 +633,7 @@ int parse_production_test_limits(char *path, struct limit_file *file,
if (line[0] == '*') {
line2 = kstrdup(line, GFP_KERNEL);
if (line2 == NULL) {
- LOGE("%s: kstrdup ERROR %08X\n",
+ pr_err("%s: kstrdup ERROR %08X\n",
__func__, ERROR_ALLOC);
ret = ERROR_ALLOC;
goto END;
@@ -646,10 +646,10 @@ int parse_production_test_limits(char *path, struct limit_file *file,
token = strsep(&line2, ",");
if (token != NULL) {
if (sscanf(token, "%d", row) == 1)
- LOGD("%s: Row = %d\n",
+ pr_debug("%s: Row = %d\n",
__func__, *row);
else {
- LOGD("%s: ERROR while reading "
+ pr_debug("%s: ERROR while reading "
"the row value!ERROR %08X\n",
__func__, ERROR_FILE_PARSE);
ret = ERROR_FILE_PARSE;
@@ -657,7 +657,7 @@ int parse_production_test_limits(char *path, struct limit_file *file,
}
} else {
- LOGE("%s: Row ERROR %08X\n",
+ pr_err("%s: Row ERROR %08X\n",
__func__, ERROR_FILE_PARSE);
ret = ERROR_FILE_PARSE;
goto END;
@@ -665,10 +665,10 @@ int parse_production_test_limits(char *path, struct limit_file *file,
token = strsep(&line2, ",");
if (token != NULL) {
if (sscanf(token, "%d", column) == 1)
- LOGD("%s: Column = %d\n",
+ pr_debug("%s: Column = %d\n",
__func__, *column);
else {
- LOGD("%s: ERROR while reading "
+ pr_debug("%s: ERROR while reading "
"the column value!ERROR %08X\n",
__func__, ERROR_FILE_PARSE);
ret = ERROR_FILE_PARSE;
@@ -676,7 +676,7 @@ int parse_production_test_limits(char *path, struct limit_file *file,
}
} else {
- LOGE("%s: Column ERROR %08X\n",
+ pr_err("%s: Column ERROR %08X\n",
__func__, ERROR_FILE_PARSE);
ret = ERROR_FILE_PARSE;
goto END;
@@ -688,7 +688,7 @@ int parse_production_test_limits(char *path, struct limit_file *file,
sizeof(int), GFP_KERNEL);
j = 0;
if (*data == NULL) {
- LOGE("%s: ERROR %08X\n",
+ pr_err("%s: ERROR %08X\n",
__func__, ERROR_ALLOC);
ret = ERROR_ALLOC;
goto END;
@@ -697,7 +697,7 @@ int parse_production_test_limits(char *path, struct limit_file *file,
for (i = 0; i < *row; i++) {
if (read_line(&data_file[pointer], line,
size - pointer, &n) < 0) {
- LOGE("%s: read_line ERROR %08X\n",
+ pr_err("%s: read_line ERROR %08X\n",
__func__,
ERROR_FILE_READ);
ret = ERROR_FILE_READ;
@@ -706,7 +706,7 @@ int parse_production_test_limits(char *path, struct limit_file *file,
pointer += n;
line2 = kstrdup(line, GFP_KERNEL);
if (line2 == NULL) {
- LOGE("%s: kstrdup ERROR %08X\n",
+ pr_err("%s: kstrdup ERROR %08X\n",
__func__, ERROR_ALLOC);
ret = ERROR_ALLOC;
goto END;
@@ -726,11 +726,11 @@ int parse_production_test_limits(char *path, struct limit_file *file,
buf = NULL;
}
if (j == ((*row) * (*column))) {
- LOGI("%s: READ DONE!\n", __func__);
+ pr_info("%s: READ DONE!\n", __func__);
ret = OK;
goto END;
}
- LOGE("%s: ERROR %08X, j=%d is not equal to %d!\n",
+ pr_err("%s: ERROR %08X, j=%d is not equal to %d!\n",
__func__, ERROR_FILE_PARSE, j, ((*row) * (*column)));
ret = ERROR_FILE_PARSE;
goto END;
@@ -739,7 +739,7 @@ int parse_production_test_limits(char *path, struct limit_file *file,
buf = NULL;
}
}
- LOGE("%s: Test Label not found ERROR: %08X\n", __func__,
+ pr_err("%s: Test Label not found ERROR: %08X\n", __func__,
ERROR_LABEL_NOT_FOUND);
ret = ERROR_LABEL_NOT_FOUND;
END:
@@ -801,18 +801,18 @@ int fts_production_test_ito(struct fts_ts_info *info,
ms_raw_frame.node_data = NULL;
- LOGI("%s: ITO Production test is starting...\n", __func__);
+ pr_info("%s: ITO Production test is starting...\n", __func__);
if (tests->mutual_ito_raw || tests->mutual_ito_raw_adj) {
res = fts_system_reset(info, 1);
if (res < OK) {
res |= ERROR_PROD_TEST_ITO;
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
goto goto_error;
}
res = fts_write_fw_reg(ITO_TRIGGER_ADDR, sett, 2);
if (res < OK) {
res |= ERROR_PROD_TEST_ITO;
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
goto goto_error;
}
@@ -820,13 +820,13 @@ int fts_production_test_ito(struct fts_ts_info *info,
res = fts_read_fw_reg(ITO_TRIGGER_ADDR, data, 2);
if (res < OK) {
res |= ERROR_PROD_TEST_ITO;
- LOGE("%s: ERROR %08X\n", __func__, res);
+ pr_err("%s: ERROR %08X\n", __func__, res);
goto goto_error;
}
res = (data[0] & 0xFF) || (data[1] & 0x07);
- LOGI("%s: Status = %d\n", __func__, res);
+ pr_info("%s: Status = %d\n", __func__, res);
if (!res) {
- LOGI("%s: ITO Command finished..\n", __func__);
+ pr_info("%s: ITO Command finished..\n", __func__);
break;
}
@@ -835,17 +835,17 @@ int fts_production_test_ito(struct fts_ts_info *info,
res = poll_for_event(&event_to_search, 1, data, 8);
if (res < OK) {
res |= ERROR_PROD_TEST_ITO;
- LOGE("%s: ITO failed... ERROR %08X\n",
+ pr_err("%s: ITO failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
- LOGI("%s: ITO Command = OK!\n", __func__);
- LOGI("%s: Collecting MS Raw data...\n", __func__);
+ pr_info("%s: ITO Command = OK!\n", __func__);
+ pr_info("%s: Collecting MS Raw data...\n", __func__);
res = get_ms_frame(MS_RAW, &ms_raw_frame);
if (res < OK) {
res |= ERROR_PROD_TEST_ITO;
- LOGE("%s: failed... ERROR %08X\n", __func__, res);
+ pr_err("%s: failed... ERROR %08X\n", __func__, res);
goto goto_error;
}
@@ -859,9 +859,9 @@ int fts_production_test_ito(struct fts_ts_info *info,
ms_raw_frame.header.force_node,
ms_raw_frame.header.sense_node);
if (tests->mutual_ito_raw_adj) {
- LOGI("%s: MS RAW ITO ADJ TEST:\n", __func__);
+ pr_info("%s: MS RAW ITO ADJ TEST:\n", __func__);
- LOGI("%s: MS RAW ITO ADJ HORIZONTAL TEST:\n",
+ pr_info("%s: MS RAW ITO ADJ HORIZONTAL TEST:\n",
__func__);
res = compute_adj_horiz_total(ms_raw_frame.node_data,
ms_raw_frame.header.force_node,
@@ -869,7 +869,7 @@ int fts_production_test_ito(struct fts_ts_info *info,
&adj);
if (res < OK) {
res |= ERROR_PROD_TEST_ITO;
- LOGE("%s: compute adj Horizontal failed... ERROR %08X\n",
+ pr_err("%s: compute adj Horizontal failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -882,7 +882,7 @@ int fts_production_test_ito(struct fts_ts_info *info,
(trows != ms_raw_frame.header.force_node ||
tcolumns != ms_raw_frame.header.sense_node - 1)) {
res |= ERROR_PROD_TEST_ITO;
- LOGE("%s: MS_RAW_ITO_ADJH limit parse failed... ERROR %08X\n",
+ pr_err("%s: MS_RAW_ITO_ADJH limit parse failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -893,16 +893,16 @@ int fts_production_test_ito(struct fts_ts_info *info,
ms_raw_frame.header.sense_node - 1,
thresholds);
if (res != OK) {
- LOGE("%s: check limit adj horiz MS RAW ITO ADJH "
+ pr_err("%s: check limit adj horiz MS RAW ITO ADJH "
"failed...ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: MS RAW ITO ADJ HORIZONTAL TEST:.................FAIL\n\n",
+ pr_err("%s: MS RAW ITO ADJ HORIZONTAL TEST:.................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_ITO |
ERROR_PROD_TEST_CHECK_FAIL);
goto goto_error;
} else
- LOGI("%s: MS RAW ITO ADJ HORIZONTAL TEST:.................OK\n",
+ pr_info("%s: MS RAW ITO ADJ HORIZONTAL TEST:.................OK\n",
__func__);
kfree(thresholds);
@@ -911,14 +911,14 @@ int fts_production_test_ito(struct fts_ts_info *info,
kfree(adj);
adj = NULL;
- LOGI("%s: MS RAW ITO ADJ VERTICAL TEST:\n", __func__);
+ pr_info("%s: MS RAW ITO ADJ VERTICAL TEST:\n", __func__);
res = compute_adj_vert_total(ms_raw_frame.node_data,
ms_raw_frame.header.force_node,
ms_raw_frame.header.sense_node,
&adj);
if (res < OK) {
res |= ERROR_PROD_TEST_ITO;
- LOGE("%s: compute adj vert failed... ERROR %08X\n",
+ pr_err("%s: compute adj vert failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -930,7 +930,7 @@ int fts_production_test_ito(struct fts_ts_info *info,
(trows != ms_raw_frame.header.force_node - 1 ||
tcolumns != ms_raw_frame.header.sense_node)) {
res |= ERROR_PROD_TEST_ITO;
- LOGE("%s: MS_RAW_ITO_ADJV limit parse failed... ERROR %08X\n",
+ pr_err("%s: MS_RAW_ITO_ADJV limit parse failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -941,16 +941,16 @@ int fts_production_test_ito(struct fts_ts_info *info,
1, ms_raw_frame.header.sense_node,
thresholds);
if (res != OK) {
- LOGE("%s: check limits adj MS RAW ITO ADJV "
+ pr_err("%s: check limits adj MS RAW ITO ADJV "
"failed...ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: MS RAW ITO ADJ VERTICAL TEST:.................FAIL\n\n",
+ pr_err("%s: MS RAW ITO ADJ VERTICAL TEST:.................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_ITO |
ERROR_PROD_TEST_CHECK_FAIL);
goto goto_error;
} else
- LOGI("%s: MS RAW ITO ADJ VERTICAL TEST:.................OK\n",
+ pr_info("%s: MS RAW ITO ADJ VERTICAL TEST:.................OK\n",
__func__);
kfree(thresholds);
@@ -959,10 +959,10 @@ int fts_production_test_ito(struct fts_ts_info *info,
kfree(adj);
adj = NULL;
} else
- LOGI("%s: MS RAW ITO ADJ TEST SKIPPED:\n", __func__);
+ pr_info("%s: MS RAW ITO ADJ TEST SKIPPED:\n", __func__);
if (tests->mutual_ito_raw) {
- LOGI("%s: MS RAW ITO MIN MAX TEST:\n", __func__);
+ pr_info("%s: MS RAW ITO MIN MAX TEST:\n", __func__);
res = parse_production_test_limits(path_limits,
&limit_file, MS_RAW_ITO_EACH_NODE_MIN,
&thresholds_min, &trows, &tcolumns);
@@ -970,7 +970,7 @@ int fts_production_test_ito(struct fts_ts_info *info,
ms_raw_frame.header.force_node ||
tcolumns != ms_raw_frame.header.sense_node)) {
res |= ERROR_PROD_TEST_ITO;
- LOGE("%s: MS_RAW_ITO_EACH_NODE_MIN limit parse failed... "
+ pr_err("%s: MS_RAW_ITO_EACH_NODE_MIN limit parse failed... "
"ERROR %08X\n",
__func__, res);
goto goto_error;
@@ -982,7 +982,7 @@ int fts_production_test_ito(struct fts_ts_info *info,
ms_raw_frame.header.force_node ||
tcolumns != ms_raw_frame.header.sense_node)) {
res |= ERROR_PROD_TEST_ITO;
- LOGE("%s: MS_RAW__ITO_EACH_NODE_MAX limit parse"
+ pr_err("%s: MS_RAW__ITO_EACH_NODE_MAX limit parse"
" failed... ERROR %08X\n",
__func__, res);
goto goto_error;
@@ -992,15 +992,15 @@ int fts_production_test_ito(struct fts_ts_info *info,
ms_raw_frame.header.sense_node, thresholds_min,
thresholds_max);
if (res != OK) {
- LOGE("%s: check limits min max each node data "
+ pr_err("%s: check limits min max each node data "
"failed...ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: MS RAW ITO MAP MIN MAX TEST:.................FAIL\n\n",
+ pr_err("%s: MS RAW ITO MAP MIN MAX TEST:.................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_ITO |
ERROR_PROD_TEST_CHECK_FAIL);
} else {
- LOGI("%s: MS RAW ITO MAP MIN MAX TEST:.................OK\n",
+ pr_info("%s: MS RAW ITO MAP MIN MAX TEST:.................OK\n",
__func__);
}
if (thresholds_min != NULL) {
@@ -1012,10 +1012,10 @@ int fts_production_test_ito(struct fts_ts_info *info,
thresholds_max = NULL;
}
} else
- LOGI("%s: MS RAW ITO MIN MAX TEST SKIPPED..\n",
+ pr_info("%s: MS RAW ITO MIN MAX TEST SKIPPED..\n",
__func__);
} else
- LOGI("%s: MS RAW ITO TEST SKIPPED..\n", __func__);
+ pr_info("%s: MS RAW ITO TEST SKIPPED..\n", __func__);
goto_error:
if (thresholds != NULL)
@@ -1035,7 +1035,7 @@ goto_error:
free_limits_file(&limit_file);
res |= fts_system_reset(info, 1);
if (res < OK) {
- LOGE("%s: ERROR %08X\n", __func__, ERROR_PROD_TEST_ITO);
+ pr_err("%s: ERROR %08X\n", __func__, ERROR_PROD_TEST_ITO);
res = (res | ERROR_PROD_TEST_ITO);
}
return res;
@@ -1060,7 +1060,7 @@ int fts_production_test_ms_raw(char *path_limits, struct test_to_do *tests)
ms_raw_frame.node_data = NULL;
- LOGI("%s: MS RAW DATA TEST STARTING...\n", __func__);
+ pr_info("%s: MS RAW DATA TEST STARTING...\n", __func__);
if (tests->mutual_raw) {
data = SCAN_MODE_LOCK_ACTIVE;
res = fts_write_fw_reg(SCAN_MODE_ADDR, &data, 1);
@@ -1069,11 +1069,11 @@ int fts_production_test_ms_raw(char *path_limits, struct test_to_do *tests)
res |= fts_write_fw_reg(SCAN_MODE_ADDR, &data, 1);
msleep(WAIT_FOR_FRESH_FRAMES);
- LOGI("%s: Collecting MS Raw data...\n", __func__);
+ pr_info("%s: Collecting MS Raw data...\n", __func__);
res |= get_ms_frame(MS_RAW, &ms_raw_frame);
if (res < OK) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: failed... ERROR %08X\n", __func__, res);
+ pr_err("%s: failed... ERROR %08X\n", __func__, res);
goto goto_error;
}
@@ -1087,7 +1087,7 @@ int fts_production_test_ms_raw(char *path_limits, struct test_to_do *tests)
ms_raw_frame.header.force_node,
ms_raw_frame.header.sense_node);
- LOGI("%s: MS RAW MIN MAX TEST:\n", __func__);
+ pr_info("%s: MS RAW MIN MAX TEST:\n", __func__);
res = parse_production_test_limits(path_limits,
&limit_file, MS_RAW_EACH_NODE_MIN,
&thresholds_min, &trows, &tcolumns);
@@ -1095,7 +1095,7 @@ int fts_production_test_ms_raw(char *path_limits, struct test_to_do *tests)
ms_raw_frame.header.force_node ||
tcolumns != ms_raw_frame.header.sense_node)) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: MS_RAW_EACH_NODE_MIN limit parse failed... ERROR %08X\n",
+ pr_err("%s: MS_RAW_EACH_NODE_MIN limit parse failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -1107,7 +1107,7 @@ int fts_production_test_ms_raw(char *path_limits, struct test_to_do *tests)
ms_raw_frame.header.force_node ||
tcolumns != ms_raw_frame.header.sense_node)) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: MS_RAW_EACH_NODE_MAX limit parse failed... ERROR %08X\n",
+ pr_err("%s: MS_RAW_EACH_NODE_MAX limit parse failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -1117,14 +1117,14 @@ int fts_production_test_ms_raw(char *path_limits, struct test_to_do *tests)
ms_raw_frame.header.sense_node, thresholds_min,
thresholds_max);
if (res != OK) {
- LOGE("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
+ pr_err("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: MS RAW MIN MAX TEST:.................FAIL\n\n",
+ pr_err("%s: MS RAW MIN MAX TEST:.................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_RAW |
ERROR_PROD_TEST_CHECK_FAIL);
} else {
- LOGI("%s: MS RAW MIN MAX TEST:.................OK\n",
+ pr_info("%s: MS RAW MIN MAX TEST:.................OK\n",
__func__);
}
if (thresholds_min != NULL) {
@@ -1136,7 +1136,7 @@ int fts_production_test_ms_raw(char *path_limits, struct test_to_do *tests)
thresholds_max = NULL;
}
} else
- LOGI("%s: MS RAW DATA TEST SKIPPED...\n", __func__);
+ pr_info("%s: MS RAW DATA TEST SKIPPED...\n", __func__);
goto_error:
if (ms_raw_frame.node_data != NULL)
@@ -1173,7 +1173,7 @@ int fts_production_test_ms_raw_lp(char *path_limits, struct test_to_do *tests)
ms_raw_frame.node_data = NULL;
- LOGI("%s: MS LP RAW TEST STARTING..\n", __func__);
+ pr_info("%s: MS LP RAW TEST STARTING..\n", __func__);
if (tests->mutual_raw_lp) {
res = fts_write_fw_reg(SCAN_MODE_ADDR, &data, 1);
msleep(WAIT_FOR_FRESH_FRAMES);
@@ -1181,11 +1181,11 @@ int fts_production_test_ms_raw_lp(char *path_limits, struct test_to_do *tests)
res |= fts_write_fw_reg(SCAN_MODE_ADDR, &data, 1);
msleep(WAIT_FOR_FRESH_FRAMES);
- LOGI("%s: Collecting MS LP Raw data...\n", __func__);
+ pr_info("%s: Collecting MS LP Raw data...\n", __func__);
res |= get_ms_frame(MS_RAW, &ms_raw_frame);
if (res < OK) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: failed... ERROR %08X\n",
+ pr_err("%s: failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -1200,7 +1200,7 @@ int fts_production_test_ms_raw_lp(char *path_limits, struct test_to_do *tests)
ms_raw_frame.header.force_node,
ms_raw_frame.header.sense_node);
- LOGI("%s: MS LP RAW MIN MAX TEST:\n", __func__);
+ pr_info("%s: MS LP RAW MIN MAX TEST:\n", __func__);
res = parse_production_test_limits(path_limits,
&limit_file, MS_RAW_LP_EACH_NODE_MIN,
&thresholds_min, &trows, &tcolumns);
@@ -1208,7 +1208,7 @@ int fts_production_test_ms_raw_lp(char *path_limits, struct test_to_do *tests)
ms_raw_frame.header.force_node ||
tcolumns != ms_raw_frame.header.sense_node)) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: MS_RAW_LP_EACH_NODE_MIN limit parse failed... ERROR %08X\n",
+ pr_err("%s: MS_RAW_LP_EACH_NODE_MIN limit parse failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -1220,7 +1220,7 @@ int fts_production_test_ms_raw_lp(char *path_limits, struct test_to_do *tests)
ms_raw_frame.header.force_node ||
tcolumns != ms_raw_frame.header.sense_node)) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: MS_RAW_LP_EACH_NODE_MAX limit parse failed... ERROR %08X\n",
+ pr_err("%s: MS_RAW_LP_EACH_NODE_MAX limit parse failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -1230,14 +1230,14 @@ int fts_production_test_ms_raw_lp(char *path_limits, struct test_to_do *tests)
ms_raw_frame.header.sense_node, thresholds_min,
thresholds_max);
if (res != OK) {
- LOGE("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
+ pr_err("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: MS LP RAW MIN MAX TEST:.................FAIL\n\n",
+ pr_err("%s: MS LP RAW MIN MAX TEST:.................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_RAW |
ERROR_PROD_TEST_CHECK_FAIL);
} else {
- LOGI("%s: MS LP RAW MIN MAX TEST:.................OK\n",
+ pr_info("%s: MS LP RAW MIN MAX TEST:.................OK\n",
__func__);
}
if (thresholds_min != NULL) {
@@ -1249,7 +1249,7 @@ int fts_production_test_ms_raw_lp(char *path_limits, struct test_to_do *tests)
thresholds_max = NULL;
}
} else {
- LOGI("%s: MS LP RAW MIN MAX TEST SKIPPED...\n",
+ pr_info("%s: MS LP RAW MIN MAX TEST SKIPPED...\n",
__func__);
}
@@ -1287,7 +1287,7 @@ int fts_production_test_ss_raw(char *path_limits, struct test_to_do *tests)
ss_raw_frame.force_data = NULL;
ss_raw_frame.sense_data = NULL;
- LOGI("%s: SS RAW DATA TEST STARTING...\n", __func__);
+ pr_info("%s: SS RAW DATA TEST STARTING...\n", __func__);
if (tests->self_force_raw || tests->self_sense_raw) {
res = fts_write_fw_reg(SCAN_MODE_ADDR, &data, 1);
msleep(WAIT_FOR_FRESH_FRAMES);
@@ -1295,11 +1295,11 @@ int fts_production_test_ss_raw(char *path_limits, struct test_to_do *tests)
res |= fts_write_fw_reg(SCAN_MODE_ADDR, &data, 1);
msleep(WAIT_FOR_FRESH_FRAMES);
- LOGI("%s: Collecting SS Raw data...\n", __func__);
+ pr_info("%s: Collecting SS Raw data...\n", __func__);
res |= get_ss_frame(SS_RAW, &ss_raw_frame);
if (res < OK) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: failed... ERROR %08X\n",
+ pr_err("%s: failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -1313,7 +1313,7 @@ int fts_production_test_ss_raw(char *path_limits, struct test_to_do *tests)
ss_raw_frame.header.force_node,
1);
- LOGI("%s: SS RAW FORCE MIN MAX TEST:\n",
+ pr_info("%s: SS RAW FORCE MIN MAX TEST:\n",
__func__);
res = parse_production_test_limits(path_limits,
&limit_file, SS_RAW_FORCE_EACH_NODE_MIN,
@@ -1322,7 +1322,7 @@ int fts_production_test_ss_raw(char *path_limits, struct test_to_do *tests)
ss_raw_frame.header.force_node ||
tcolumns != 1)) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: SS_RAW_FORCE_EACH_NODE_MIN limit parse failed... "
+ pr_err("%s: SS_RAW_FORCE_EACH_NODE_MIN limit parse failed... "
"ERROR %08X\n",
__func__, res);
goto goto_error;
@@ -1335,7 +1335,7 @@ int fts_production_test_ss_raw(char *path_limits, struct test_to_do *tests)
ss_raw_frame.header.force_node ||
tcolumns != 1)) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: SS_RAW_FORCE_EACH_NODE_MAX limit parse failed... "
+ pr_err("%s: SS_RAW_FORCE_EACH_NODE_MAX limit parse failed... "
"ERROR %08X\n",
__func__, res);
goto goto_error;
@@ -1346,14 +1346,14 @@ int fts_production_test_ss_raw(char *path_limits, struct test_to_do *tests)
thresholds_min,
thresholds_max);
if (res != OK) {
- LOGE("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
+ pr_err("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: SS RAW FORCE MIN MAX TEST:.................FAIL\n\n",
+ pr_err("%s: SS RAW FORCE MIN MAX TEST:.................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_RAW |
ERROR_PROD_TEST_CHECK_FAIL);
} else {
- LOGI("%s: SS RAW FORCE MIN MAX TEST:.................OK\n",
+ pr_info("%s: SS RAW FORCE MIN MAX TEST:.................OK\n",
__func__);
}
@@ -1366,7 +1366,7 @@ int fts_production_test_ss_raw(char *path_limits, struct test_to_do *tests)
thresholds_max = NULL;
}
} else
- LOGI("%s: SS RAW FORCE TEST SKIPPED..\n",
+ pr_info("%s: SS RAW FORCE TEST SKIPPED..\n",
__func__);
if (tests->self_sense_raw) {
@@ -1378,7 +1378,7 @@ int fts_production_test_ss_raw(char *path_limits, struct test_to_do *tests)
1,
ss_raw_frame.header.sense_node);
- LOGI("%s: SS RAW SENSE MIN MAX TEST:\n",
+ pr_info("%s: SS RAW SENSE MIN MAX TEST:\n",
__func__);
res = parse_production_test_limits(path_limits,
&limit_file, SS_RAW_SENSE_EACH_NODE_MIN,
@@ -1386,7 +1386,7 @@ int fts_production_test_ss_raw(char *path_limits, struct test_to_do *tests)
if (res < OK || (trows != 1 ||
tcolumns != ss_raw_frame.header.sense_node)) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: SS_RAW_SENSE_EACH_NODE_MIN limit parse failed... "
+ pr_err("%s: SS_RAW_SENSE_EACH_NODE_MIN limit parse failed... "
"ERROR %08X\n",
__func__, res);
goto goto_error;
@@ -1398,7 +1398,7 @@ int fts_production_test_ss_raw(char *path_limits, struct test_to_do *tests)
if (res < OK || (trows != 1 ||
tcolumns != ss_raw_frame.header.sense_node)) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: SS_RAW_SENSE_EACH_NODE_MAX limit parse failed... "
+ pr_err("%s: SS_RAW_SENSE_EACH_NODE_MAX limit parse failed... "
"ERROR %08X\n",
__func__, res);
goto goto_error;
@@ -1409,20 +1409,20 @@ int fts_production_test_ss_raw(char *path_limits, struct test_to_do *tests)
ss_raw_frame.header.sense_node,
thresholds_min, thresholds_max);
if (res != OK) {
- LOGE("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
+ pr_err("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: SS RAW SENSE MIN MAX TEST:.................FAIL\n\n",
+ pr_err("%s: SS RAW SENSE MIN MAX TEST:.................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_RAW |
ERROR_PROD_TEST_CHECK_FAIL);
} else
- LOGI("%s: SS RAW SENSE MIN MAX TEST:.................OK\n",
+ pr_info("%s: SS RAW SENSE MIN MAX TEST:.................OK\n",
__func__);
} else
- LOGI("%s: SS RAW SENSE TEST SKIPPED..\n",
+ pr_info("%s: SS RAW SENSE TEST SKIPPED..\n",
__func__);
} else
- LOGI("%s: SS RAW TEST SKIPPED...\n", __func__);
+ pr_info("%s: SS RAW TEST SKIPPED...\n", __func__);
goto_error:
if (ss_raw_frame.force_data != NULL)
@@ -1461,7 +1461,7 @@ int fts_production_test_ss_raw_lp(char *path_limits, struct test_to_do *tests)
ss_raw_frame.force_data = NULL;
ss_raw_frame.sense_data = NULL;
- LOGI("%s: SS RAW LP DATA TEST STARTING...\n", __func__);
+ pr_info("%s: SS RAW LP DATA TEST STARTING...\n", __func__);
if (tests->self_force_raw_lp || tests->self_sense_raw_lp) {
res = fts_write_fw_reg(SCAN_MODE_ADDR, &data, 1);
@@ -1470,11 +1470,11 @@ int fts_production_test_ss_raw_lp(char *path_limits, struct test_to_do *tests)
res |= fts_write_fw_reg(SCAN_MODE_ADDR, &data, 1);
msleep(WAIT_FOR_FRESH_FRAMES);
- LOGI("%s: Collecting SS LP Raw data...\n", __func__);
+ pr_info("%s: Collecting SS LP Raw data...\n", __func__);
res |= get_ss_frame(SS_DETECT_RAW, &ss_raw_frame);
if (res < OK) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: failed... ERROR %08X\n",
+ pr_err("%s: failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -1489,7 +1489,7 @@ int fts_production_test_ss_raw_lp(char *path_limits, struct test_to_do *tests)
ss_raw_frame.header.force_node,
1);
- LOGI("%s: SS LP RAW FORCE MIN MAX TEST:\n",
+ pr_info("%s: SS LP RAW FORCE MIN MAX TEST:\n",
__func__);
res = parse_production_test_limits(path_limits,
&limit_file,
@@ -1499,7 +1499,7 @@ int fts_production_test_ss_raw_lp(char *path_limits, struct test_to_do *tests)
ss_raw_frame.header.force_node ||
tcolumns != 1)) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: SS_RAW_LP_FORCE_EACH_NODE_MIN limit "
+ pr_err("%s: SS_RAW_LP_FORCE_EACH_NODE_MIN limit "
"parse failed... ERROR %08X\n",
__func__,
res);
@@ -1514,7 +1514,7 @@ int fts_production_test_ss_raw_lp(char *path_limits, struct test_to_do *tests)
ss_raw_frame.header.force_node ||
tcolumns != 1)) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: SS_RAW_LP_FORCE_EACH_NODE_MAX limit "
+ pr_err("%s: SS_RAW_LP_FORCE_EACH_NODE_MAX limit "
"parse failed... ERROR %08X\n",
__func__,
res);
@@ -1527,15 +1527,15 @@ int fts_production_test_ss_raw_lp(char *path_limits, struct test_to_do *tests)
thresholds_min,
thresholds_max);
if (res != OK) {
- LOGE("%s: check_limits_map_total failed... "
+ pr_err("%s: check_limits_map_total failed... "
"ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: SS LP RAW FORCE MIN MAX TEST:"
+ pr_err("%s: SS LP RAW FORCE MIN MAX TEST:"
".................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_RAW | ERROR_PROD_TEST_CHECK_FAIL);
} else {
- LOGI("%s: SS LP RAW FORCE MIN MAX TEST:"
+ pr_info("%s: SS LP RAW FORCE MIN MAX TEST:"
".................OK\n",
__func__);
}
@@ -1549,11 +1549,11 @@ int fts_production_test_ss_raw_lp(char *path_limits, struct test_to_do *tests)
thresholds_max = NULL;
}
} else
- LOGE("%s: SS LP RAW FORCE MIN MAX TEST:SS LP FORCE "
+ pr_err("%s: SS LP RAW FORCE MIN MAX TEST:SS LP FORCE "
"NOT AVAILABLE\n",
__func__);
} else
- LOGI("%s: SS LP RAW FORCE TEST SKIPPED\n", __func__);
+ pr_info("%s: SS LP RAW FORCE TEST SKIPPED\n", __func__);
if (tests->self_sense_raw_lp) {
if (ss_raw_frame.header.sense_node > 0) {
@@ -1565,7 +1565,7 @@ int fts_production_test_ss_raw_lp(char *path_limits, struct test_to_do *tests)
1,
ss_raw_frame.header.sense_node);
- LOGI("%s: SS LP RAW SENSE MIN MAX TEST:\n",
+ pr_info("%s: SS LP RAW SENSE MIN MAX TEST:\n",
__func__);
res = parse_production_test_limits(path_limits,
&limit_file,
@@ -1574,7 +1574,7 @@ int fts_production_test_ss_raw_lp(char *path_limits, struct test_to_do *tests)
if (res < OK || (trows != 1 ||
tcolumns != ss_raw_frame.header.sense_node)) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: SS_RAW_LP_SENSE_EACH_NODE_MIN limit "
+ pr_err("%s: SS_RAW_LP_SENSE_EACH_NODE_MIN limit "
"parse failed...ERROR %08X\n",
__func__, res);
goto goto_error;
@@ -1587,7 +1587,7 @@ int fts_production_test_ss_raw_lp(char *path_limits, struct test_to_do *tests)
if (res < OK || (trows != 1 ||
tcolumns != ss_raw_frame.header.sense_node)) {
res |= ERROR_PROD_TEST_RAW;
- LOGE("%s: SS_RAW_LP_SENSE_EACH_NODE_MAX limit "
+ pr_err("%s: SS_RAW_LP_SENSE_EACH_NODE_MAX limit "
"parse failed...ERROR %08X\n",
__func__, res);
goto goto_error;
@@ -1598,28 +1598,28 @@ int fts_production_test_ss_raw_lp(char *path_limits, struct test_to_do *tests)
ss_raw_frame.header.sense_node,
thresholds_min, thresholds_max);
if (res != OK) {
- LOGE("%s: check_limits_map_total failed"
+ pr_err("%s: check_limits_map_total failed"
"...ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: SS LP RAW SENSE MIN MAX TEST:"
+ pr_err("%s: SS LP RAW SENSE MIN MAX TEST:"
".................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_RAW |
ERROR_PROD_TEST_CHECK_FAIL);
} else {
- LOGI("%s: SS LP RAW SENSE MIN MAX TEST:"
+ pr_info("%s: SS LP RAW SENSE MIN MAX TEST:"
".................OK\n",
__func__);
}
} else
- LOGE("%s: SS LP RAW SENSE MIN MAX TEST: SS LP SENSE "
+ pr_err("%s: SS LP RAW SENSE MIN MAX TEST: SS LP SENSE "
"NOT AVAILABLE\n",
__func__);
} else
- LOGI("%s: SS LP RAW SENSE TEST SKIPPED\n",
+ pr_info("%s: SS LP RAW SENSE TEST SKIPPED\n",
__func__);
} else
- LOGI("%s: SS LP RAW TEST SKIPPED...\n", __func__);
+ pr_info("%s: SS LP RAW TEST SKIPPED...\n", __func__);
goto_error:
if (ss_raw_frame.force_data != NULL)
@@ -1662,14 +1662,14 @@ int fts_production_test_ms_cx_lp(char *path_limits, int stop_on_fail,
ms_cx_data.node_data = NULL;
- LOGI("%s: MS TOTAL CX LP DATA TEST STARTING...\n", __func__);
+ pr_info("%s: MS TOTAL CX LP DATA TEST STARTING...\n", __func__);
if (tests->mutual_cx_lp || tests->mutual_cx_lp_adj) {
- LOGI("%s: Collecting MS CX LP data...\n", __func__);
+ pr_info("%s: Collecting MS CX LP data...\n", __func__);
res = get_mutual_total_cx_data(HDM_REQ_TOT_CX_MS_LOW_POWER,
&ms_cx_data);
if (res < OK) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: failed... ERROR %08X\n", __func__, res);
+ pr_err("%s: failed... ERROR %08X\n", __func__, res);
goto goto_error;
}
@@ -1684,7 +1684,7 @@ int fts_production_test_ms_cx_lp(char *path_limits, int stop_on_fail,
ms_cx_data.header.sense_node);
if (tests->mutual_cx_lp) {
- LOGI("%s: MS TOTAL CX LP DATA MIN MAX TEST:\n",
+ pr_info("%s: MS TOTAL CX LP DATA MIN MAX TEST:\n",
__func__);
res = parse_production_test_limits(path_limits,
&limit_file, MS_TOTAL_CX_LP_MIN,
@@ -1693,7 +1693,7 @@ int fts_production_test_ms_cx_lp(char *path_limits, int stop_on_fail,
ms_cx_data.header.force_node ||
tcolumns != ms_cx_data.header.sense_node)) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: MS_TOTAL_CX_LP_MIN limit parse failed... ERROR %08X\n",
+ pr_err("%s: MS_TOTAL_CX_LP_MIN limit parse failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -1705,7 +1705,7 @@ int fts_production_test_ms_cx_lp(char *path_limits, int stop_on_fail,
ms_cx_data.header.force_node ||
tcolumns != ms_cx_data.header.sense_node)) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: MS_TOTAL_CX_LP_MAX limit parse failed... ERROR %08X\n",
+ pr_err("%s: MS_TOTAL_CX_LP_MAX limit parse failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -1715,16 +1715,16 @@ int fts_production_test_ms_cx_lp(char *path_limits, int stop_on_fail,
ms_cx_data.header.sense_node, thresholds_min,
thresholds_max);
if (res != OK) {
- LOGE("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
+ pr_err("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: MS TOTAL CX LP MIN MAX TEST:.................FAIL\n\n",
+ pr_err("%s: MS TOTAL CX LP MIN MAX TEST:.................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_CX |
ERROR_PROD_TEST_CHECK_FAIL);
if (stop_on_fail == 1)
goto goto_error;
} else {
- LOGI("%s: MS TOTAL CX LP MIN MAX TEST:.................OK\n",
+ pr_info("%s: MS TOTAL CX LP MIN MAX TEST:.................OK\n",
__func__);
}
if (thresholds_min != NULL) {
@@ -1736,17 +1736,17 @@ int fts_production_test_ms_cx_lp(char *path_limits, int stop_on_fail,
thresholds_max = NULL;
}
} else
- LOGI("%s: MS TOTAL CX LP DATA MIN MAX TEST SKIPPED...\n",
+ pr_info("%s: MS TOTAL CX LP DATA MIN MAX TEST SKIPPED...\n",
__func__);
if (tests->mutual_cx_lp_adj) {
- LOGI("%s: MS TOTAL CX LP DATA ADJACENT HORIZONTAL TEST:\n",
+ pr_info("%s: MS TOTAL CX LP DATA ADJACENT HORIZONTAL TEST:\n",
__func__);
res = compute_adj_horiz_total(ms_cx_data.node_data,
ms_cx_data.header.force_node,
ms_cx_data.header.sense_node,
&adj);
if (res < OK) {
- LOGE("%s: compute adj Horizontal failed... ERROR %08X\n",
+ pr_err("%s: compute adj Horizontal failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -1759,7 +1759,7 @@ int fts_production_test_ms_cx_lp(char *path_limits, int stop_on_fail,
(trows != ms_cx_data.header.force_node ||
tcolumns != ms_cx_data.header.sense_node - 1)) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: MS_TOTAL_CX_LP_ADJH limit parse failed... ERROR %08X\n",
+ pr_err("%s: MS_TOTAL_CX_LP_ADJH limit parse failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -1770,10 +1770,10 @@ int fts_production_test_ms_cx_lp(char *path_limits, int stop_on_fail,
ms_cx_data.header.sense_node - 1,
thresholds);
if (res != OK) {
- LOGE("%s: check limit adj horiz MS_TOTAL_CX_LP_ADJH failed... "
+ pr_err("%s: check limit adj horiz MS_TOTAL_CX_LP_ADJH failed... "
"ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: MS TOTAL CX LP ADJ HORIZONTAL TEST:"
+ pr_err("%s: MS TOTAL CX LP ADJ HORIZONTAL TEST:"
".................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_CX |
@@ -1781,7 +1781,7 @@ int fts_production_test_ms_cx_lp(char *path_limits, int stop_on_fail,
if (stop_on_fail == 1)
goto goto_error;
} else
- LOGI("%s: MS TOTAL CX LP ADJ HORIZONTAL TEST:"
+ pr_info("%s: MS TOTAL CX LP ADJ HORIZONTAL TEST:"
".................OK\n",
__func__);
@@ -1791,7 +1791,7 @@ int fts_production_test_ms_cx_lp(char *path_limits, int stop_on_fail,
kfree(adj);
adj = NULL;
- LOGI("%s: MS TOTAL CX LP ADJ VERTICAL TEST:\n",
+ pr_info("%s: MS TOTAL CX LP ADJ VERTICAL TEST:\n",
__func__);
res = compute_adj_vert_total(ms_cx_data.node_data,
ms_cx_data.header.force_node,
@@ -1799,7 +1799,7 @@ int fts_production_test_ms_cx_lp(char *path_limits, int stop_on_fail,
&adj);
if (res < OK) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: compute adj vert failed... ERROR %08X\n",
+ pr_err("%s: compute adj vert failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -1811,7 +1811,7 @@ int fts_production_test_ms_cx_lp(char *path_limits, int stop_on_fail,
(trows != ms_cx_data.header.force_node - 1 ||
tcolumns != ms_cx_data.header.sense_node)) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: MS_TOTAL_CX_LP_ADJV limit parse failed... ERROR %08X\n",
+ pr_err("%s: MS_TOTAL_CX_LP_ADJV limit parse failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -1822,10 +1822,10 @@ int fts_production_test_ms_cx_lp(char *path_limits, int stop_on_fail,
1, ms_cx_data.header.sense_node,
thresholds);
if (res != OK) {
- LOGE("%s: check limits adj MS_TOTAL_CX_LP_ADJV failed..."
+ pr_err("%s: check limits adj MS_TOTAL_CX_LP_ADJV failed..."
"ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: MS TOTAL CX LP ADJ VERTICAL TEST:"
+ pr_err("%s: MS TOTAL CX LP ADJ VERTICAL TEST:"
".................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_CX |
@@ -1833,7 +1833,7 @@ int fts_production_test_ms_cx_lp(char *path_limits, int stop_on_fail,
if (stop_on_fail == 1)
goto goto_error;
} else
- LOGI("%s: MS TOTAL CX LP ADJ VERTICAL TEST:"
+ pr_info("%s: MS TOTAL CX LP ADJ VERTICAL TEST:"
".................OK\n",
__func__);
@@ -1845,7 +1845,7 @@ int fts_production_test_ms_cx_lp(char *path_limits, int stop_on_fail,
}
} else
- LOGI("%s: MS TOTAL CX LP TEST SKIPPED...\n", __func__);
+ pr_info("%s: MS TOTAL CX LP TEST SKIPPED...\n", __func__);
goto_error:
if (ms_cx_data.node_data != NULL)
@@ -1890,14 +1890,14 @@ int fts_production_test_ss_ix(char *path_limits, struct test_to_do *tests)
ss_cx_data.ix_tx = NULL;
ss_cx_data.ix_rx = NULL;
- LOGI("%s: SS TOTAL IX DATA TEST STARTING...\n", __func__);
+ pr_info("%s: SS TOTAL IX DATA TEST STARTING...\n", __func__);
if (tests->self_force_ix || tests->self_sense_ix) {
- LOGI("%s: Collecting SS IX data...\n", __func__);
+ pr_info("%s: Collecting SS IX data...\n", __func__);
res |= get_self_total_cx_data(HDM_REQ_TOT_IX_SS_TOUCH,
&ss_cx_data);
if (res < OK) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: failed... ERROR %08X\n",
+ pr_err("%s: failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -1916,9 +1916,9 @@ int fts_production_test_ss_ix(char *path_limits, struct test_to_do *tests)
1,
ss_cx_data.header.sense_node);
- LOGI("%s: SS TOTAL IX DATA MIN MAX TEST:\n", __func__);
+ pr_info("%s: SS TOTAL IX DATA MIN MAX TEST:\n", __func__);
if (tests->self_force_ix) {
- LOGI("%s: SS TOTAL FORCE IX DATA MIN MAX TEST:\n",
+ pr_info("%s: SS TOTAL FORCE IX DATA MIN MAX TEST:\n",
__func__);
res = parse_production_test_limits(path_limits,
&limit_file, SS_FORCE_TOTAL_IX_MIN,
@@ -1927,7 +1927,7 @@ int fts_production_test_ss_ix(char *path_limits, struct test_to_do *tests)
ss_cx_data.header.force_node ||
tcolumns != 1)) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: SS_FORCE_TOTAL_IX_MIN limit parse failed... "
+ pr_err("%s: SS_FORCE_TOTAL_IX_MIN limit parse failed... "
"ERROR %08X\n",
__func__, res);
goto goto_error;
@@ -1939,7 +1939,7 @@ int fts_production_test_ss_ix(char *path_limits, struct test_to_do *tests)
if (res < OK || (trows != ss_cx_data.header.force_node ||
tcolumns != 1)) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: SS_FORCE_TOTAL_IX_MAX limit parse failed... "
+ pr_err("%s: SS_FORCE_TOTAL_IX_MAX limit parse failed... "
"ERROR %08X\n",
__func__, res);
goto goto_error;
@@ -1950,29 +1950,29 @@ int fts_production_test_ss_ix(char *path_limits, struct test_to_do *tests)
1, thresholds_min,
thresholds_max);
if (res != OK) {
- LOGE("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
+ pr_err("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: SS TOTAL FORCE IX DATA MAP MIN MAX TEST:"
+ pr_err("%s: SS TOTAL FORCE IX DATA MAP MIN MAX TEST:"
".................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_CX |
ERROR_PROD_TEST_CHECK_FAIL);
} else {
- LOGI("%s: SS TOTAL FORCE IX DATA MAP MIN MAX TEST:"
+ pr_info("%s: SS TOTAL FORCE IX DATA MAP MIN MAX TEST:"
".................OK\n",
__func__);
}
} else
- LOGI("%s: SS TOTAL FORCE IX DATA MIN MAX TEST SKIPPED\n", __func__);
+ pr_info("%s: SS TOTAL FORCE IX DATA MIN MAX TEST SKIPPED\n", __func__);
if (tests->self_sense_ix) {
- LOGI("%s: SS TOTAL SENSE IX DATA MIN MAX TEST:\n", __func__);
+ pr_info("%s: SS TOTAL SENSE IX DATA MIN MAX TEST:\n", __func__);
res = parse_production_test_limits(path_limits,
&limit_file, SS_SENSE_TOTAL_IX_MIN,
&thresholds_min, &trows, &tcolumns);
if (res < OK || (trows != 1 || tcolumns != ss_cx_data.header.sense_node)) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: SS_SENSE_TOTAL_IX_MIN limit parse failed... ERROR %08X\n",
+ pr_err("%s: SS_SENSE_TOTAL_IX_MIN limit parse failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -1982,7 +1982,7 @@ int fts_production_test_ss_ix(char *path_limits, struct test_to_do *tests)
&thresholds_max, &trows, &tcolumns);
if (res < OK || (trows != 1 || tcolumns != ss_cx_data.header.sense_node)) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: SS_SENSE_TOTAL_IX_MIN limit parse failed... "
+ pr_err("%s: SS_SENSE_TOTAL_IX_MIN limit parse failed... "
"ERROR %08X\n",
__func__, res);
goto goto_error;
@@ -1993,18 +1993,18 @@ int fts_production_test_ss_ix(char *path_limits, struct test_to_do *tests)
ss_cx_data.header.sense_node, thresholds_min,
thresholds_max);
if (res != OK) {
- LOGE("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
+ pr_err("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: SS TOTAL SENSE IX DATA MAP MIN MAX TEST:"
+ pr_err("%s: SS TOTAL SENSE IX DATA MAP MIN MAX TEST:"
".................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_CX | ERROR_PROD_TEST_CHECK_FAIL);
} else
- LOGI("%s: SS TOTAL SENSE IX DATA MAP MIN MAX TEST:"
+ pr_info("%s: SS TOTAL SENSE IX DATA MAP MIN MAX TEST:"
".................OK\n",
__func__);
} else
- LOGI("%s: SS TOTAL SENSE IX DATA MAP MIN MAX TEST SKIPPED\n", __func__);
+ pr_info("%s: SS TOTAL SENSE IX DATA MAP MIN MAX TEST SKIPPED\n", __func__);
if (thresholds_min != NULL) {
kfree(thresholds_min);
@@ -2015,7 +2015,7 @@ int fts_production_test_ss_ix(char *path_limits, struct test_to_do *tests)
thresholds_max = NULL;
}
} else
- LOGI("%s: MS TOTAL CX TEST SKIPPED...\n",
+ pr_info("%s: MS TOTAL CX TEST SKIPPED...\n",
__func__);
goto_error:
@@ -2060,14 +2060,14 @@ int fts_production_test_ss_ix_lp(char *path_limits, struct test_to_do *tests)
ss_cx_data.ix_rx = NULL;
- LOGI("%s: SS TOTAL IX LP DATA TEST STARTING...\n", __func__);
+ pr_info("%s: SS TOTAL IX LP DATA TEST STARTING...\n", __func__);
if (tests->self_force_ix_lp || tests->self_sense_ix_lp) {
- LOGI("%s: Collecting SS IX LP data...\n", __func__);
+ pr_info("%s: Collecting SS IX LP data...\n", __func__);
res |= get_self_total_cx_data(HDM_REQ_TOT_IX_SS_TOUCH_IDLE,
&ss_cx_data);
if (res < OK) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: failed... ERROR %08X\n", __func__, res);
+ pr_err("%s: failed... ERROR %08X\n", __func__, res);
goto goto_error;
}
print_frame_u16("SS TOTAL FORCE LP DATA =",
@@ -2084,10 +2084,10 @@ int fts_production_test_ss_ix_lp(char *path_limits, struct test_to_do *tests)
1,
ss_cx_data.header.sense_node);
- LOGI("%s: SS TOTAL IX LP DATA MIN MAX TEST:\n", __func__);
+ pr_info("%s: SS TOTAL IX LP DATA MIN MAX TEST:\n", __func__);
if (tests->self_force_ix_lp) {
- LOGI("%s: SS TOTAL FORCE IX LP DATA MIN MAX TEST:\n", __func__);
+ pr_info("%s: SS TOTAL FORCE IX LP DATA MIN MAX TEST:\n", __func__);
res = parse_production_test_limits(path_limits,
&limit_file, SS_FORCE_TOTAL_IX_LP_MIN,
&thresholds_min, &trows, &tcolumns);
@@ -2095,7 +2095,7 @@ int fts_production_test_ss_ix_lp(char *path_limits, struct test_to_do *tests)
ss_cx_data.header.force_node ||
tcolumns != 1)) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: SS_FORCE_TOTAL_IX_MIN limit parse failed... ERROR %08X\n",
+ pr_err("%s: SS_FORCE_TOTAL_IX_MIN limit parse failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -2107,7 +2107,7 @@ int fts_production_test_ss_ix_lp(char *path_limits, struct test_to_do *tests)
ss_cx_data.header.force_node ||
tcolumns != 1)) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: SS_FORCE_TOTAL_IX_MAX limit parse failed... ERROR %08X\n",
+ pr_err("%s: SS_FORCE_TOTAL_IX_MAX limit parse failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -2116,21 +2116,21 @@ int fts_production_test_ss_ix_lp(char *path_limits, struct test_to_do *tests)
1, thresholds_min,
thresholds_max);
if (res != OK) {
- LOGE("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
+ pr_err("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: SS TOTAL FORCE IX LP DATA MAP MIN MAX TEST:"
+ pr_err("%s: SS TOTAL FORCE IX LP DATA MAP MIN MAX TEST:"
".................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_CX | ERROR_PROD_TEST_CHECK_FAIL);
} else
- LOGI("%s: SS TOTAL FORCE IX LP DATA MAP MIN MAX TEST:"
+ pr_info("%s: SS TOTAL FORCE IX LP DATA MAP MIN MAX TEST:"
".................OK\n",
__func__);
} else
- LOGI("%s: SS TOTAL FORCE IX LP DATA MIN MAX TEST SKIPPED\n", __func__);
+ pr_info("%s: SS TOTAL FORCE IX LP DATA MIN MAX TEST SKIPPED\n", __func__);
if (tests->self_sense_ix_lp) {
- LOGI("%s: SS TOTAL SENSE IX LP DATA MIN MAX TEST:\n", __func__);
+ pr_info("%s: SS TOTAL SENSE IX LP DATA MIN MAX TEST:\n", __func__);
res = parse_production_test_limits(path_limits,
&limit_file, SS_SENSE_TOTAL_IX_LP_MIN,
&thresholds_min, &trows, &tcolumns);
@@ -2138,7 +2138,7 @@ int fts_production_test_ss_ix_lp(char *path_limits, struct test_to_do *tests)
1 ||
tcolumns != ss_cx_data.header.sense_node)) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: SS_SENSE_TOTAL_IX_MIN limit parse failed... ERROR %08X\n",
+ pr_err("%s: SS_SENSE_TOTAL_IX_MIN limit parse failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -2150,7 +2150,7 @@ int fts_production_test_ss_ix_lp(char *path_limits, struct test_to_do *tests)
1 ||
tcolumns != ss_cx_data.header.sense_node)) {
res |= ERROR_PROD_TEST_CX;
- LOGE("%s: SS_SENSE_TOTAL_IX_MIN limit parse failed... ERROR %08X\n",
+ pr_err("%s: SS_SENSE_TOTAL_IX_MIN limit parse failed... ERROR %08X\n",
__func__, res);
goto goto_error;
}
@@ -2160,19 +2160,19 @@ int fts_production_test_ss_ix_lp(char *path_limits, struct test_to_do *tests)
ss_cx_data.header.sense_node, thresholds_min,
thresholds_max);
if (res != OK) {
- LOGE("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
+ pr_err("%s: check_limits_map_total failed... ERROR COUNT = %d\n",
__func__, res);
- LOGE("%s: SS TOTAL SENSE IX LP DATA MAP MIN MAX TEST:"
+ pr_err("%s: SS TOTAL SENSE IX LP DATA MAP MIN MAX TEST:"
".................FAIL\n\n",
__func__);
res = (ERROR_PROD_TEST_CX | ERROR_PROD_TEST_CHECK_FAIL);
} else
- LOGI("%s: SS TOTAL SENSE IX LP DATA MAP MIN MAX TEST:"
+ pr_info("%s: SS TOTAL SENSE IX LP DATA MAP MIN MAX TEST:"
".................OK\n",
__func__);
} else
- LOGI("%s: SS TOTAL SENSE IX LP DATA MIN MAX TEST SKIPPED\n", __func__);
+ pr_info("%s: SS TOTAL SENSE IX LP DATA MIN MAX TEST SKIPPED\n", __func__);
if (thresholds_min != NULL) {
kfree(thresholds_min);
@@ -2183,7 +2183,7 @@ int fts_production_test_ss_ix_lp(char *path_limits, struct test_to_do *tests)
thresholds_max = NULL;
}
} else
- LOGI("%s: SS TOTAL IX LP TEST SKIPPED...\n", __func__);
+ pr_info("%s: SS TOTAL IX LP TEST SKIPPED...\n", __func__);
goto_error:
if (ss_cx_data.ix_rx != NULL) {
@@ -2226,80 +2226,80 @@ int fts_production_test_main(struct fts_ts_info *info, char *path_limits,
{
int res = OK;
- LOGI("%s: MAIN production test is starting...\n", __func__);
- LOGI("%s: [1]ITO TEST...\n", __func__);
+ pr_info("%s: MAIN production test is starting...\n", __func__);
+ pr_info("%s: [1]ITO TEST...\n", __func__);
res = fts_production_test_ito(info, path_limits, tests);
if (res != OK) {
- LOGE("%s: ITO TEST FAIL\n", __func__);
+ pr_err("%s: ITO TEST FAIL\n", __func__);
goto goto_error;
}
if (do_init) {
- LOGI("%s: Do Initialization...\n", __func__);
+ pr_info("%s: Do Initialization...\n", __func__);
res = fts_fw_request(PI_ADDR, 1, 1, TIMEOUT_FPI);
if (res < OK) {
- LOGE("%s: Error performing autotune.. %08X\n",
+ pr_err("%s: Error performing autotune.. %08X\n",
__func__, res);
res |= ERROR_INIT;
if (stop_on_fail)
goto goto_error;
}
- LOGI("%s: Initialization done...\n", __func__);
+ pr_info("%s: Initialization done...\n", __func__);
}
- LOGI("%s: [2]MUTUAL RAW TEST...\n", __func__);
+ pr_info("%s: [2]MUTUAL RAW TEST...\n", __func__);
res = fts_production_test_ms_raw(path_limits, tests);
if (res != OK) {
- LOGE("%s: MUTUAL RAW TEST FAIL\n", __func__);
+ pr_err("%s: MUTUAL RAW TEST FAIL\n", __func__);
if (stop_on_fail)
goto goto_error;
}
- LOGI("%s: [3]LOW POWER MUTUAL RAW Test......\n", __func__);
+ pr_info("%s: [3]LOW POWER MUTUAL RAW Test......\n", __func__);
res = fts_production_test_ms_raw_lp(path_limits, tests);
if (res != OK) {
- LOGE("%s: LOW POWER MUTUAL RAW TEST FAIL\n", __func__);
+ pr_err("%s: LOW POWER MUTUAL RAW TEST FAIL\n", __func__);
if (stop_on_fail)
goto goto_error;
}
- LOGI("%s: [4]SELF RAW TEST...\n", __func__);
+ pr_info("%s: [4]SELF RAW TEST...\n", __func__);
res = fts_production_test_ss_raw(path_limits, tests);
if (res != OK) {
- LOGE("%s: SELF RAW TEST FAIL\n", __func__);
+ pr_err("%s: SELF RAW TEST FAIL\n", __func__);
if (stop_on_fail)
goto goto_error;
}
- LOGI("%s: [5]LOW POWER SELF RAW TEST......\n", __func__);
+ pr_info("%s: [5]LOW POWER SELF RAW TEST......\n", __func__);
res = fts_production_test_ss_raw_lp(path_limits, tests);
if (res != OK) {
- LOGE("%s: LOW POWER SELF RAW TEST FAIL\n", __func__);
+ pr_err("%s: LOW POWER SELF RAW TEST FAIL\n", __func__);
if (stop_on_fail)
goto goto_error;
}
- LOGI("%s: [6]MUTUAL CX LOW POWER TEST......\n", __func__);
+ pr_info("%s: [6]MUTUAL CX LOW POWER TEST......\n", __func__);
res = fts_production_test_ms_cx_lp(path_limits, stop_on_fail, tests);
if (res != OK) {
- LOGE("%s: MUTUAL CX LOW POWER TEST FAIL\n", __func__);
+ pr_err("%s: MUTUAL CX LOW POWER TEST FAIL\n", __func__);
if (stop_on_fail)
goto goto_error;
}
- LOGI("%s: [7]SELF IX TEST......\n", __func__);
+ pr_info("%s: [7]SELF IX TEST......\n", __func__);
res = fts_production_test_ss_ix(path_limits, tests);
if (res != OK) {
- LOGE("%s: SELF IX TEST FAIL\n", __func__);
+ pr_err("%s: SELF IX TEST FAIL\n", __func__);
if (stop_on_fail)
goto goto_error;
}
- LOGI("%s: [8]SELF IX DETECT TEST......\n", __func__);
+ pr_info("%s: [8]SELF IX DETECT TEST......\n", __func__);
res = fts_production_test_ss_ix_lp(path_limits, tests);
if (res != OK) {
- LOGE("%s: SELF IX DETECT TEST FAIL\n", __func__);
+ pr_err("%s: SELF IX DETECT TEST FAIL\n", __func__);
if (stop_on_fail)
goto goto_error;
}
goto_error:
if (res != OK) {
- LOGE("%s: MAIN production test FAIL\n\n", __func__);
+ pr_err("%s: MAIN production test FAIL\n\n", __func__);
return res;
}
- LOGI("%s: MAIN production test OK\n\n", __func__);
+ pr_info("%s: MAIN production test OK\n\n", __func__);
return res;
}
diff --git a/touch/fst2/fts_proc.c b/touch/fst2/fts_proc.c
index 8ee0eac..0f19d0d 100644
--- a/touch/fst2/fts_proc.c
+++ b/touch/fst2/fts_proc.c
@@ -180,14 +180,14 @@ extern struct test_to_do tests;
*/
static void *fts_seq_start(struct seq_file *s, loff_t *pos)
{
- LOGD("%s: Entering start(), pos = %ld limit = %d printed = %d\n",
+ pr_debug("%s: Entering start(), pos = %ld limit = %d printed = %d\n",
__func__, (long)*pos, limit, printed);
if (test_print_buff == NULL && *pos == 0) {
- LOGI("%s: No data to print!\n", __func__);
+ pr_info("%s: No data to print!\n", __func__);
test_print_buff = (u8 *)kmalloc(NO_DATA_STRING_LEN * sizeof(u8), GFP_KERNEL);
if (test_print_buff == NULL) {
- LOGE("%s: Error allocating memory\n", __func__);
+ pr_err("%s: Error allocating memory\n", __func__);
return NULL;
}
snprintf(test_print_buff, NO_DATA_STRING_LEN, "{ %08X }\n", ERROR_OP_NOT_ALLOW);
@@ -216,7 +216,7 @@ static void *fts_seq_start(struct seq_file *s, loff_t *pos)
*/
static int fts_seq_show(struct seq_file *s, void *v)
{
- LOGD("%s: In show()\n", __func__);
+ pr_debug("%s: In show()\n", __func__);
seq_write(s, (u8 *)v, chunk);
printed += chunk;
return 0;
@@ -233,7 +233,7 @@ static int fts_seq_show(struct seq_file *s, void *v)
*/
static void *fts_seq_next(struct seq_file *s, void *v, loff_t *pos)
{
- LOGD("%s: Entering next(), pos = %ld limit = %d printed = %d\n",
+ pr_debug("%s: Entering next(), pos = %ld limit = %d printed = %d\n",
__func__, (long)*pos, limit, printed);
(*pos) += chunk;/* increase my position counter */
chunk = CHUNK_PROC;
@@ -255,9 +255,9 @@ static void *fts_seq_next(struct seq_file *s, void *v, loff_t *pos)
*/
static void fts_seq_stop(struct seq_file *s, void *v)
{
- LOGD("%s: In stop()\n", __func__);
+ pr_debug("%s: In stop()\n", __func__);
if (v) {
- LOGI("%s: v is %p.\n", __func__, v);
+ pr_info("%s: v is %p.\n", __func__, v);
} else {
limit = 0;
chunk = 0;
@@ -340,21 +340,21 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
pbuf = (u8 *)kmalloc(count * sizeof(u8), GFP_KERNEL);
if (pbuf == NULL) {
- LOGE("%s: Error allocating memory\n", __func__);
+ pr_err("%s: Error allocating memory\n", __func__);
res = ERROR_ALLOC;
goto goto_end;
}
cmd = (u8 *)kmalloc(count * sizeof(u8), GFP_KERNEL);
if (cmd == NULL) {
- LOGE("%s: Error allocating memory\n", __func__);
+ pr_err("%s: Error allocating memory\n", __func__);
res = ERROR_ALLOC;
goto goto_end;
}
func_to_test = (u32 *)kmalloc(((count + 1) / 3) * sizeof(u32),
GFP_KERNEL);
if (func_to_test == NULL) {
- LOGE("%s: Error allocating memory\n", __func__);
+ pr_err("%s: Error allocating memory\n", __func__);
res = ERROR_ALLOC;
goto goto_end;
}
@@ -375,7 +375,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
goto goto_end;
}
- LOGI("%s: func_to_test[0] = %02X cmd[0]= %02X Number of Parameters = %d\n",
+ pr_info("%s: func_to_test[0] = %02X cmd[0]= %02X Number of Parameters = %d\n",
__func__, func_to_test[0], cmd[0], number_param);
for (; number_param < (count + 1) / 3; number_param++) {
@@ -384,14 +384,14 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
p += 3;
cmd[number_param] =
(u8)func_to_test[number_param];
- LOGI("%s: func_to_test[%d] = %02X cmd[%d]= %02X\n",
+ pr_info("%s: func_to_test[%d] = %02X cmd[%d]= %02X\n",
__func__, number_param,
func_to_test[number_param],
number_param, cmd[number_param]);
}
}
- LOGI("%s: Number of Parameters = %d\n", __func__, number_param);
+ pr_info("%s: Number of Parameters = %d\n", __func__, number_param);
if (number_param >= 1) {
switch (func_to_test[0]) {
case CMD_DRIVER_VERSION:
@@ -399,7 +399,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
read_buf = (u8 *)kmalloc(to_read *
sizeof(u8), GFP_KERNEL);
if (read_buf == NULL) {
- LOGE("%s: Error allocating memory\n", __func__);
+ pr_err("%s: Error allocating memory\n", __func__);
to_read = 0;
res = ERROR_ALLOC;
break;
@@ -412,7 +412,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (number_param >= 4)
res = fts_write(&cmd[1], number_param - 1);
else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -421,12 +421,12 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (number_param >= 6) {
dummy = cmd[number_param - 1];
u8_to_u16_be(&cmd[number_param - 3], &to_read);
- LOGI("%s: Number of bytes to read = %d\n",
+ pr_info("%s: Number of bytes to read = %d\n",
__func__, to_read + dummy);
read_buf = (u8 *)kmalloc((to_read + dummy) *
sizeof(u8), GFP_KERNEL);
if (read_buf == NULL) {
- LOGE("%s: Error allocating memory\n", __func__);
+ pr_err("%s: Error allocating memory\n", __func__);
to_read = 0;
res = ERROR_ALLOC;
break;
@@ -436,7 +436,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (res >= OK)
size += (to_read * sizeof(u8));
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -444,18 +444,18 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (number_param >= 5) {
if (cmd[2] <= sizeof(u64)) {
u8_to_u64_be(&cmd[3], &address, cmd[2]);
- LOGI("%s: address = %016llX %ld\n",
+ pr_info("%s: address = %016llX %ld\n",
__func__, address,
(long int)address);
res = fts_write_u8ux(cmd[1], cmd[2],
address, &cmd[3 + cmd[2]],
(number_param - cmd[2] - 3));
} else {
- LOGE("%s Wrong address size!\n", __func__);
+ pr_err("%s Wrong address size!\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -463,17 +463,17 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (number_param >= 7) {
dummy = cmd[number_param - 1];
u8_to_u16_be(&cmd[number_param - 3], &to_read);
- LOGI("%s: Number of bytes to read = %d\n",
+ pr_info("%s: Number of bytes to read = %d\n",
__func__, to_read);
if (cmd[2] <= sizeof(u64)) {
u8_to_u64_be(&cmd[3], &address, cmd[2]);
- LOGI("%s: address = %016llX %ld\n",
+ pr_info("%s: address = %016llX %ld\n",
__func__, address,
(long)address);
read_buf = (u8 *)kmalloc(to_read *
sizeof(u8), GFP_KERNEL);
if (read_buf == NULL) {
- LOGE("%s: Error allocating memory\n", __func__);
+ pr_err("%s: Error allocating memory\n", __func__);
to_read = 0;
res = ERROR_ALLOC;
break;
@@ -484,11 +484,11 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (res >= OK)
size += (to_read * sizeof(u8));
} else {
- LOGE("%s Wrong address size!\n", __func__);
+ pr_err("%s Wrong address size!\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -496,7 +496,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (number_param == 1)
res = read_sys_info();
else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -505,7 +505,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
fts_set_interrupt(info, false);
res = fts_system_reset(info, 1);
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -513,7 +513,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (number_param == 1)
res = configure_spi4();
else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -535,7 +535,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
}
res = flash_update(info, &force_burn_flag);
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -546,7 +546,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
else
res = fts_set_interrupt(info, false);
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -557,7 +557,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
(cmd[2] & 0x00FF)), &cmd[3],
(number_param - 3));
else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -567,7 +567,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
read_buf = (u8 *)kmalloc(to_read * sizeof(u8),
GFP_KERNEL);
if (read_buf == NULL) {
- LOGE("%s: Error allocating memory\n", __func__);
+ pr_err("%s: Error allocating memory\n", __func__);
to_read = 0;
res = ERROR_ALLOC;
break;
@@ -579,7 +579,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (res >= OK)
size += (to_read * sizeof(u8));
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -587,7 +587,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (number_param == 2) {
res = get_ms_frame(cmd[1], &mutual_frame);
if (res < OK)
- LOGE("%s: Error while reading mutual frame..ERROR: %08X\n",
+ pr_err("%s: Error while reading mutual frame..ERROR: %08X\n",
__func__, res);
else {
res = OK;
@@ -600,7 +600,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
mutual_frame.header.sense_node);
}
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -608,7 +608,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (number_param == 2) {
res = get_ss_frame(cmd[1], &self_frame);
if (res < OK)
- LOGE("%s: Error while reading self frame.. ERROR: %08X\n",
+ pr_err("%s: Error while reading self frame.. ERROR: %08X\n",
__func__, res);
else {
res = OK;
@@ -626,7 +626,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
self_frame.header.sense_node);
}
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -635,7 +635,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
res = get_sync_frame(cmd[1], &mutual_frame,
&self_frame);
if (res < OK)
- LOGE("%s: Error while reading self frame..ERROR: %08X\n",
+ pr_err("%s: Error while reading self frame..ERROR: %08X\n",
__func__, res);
else {
res = OK;
@@ -662,7 +662,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
self_frame.header.sense_node);
}
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -670,7 +670,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (number_param == 2) {
res = get_mutual_cx_data(cmd[1], &mutual_cx);
if (res < OK)
- LOGE("%s: Error while reading mutual cx data.. "
+ pr_err("%s: Error while reading mutual cx data.. "
"ERROR: %08X\n",
__func__, res);
else {
@@ -683,7 +683,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
mutual_cx.header.sense_node);
}
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -691,7 +691,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (number_param == 2) {
res = get_self_cx_data(cmd[1], &self_cx);
if (res < OK)
- LOGE("%s: Error while reading self cx data.. "
+ pr_err("%s: Error while reading self cx data.. "
"ERROR: %08X\n",
__func__, res);
else {
@@ -722,7 +722,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
self_cx.header.sense_node);
}
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -731,10 +731,10 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
res = fts_production_test_main(info,
LIMITS_FILE, cmd[2], &tests, cmd[1]);
if (res < OK)
- LOGE("%s: Error running <Main> tests: %08X\n",
+ pr_err("%s: Error running <Main> tests: %08X\n",
__func__, res);
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -745,12 +745,12 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
while(res < OK && tries--) {
res = fts_production_test_ito(info, LIMITS_FILE, &tests);
if (res < OK)
- LOGE("%s: Error running <ITO> tests: %08X, "
+ pr_err("%s: Error running <ITO> tests: %08X, "
"Tries Remaining: %d\n",
__func__, res, tries);
}
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -759,10 +759,10 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
res = fts_production_test_ms_raw(LIMITS_FILE,
&tests);
if (res < OK)
- LOGE("%s: Error running <MS RAW>tests: %08X\n",
+ pr_err("%s: Error running <MS RAW>tests: %08X\n",
__func__, res);
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -772,10 +772,10 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
res = fts_production_test_ms_raw_lp(LIMITS_FILE,
&tests);
if (res < OK)
- LOGE("%s: Error running <MS RAW LP> tests: %08X\n",
+ pr_err("%s: Error running <MS RAW LP> tests: %08X\n",
__func__, res);
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -785,10 +785,10 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
res = fts_production_test_ss_raw(LIMITS_FILE,
&tests);
if (res < OK)
- LOGE("%s: Error running <SELF RAW> tests: %08X\n",
+ pr_err("%s: Error running <SELF RAW> tests: %08X\n",
__func__, res);
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -797,10 +797,10 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
res = fts_production_test_ss_raw_lp(LIMITS_FILE,
&tests);
if (res < OK)
- LOGE("%s: Error running <SELF RAW LP> tests: %08X\n",
+ pr_err("%s: Error running <SELF RAW LP> tests: %08X\n",
__func__, res);
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -808,7 +808,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (number_param == 1)
res = fts_read_sys_errors();
else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -816,7 +816,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (number_param == 2)
res = fts_request_hdm(cmd[1]);
else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -827,7 +827,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
read_buf = (u8 *)kmalloc(to_read * sizeof(u8),
GFP_KERNEL);
if (read_buf == NULL) {
- LOGE("%s: Error allocating memory\n", __func__);
+ pr_err("%s: Error allocating memory\n", __func__);
to_read = 0;
res = ERROR_ALLOC;
break;
@@ -837,7 +837,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (res >= OK)
size += (to_read * sizeof(u8));
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -846,10 +846,10 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
res = fts_production_test_ms_cx_lp(LIMITS_FILE,
cmd[1], &tests);
if (res < OK)
- LOGE("%s: Error running <MS CX LP> tests: %08X\n",
+ pr_err("%s: Error running <MS CX LP> tests: %08X\n",
__func__, res);
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -858,10 +858,10 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
res = fts_production_test_ss_ix(LIMITS_FILE,
&tests);
if (res < OK)
- LOGE("%s: Error running <SS IX> tests: %08X\n",
+ pr_err("%s: Error running <SS IX> tests: %08X\n",
__func__, res);
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -870,10 +870,10 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
res = fts_production_test_ss_ix_lp(LIMITS_FILE,
&tests);
if (res < OK)
- LOGE("%s: Error running <SS IX LP> tests: %08X\n",
+ pr_err("%s: Error running <SS IX LP> tests: %08X\n",
__func__, res);
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -882,7 +882,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
res = get_mutual_total_cx_data(cmd[1],
&mutual_total_cx);
if (res < OK)
- LOGE("%s: Error while reading mutual total cx data.. "
+ pr_err("%s: Error while reading mutual total cx data.. "
"ERROR: %08X\n",
__func__, res);
else {
@@ -897,7 +897,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
mutual_total_cx.header.sense_node);
}
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -905,7 +905,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
if (number_param == 2) {
res = get_self_total_cx_data(cmd[1], &self_total_cx);
if (res < OK)
- LOGE("%s: Error while reading self total ix data.. "
+ pr_err("%s: Error while reading self total ix data.. "
"ERROR: %08X\n",
__func__, res);
else {
@@ -924,7 +924,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
self_total_cx.header.sense_node);
}
} else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
@@ -937,17 +937,17 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
(cmd[5] & 0x00FF))/10));
/*(actual time out in API is x10(multiple) of input)*/
else {
- LOGE("%s: wrong number of parameters\n", __func__);
+ pr_err("%s: wrong number of parameters\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
case CMD_FORCE_TOUCH_ACTIVE:
if (number_param == 2) {
if (cmd[1] > 1) {
- LOGE("%s: Parameter should be 1 or 0\n", __func__);
+ pr_err("%s: Parameter should be 1 or 0\n", __func__);
res = ERROR_OP_NOT_ALLOW;
} else {
- LOGI("%s: FTS_FORCE_TOUCH_ACTIVE: %s\n",
+ pr_info("%s: FTS_FORCE_TOUCH_ACTIVE: %s\n",
__func__, cmd[1] ? "ON" : "OFF");
#if IS_ENABLED(CONFIG_GOOG_TOUCH_INTERFACE)
cmd[1] ? goog_pm_wake_lock(info->gti,
@@ -958,12 +958,12 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
res = OK;
}
} else {
- LOGE("%s: Wrong number of parameters!\n", __func__);
+ pr_err("%s: Wrong number of parameters!\n", __func__);
res = ERROR_OP_NOT_ALLOW;
}
break;
default:
- LOGE("%s: COMMAND ID NOT VALID!!!\n", __func__);
+ pr_err("%s: COMMAND ID NOT VALID!!!\n", __func__);
res = ERROR_OP_NOT_ALLOW;
break;
}
@@ -975,7 +975,7 @@ static ssize_t fts_seq_write(struct file *file, const char __user *buf,
size += 5; /*for "{", " ", " ", "}", "\n" */
test_print_buff = (u8 *)kmalloc(size * sizeof(u8), GFP_KERNEL);
if (test_print_buff == NULL) {
- LOGE("%s: Error allocating memory for io buff\n", __func__);
+ pr_err("%s: Error allocating memory for io buff\n", __func__);
res = ERROR_ALLOC;
}
snprintf(&test_print_buff[index], 3, "{ ");
@@ -1060,9 +1060,9 @@ int fts_proc_init(struct fts_ts_info *info) {
&fts_driver_test_ops, info);
if (entry)
- LOGI("%s: proc entry CREATED!\n", __func__);
+ pr_info("%s: proc entry CREATED!\n", __func__);
else {
- LOGE("%s: error creating proc entry!\n", __func__);
+ pr_err("%s: error creating proc entry!\n", __func__);
retval = -ENOMEM;
goto bad_file;
}
diff --git a/touch/ftm5/fts.h b/touch/ftm5/fts.h
index 825eac6..0f65d79 100644
--- a/touch/ftm5/fts.h
+++ b/touch/ftm5/fts.h
@@ -56,10 +56,10 @@
/* #define DEBUG */ /* /< define to print more logs in the kernel log
* and better follow the code flow */
-#ifdef pr_fmt
#undef pr_fmt
-#define pr_fmt(fmt) "[ FTS ] " fmt
-#endif
+#define pr_fmt(fmt) "gtd: fts: " fmt
+#undef dev_fmt
+#define dev_fmt(fmt) "gtd: " fmt
#define PINCTRL_STATE_ACTIVE "pmx_ts_active"
#define PINCTRL_STATE_SUSPEND "pmx_ts_suspend"