rhode: update charger mode & ito test result

1.enter charger mode when usb plugin;
2.create ito test failed file when ito test fail

Change-Id: I33e8a05a4dc4a81200406751ad8480a1a97993b9
Signed-off-by: huaqin71 <huaqin71@motorola.com>
Reviewed-on: https://gerrit.mot.com/2200364
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
huaqin71 2022-02-24 17:25:31 +08:00 • committed by huaqin89
commit bbda3c0318
5 changed files with 12 additions and 6 deletions

View file

@ -253,7 +253,7 @@
/*
* auto upgrade
*/
#define FTS_AUTO_UPGRADE_EN 1
#define FTS_AUTO_UPGRADE_EN 0
/*
* auto upgrade for lcd cfg
@ -289,7 +289,7 @@
* You should rename fw to "focaltech_ts_fw_tianma", and push it into
* etc/firmware or by customers
*/
#define FTS_MODULE_NAME "csot"
#define FTS_MODULE_NAME ""
#define FTS_MODULE2_NAME ""
#define FTS_MODULE3_NAME ""

View file

@ -40,7 +40,7 @@
*****************************************************************************/
#define FTS_FW_REQUEST_SUPPORT 1
/* Example: focaltech_ts_fw_tianma.bin */
#define FTS_FW_NAME_PREX_WITH_REQUEST "focaltech_ts_fw_"
#define FTS_FW_NAME_PREX_WITH_REQUEST ""
/*****************************************************************************
* Global variable or extern global variabls/functions

View file

@ -1218,7 +1218,7 @@ static int fts_test_save_test_data(char *file_name, char *data_buf, int len)
snprintf(filepath, FILE_NAME_LENGTH, "%s%s", FTS_OUT_FILE_PATH, file_name);
FTS_INFO("save test data to %s", filepath);
if (NULL == pfile) {
pfile = filp_open(filepath, O_TRUNC | O_CREAT | O_RDWR, 0664);
pfile = filp_open(filepath, O_TRUNC | O_CREAT | O_RDWR, 0666);
}
if (IS_ERR(pfile)) {
FTS_TEST_ERROR("error occured while opening file %s.", filepath);

View file

@ -53,7 +53,7 @@
#define CSV_BUFFER_LEN (1024*80*5)
#define TXT_BUFFER_LEN (1024*80*5)
#define TEST_SAVE_FAIL_RESULT 0
#define TEST_SAVE_FAIL_RESULT 1
/*-----------------------------------------------------------
Test Status

View file

@ -217,9 +217,15 @@ static int fts_mmi_firmware_update(struct device *dev, char *fwname)
static int fts_mmi_charger_mode(struct device *dev, int mode)
{
struct fts_ts_data *ts_data;
int ret = 0;
GET_TS_DATA(dev);
ts_data->usb_detect_flag = !!mode;
ret = fts_write_reg(FTS_REG_CHARGER_MODE_EN, mode);
if(ret < 0){
FTS_ERROR("Failed to set charger mode\n");
}
FTS_INFO("Success to %s charger mode\n", mode ? "Enable" : "Disable");
return 0;
}