hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/input/touchscreen/gt1x/gt1x_update.c
....@@ -137,7 +137,7 @@
137137 .force_update = 0
138138 };
139139
140
-int gt1x_update_prepare(char *filename);
140
+// int gt1x_update_prepare(char *filename);
141141 int gt1x_check_firmware(void);
142142 u8 *gt1x_get_fw_data(u32 offset, int length);
143143 int gt1x_update_judge(void);
....@@ -149,13 +149,13 @@
149149 int gt1x_check_subsystem_in_flash(struct fw_subsystem_info *subsystem);
150150 int gt1x_read_flash(u32 addr, int length);
151151 int gt1x_error_erase(void);
152
-void dump_to_file(u16 addr, int length, char *filepath);
152
+// void dump_to_file(u16 addr, int length, char *filepath);
153153
154154 int gt1x_update_firmware(void *filename);
155155 int gt1x_auto_update_proc(void *data);
156156
157157 #if !GTP_HEADER_FW_UPDATE
158
-static int gt1x_search_update_files(void);
158
+// static int gt1x_search_update_files(void);
159159 #endif
160160
161161 int gt1x_hold_ss51_dsp(void);
....@@ -165,6 +165,7 @@
165165 * @return: return 0 if success, otherwise return a negative number
166166 * which contains the error code.
167167 */
168
+#if 0 //close for GKI
168169 s32 gt1x_check_fs_mounted(char *path_name)
169170 {
170171 struct path root_path;
....@@ -193,6 +194,7 @@
193194 path_put(&root_path);
194195 return err;
195196 }
197
+#endif
196198
197199 int gt1x_i2c_write_with_readback(u16 addr, u8 *buffer, int length)
198200 {
....@@ -226,7 +228,13 @@
226228
227229 int gt1x_auto_update_proc(void *data)
228230 {
229
-
231
+/* auto update from /data/_goodix_update_.bin
232
+ * Does not meet the gki standard.
233
+ * close auto update function.
234
+ */
235
+ GTP_ERROR("auto update failed! return\n");
236
+ return 0;
237
+#if 0
230238 #if GTP_HEADER_FW_UPDATE
231239 GTP_INFO("Start auto update thread...");
232240 gt1x_update_firmware(NULL);
....@@ -263,8 +271,9 @@
263271 }
264272 #endif
265273 return 0;
274
+#endif
266275 }
267
-#if !GTP_HEADER_FW_UPDATE
276
+#if 0 //!GTP_HEADER_FW_UPDATE
268277 static int gt1x_search_update_files(void)
269278 {
270279 /*wait 10s(max) if fs is not ready*/
....@@ -338,6 +347,12 @@
338347
339348 int gt1x_update_firmware(void *filename)
340349 {
350
+/*
351
+ * gt1x update firmware doesn't meet gki
352
+ */
353
+ GTP_ERROR("gt1x update firmware failed\n");
354
+ return 0;
355
+#if 0
341356 int i = 0;
342357 int ret = 0;
343358 u8 *p;
....@@ -461,8 +476,10 @@
461476 }
462477 GTP_INFO("Update firmware succeefully!");
463478 return ret;
479
+#endif
464480 }
465481
482
+#if 0 //close for GKI
466483 int gt1x_update_prepare(char *filename)
467484 {
468485 int ret = 0;
....@@ -629,6 +646,7 @@
629646
630647 return 0;
631648 }
649
+#endif
632650
633651 /**
634652 * @return: return a pointer pointed at the content of firmware
....@@ -1303,6 +1321,7 @@
13031321 gt1x_irq_enable();
13041322 }
13051323
1324
+#if 0 //close for GKI
13061325 void dump_to_file(u16 addr, int length, char *filepath)
13071326 {
13081327 struct file *flp = NULL;
....@@ -1330,6 +1349,7 @@
13301349 }
13311350 filp_close(flp, NULL);
13321351 }
1352
+#endif
13331353
13341354 int gt1x_hold_ss51_dsp_no_reset(void)
13351355 {