From 102a0743326a03cd1a1202ceda21e175b7d3575c Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Tue, 20 Feb 2024 01:20:52 +0000
Subject: [PATCH] add new system file
---
kernel/drivers/input/touchscreen/gt1x/gt1x_update.c | 30 +++++++++++++++++++++++++-----
1 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/kernel/drivers/input/touchscreen/gt1x/gt1x_update.c b/kernel/drivers/input/touchscreen/gt1x/gt1x_update.c
index 0979bb3..32171d9 100644
--- a/kernel/drivers/input/touchscreen/gt1x/gt1x_update.c
+++ b/kernel/drivers/input/touchscreen/gt1x/gt1x_update.c
@@ -137,7 +137,7 @@
.force_update = 0
};
-int gt1x_update_prepare(char *filename);
+// int gt1x_update_prepare(char *filename);
int gt1x_check_firmware(void);
u8 *gt1x_get_fw_data(u32 offset, int length);
int gt1x_update_judge(void);
@@ -149,13 +149,13 @@
int gt1x_check_subsystem_in_flash(struct fw_subsystem_info *subsystem);
int gt1x_read_flash(u32 addr, int length);
int gt1x_error_erase(void);
-void dump_to_file(u16 addr, int length, char *filepath);
+// void dump_to_file(u16 addr, int length, char *filepath);
int gt1x_update_firmware(void *filename);
int gt1x_auto_update_proc(void *data);
#if !GTP_HEADER_FW_UPDATE
-static int gt1x_search_update_files(void);
+// static int gt1x_search_update_files(void);
#endif
int gt1x_hold_ss51_dsp(void);
@@ -165,6 +165,7 @@
* @return: return 0 if success, otherwise return a negative number
* which contains the error code.
*/
+#if 0 //close for GKI
s32 gt1x_check_fs_mounted(char *path_name)
{
struct path root_path;
@@ -193,6 +194,7 @@
path_put(&root_path);
return err;
}
+#endif
int gt1x_i2c_write_with_readback(u16 addr, u8 *buffer, int length)
{
@@ -226,7 +228,13 @@
int gt1x_auto_update_proc(void *data)
{
-
+/* auto update from /data/_goodix_update_.bin
+ * Does not meet the gki standard.
+ * close auto update function.
+ */
+ GTP_ERROR("auto update failed! return\n");
+ return 0;
+#if 0
#if GTP_HEADER_FW_UPDATE
GTP_INFO("Start auto update thread...");
gt1x_update_firmware(NULL);
@@ -263,8 +271,9 @@
}
#endif
return 0;
+#endif
}
-#if !GTP_HEADER_FW_UPDATE
+#if 0 //!GTP_HEADER_FW_UPDATE
static int gt1x_search_update_files(void)
{
/*wait 10s(max) if fs is not ready*/
@@ -338,6 +347,12 @@
int gt1x_update_firmware(void *filename)
{
+/*
+ * gt1x update firmware doesn't meet gki
+ */
+ GTP_ERROR("gt1x update firmware failed\n");
+ return 0;
+#if 0
int i = 0;
int ret = 0;
u8 *p;
@@ -461,8 +476,10 @@
}
GTP_INFO("Update firmware succeefully!");
return ret;
+#endif
}
+#if 0 //close for GKI
int gt1x_update_prepare(char *filename)
{
int ret = 0;
@@ -629,6 +646,7 @@
return 0;
}
+#endif
/**
* @return: return a pointer pointed at the content of firmware
@@ -1303,6 +1321,7 @@
gt1x_irq_enable();
}
+#if 0 //close for GKI
void dump_to_file(u16 addr, int length, char *filepath)
{
struct file *flp = NULL;
@@ -1330,6 +1349,7 @@
}
filp_close(flp, NULL);
}
+#endif
int gt1x_hold_ss51_dsp_no_reset(void)
{
--
Gitblit v1.6.2