Browse Source

touch: fixing compilation errors

fixing compilation errors in raydium driver code.

Change-Id: Ia2b5d1b12c8fe7f5c5832ac5ee656555822ec7db
Signed-off-by: Srikanth Katteboina <[email protected]>
Srikanth Katteboina 2 years ago
parent
commit
03bb25d1f1
3 changed files with 10 additions and 51 deletions
  1. 1 43
      raydium/chip_raydium/f303_ic_test.c
  2. 1 0
      raydium/raydium_driver.c
  3. 8 8
      raydium/raydium_sysfs.c

+ 1 - 43
raydium/chip_raydium/f303_ic_test.c

@@ -501,7 +501,7 @@ STATUS burn_header_log_to_flash_3x(bool is_test_finish, bool is_in_header_data_p
 	DEBUGOUT("End burn header\r\n");
 	return SUCCESS;
 }
-
+#endif
 STATUS turn_on_flash_3x(void)
 {
 	unsigned int u32_read = 0;
@@ -1921,49 +1921,7 @@ STATUS load_test_fw_3x(void)
 
 	return u8_ret;
 }
-/*
- *	STATUS check_ext_flash_fw_version(void)
- *	{
- *	unsigned int u32_addr, u32_normal_fw_version, u32_test_fw_version;
- *	unsigned short u16_data_length = 0;
- *	u16_data_length = 4;
- *
- *
- *	//get normal FW version from ext flash//
- *	u32_addr = FLASH_NORMAL_FW_FW_VERSION_ADDR;
- *	if (read_flash_data(u32_addr, u16_data_length) == ERROR) {
- *		DEBUGOUT("Read Ext Flash NG [0x%08X] \r\n", u32_addr);
- *		return ERROR;
- *	}
- *	u32_normal_fw_version = 0;
- *	u32_normal_fw_version |= g_u8_data_buf[0];
- *	u32_normal_fw_version |= g_u8_data_buf[1] << 8;
- *	u32_normal_fw_version |= g_u8_data_buf[2] << 16;
- *	u32_normal_fw_version |= g_u8_data_buf[3] << 24;
- *	//DEBUGOUT("SPI Read_addr = 0x%08X, u16DataLength = %d \r\n", u32_normal_fw_version, u16_data_length);
- */
-	/* Test FW Version*/
-	u32_addr = FLASH_TEST_FW_FW_VERSION_ADDR;
-	if (read_flash_data(u32_addr, u16_data_length) == ERROR) {
-		DEBUGOUT("Read Ext Flash NG [0x%08X] \r\n", u32_addr);
-		return ERROR;
-	}
-	u32_test_fw_version = 0;
-	u32_test_fw_version |= g_u8_data_buf[0];
-	u32_test_fw_version |= g_u8_data_buf[1] << 8;
-	u32_test_fw_version |= g_u8_data_buf[2] << 16;
-	u32_test_fw_version |= g_u8_data_buf[3] << 24;
-	/*DEBUGOUT("SPI Read_addr = 0x%08X, u16DataLength = %d \r\n", u32_test_fw_version, u16_data_length);*/
-	if (g_st_test_para_resv.u32_normal_fw_version != u32_normal_fw_version
-	    || g_st_test_para_resv.u32_test_fw_version != u32_test_fw_version) {
-		DEBUGOUT("INI FW Version NG ,0x%08X VS 0x%08X \r\n", g_st_test_para_resv.u32_normal_fw_version, u32_normal_fw_version);
-		DEBUGOUT("INI Test FW Version NG ,0x%08X VS 0x%08X \r\n", g_st_test_para_resv.u32_test_fw_version, u32_test_fw_version);
-		return ERROR;
-	}
 
-	return SUCCESS;
-}
-#endif
 STATUS system_test_3x(void)
 {
 	STATUS u8_test_result = SUCCESS;

+ 1 - 0
raydium/raydium_driver.c

@@ -55,6 +55,7 @@ struct raydium_slot_status {
 struct raydium_slot_status gst_slot[MAX_TOUCH_NUM * 2];
 struct raydium_slot_status gst_slot_init = {0xFF, 0, 0};
 
+static int raydium_enable_regulator(struct raydium_ts_data *cd, bool en);
 #if (defined(CONFIG_RM_SYSFS_DEBUG))
 const struct attribute_group raydium_attr_group;
 #endif /*end of CONFIG_RM_SYSFS_DEBUG*/

+ 8 - 8
raydium/raydium_sysfs.c

@@ -567,18 +567,18 @@ static ssize_t raydium_mem_store(struct device *dev,
 		kfree(g_rad_fw_image);
 		g_rad_fw_image = NULL;
 	}
-	if (g_rad_para_image) {
-		ree(g_rad_para_image);
-		g_rad_para_image = NULL;
-	}
+
+	kfree(g_rad_para_image);
+	g_rad_para_image = NULL;
+
 	if (g_rad_testfw_image) {
 		kfree(g_rad_testfw_image);
 		g_rad_testfw_image = NULL;
 	}
-	if (g_rad_testpara_image) {
-		free(g_rad_testpara_image);
-		g_rad_testpara_image = NULL;
-	}
+
+	kfree(g_rad_testpara_image);
+	g_rad_testpara_image = NULL;
+
 	if (!raydium_id_init(u8_type)) {
 		LOGD(LOG_ERR, "[touch]Set Raydium id failed!\n");
 		return count;