Index: output/otp.dat
===================================================================
--- /1121s/branch/shutter/branch/shutter/yb_project/yc1386s_shutter_188/output/otp.dat	(revision 4507)
+++ /1121s/branch/shutter/branch/shutter/yb_project/yc1386s_shutter_188/output/otp.dat	(working copy)
@@ -11,8 +11,8 @@
 00
 aa
 55
-d2
-08
+2a
+09
 c2
 84
 00
@@ -32,19 +32,19 @@
 c0
 0a
 01
-b5
+cb
 c0
 0a
 80
-ea
+eb
 c0
 0c
 00
-f8
+f9
 c0
 0c
 80
-b7
+b8
 c0
 0d
 00
@@ -56,23 +56,23 @@
 c0
 12
 82
-09
+1f
 c0
 13
-81
-fe
+82
+14
 c0
 58
 81
-02
+03
 c0
 62
-80
-ff
+81
+00
 c0
 6d
 01
-9e
+b4
 20
 20
 23
@@ -80,7 +80,7 @@
 c0
 12
 01
-d7
+ed
 c0
 12
 80
@@ -92,7 +92,7 @@
 c0
 1c
 81
-d1
+e7
 c0
 1f
 80
@@ -100,7 +100,7 @@
 c0
 26
 81
-d5
+eb
 c1
 7f
 80
@@ -487,6 +487,10 @@
 10
 70
 8a
+88
+40
+70
+8a
 13
 cd
 70
@@ -508,7 +512,7 @@
 20
 40
 00
-bf
+c0
 6f
 e0
 c4
@@ -536,7 +540,7 @@
 c0
 08
 00
-ac
+ad
 6f
 e0
 c4
@@ -580,7 +584,7 @@
 20
 40
 00
-9e
+9f
 70
 80
 43
@@ -604,15 +608,15 @@
 20
 40
 01
-70
+86
 20
 40
 01
-9b
+b1
 20
 40
 00
-99
+9a
 70
 41
 48
@@ -624,7 +628,7 @@
 20
 20
 01
-9d
+b3
 37
 d9
 82
@@ -652,7 +656,7 @@
 c0
 0c
 00
-a4
+a5
 6f
 e0
 c4
@@ -744,7 +748,7 @@
 20
 20
 00
-8b
+8c
 6f
 e0
 c1
@@ -752,7 +756,7 @@
 c0
 05
 00
-ba
+bb
 20
 20
 22
@@ -780,7 +784,7 @@
 20
 35
 80
-e6
+e7
 6f
 e2
 02
@@ -948,7 +952,7 @@
 20
 20
 00
-d0
+d1
 20
 40
 68
@@ -1116,7 +1120,7 @@
 58
 00
 01
-27
+3d
 67
 e1
 43
@@ -1124,7 +1128,7 @@
 58
 00
 01
-2a
+40
 67
 e1
 43
@@ -1140,7 +1144,7 @@
 58
 00
 01
-68
+7e
 67
 e1
 43
@@ -1148,15 +1152,23 @@
 58
 00
 01
-35
+4b
 67
 e1
 45
 24
+58
+00
+01
+2a
+67
+e1
+43
+d5
 20
 40
 62
-c2
+c4
 20
 40
 63
@@ -1168,7 +1180,7 @@
 c0
 00
 01
-24
+27
 6f
 e0
 c5
@@ -1193,6 +1205,82 @@
 20
 63
 40
+20
+40
+01
+2d
+20
+40
+6f
+35
+20
+20
+73
+9a
+6f
+e0
+c6
+ce
+20
+7a
+00
+00
+6f
+e0
+c5
+23
+1f
+e2
+72
+00
+da
+20
+45
+26
+ef
+e0
+80
+11
+68
+48
+c6
+cf
+98
+46
+7c
+00
+20
+22
+81
+38
+1f
+e2
+04
+00
+20
+40
+01
+3b
+1a
+20
+a2
+01
+c2
+00
+01
+32
+20
+60
+00
+00
+79
+20
+04
+07
+20
+20
+6e
+dd
 df
 e0
 00
@@ -1212,15 +1300,15 @@
 c0
 18
 81
-2f
+45
 c0
 0a
 81
-31
+47
 c0
 1f
 81
-69
+7f
 20
 20
 62
@@ -1264,7 +1352,7 @@
 20
 3a
 01
-3c
+52
 70
 48
 c2
@@ -1276,7 +1364,7 @@
 20
 20
 01
-46
+5c
 70
 48
 c2
@@ -1308,7 +1396,7 @@
 24
 3a
 01
-45
+5b
 70
 48
 c1
@@ -1332,11 +1420,11 @@
 c0
 00
 01
-56
+6c
 c0
 00
 81
-4c
+62
 20
 60
 00
@@ -1380,7 +1468,7 @@
 20
 20
 01
-65
+7b
 58
 00
 00
@@ -1420,7 +1508,7 @@
 20
 20
 01
-65
+7b
 68
 49
 44
@@ -1536,7 +1624,7 @@
 20
 40
 01
-8d
+a3
 2a
 2f
 fe
@@ -1568,7 +1656,7 @@
 20
 40
 01
-8d
+a3
 d8
 a0
 8a
@@ -1596,7 +1684,7 @@
 20
 21
 01
-82
+98
 20
 20
 21
@@ -1700,7 +1788,7 @@
 20
 40
 01
-ae
+c4
 70
 8a
 08
@@ -1744,7 +1832,7 @@
 c3
 02
 81
-af
+c5
 68
 59
 01
@@ -1780,7 +1868,7 @@
 c0
 08
 01
-ce
+e4
 58
 00
 57
@@ -1824,7 +1912,7 @@
 c0
 08
 01
-cb
+e1
 58
 00
 2b
@@ -1860,7 +1948,7 @@
 20
 20
 01
-c7
+dd
 58
 00
 83
@@ -1872,7 +1960,7 @@
 20
 20
 01
-bc
+d2
 6f
 e0
 c3
@@ -1904,7 +1992,7 @@
 c5
 97
 81
-dd
+f3
 78
 3c
 fc
@@ -1948,7 +2036,7 @@
 20
 37
 01
-e6
+fc
 1b
 42
 04
@@ -1995,8 +2083,8 @@
 77
 20
 40
-01
-f4
+02
+0a
 6f
 e0
 81
@@ -2112,7 +2200,7 @@
 20
 40
 00
-9b
+9c
 6f
 e2
 40
@@ -2128,7 +2216,7 @@
 20
 40
 02
-1c
+32
 6f
 e0
 c0
@@ -2240,7 +2328,7 @@
 20
 22
 82
-2f
+45
 e7
 e0
 80
@@ -2260,7 +2348,7 @@
 c2
 00
 02
-29
+3f
 1a
 42
 04
@@ -2269,8 +2357,8 @@
 60
 00
 00
-88
-c7
+6d
+24
 aa
 55
 40
@@ -2655,5 +2743,5 @@
 55
 b5
 55
-7d
-f8
+3b
+88
Index: output/ramcode.rom
===================================================================
--- /1121s/branch/shutter/branch/shutter/yb_project/yc1386s_shutter_188/output/ramcode.rom	(revision 4507)
+++ /1121s/branch/shutter/branch/shutter/yb_project/yc1386s_shutter_188/output/ramcode.rom	(working copy)
@@ -2,24 +2,24 @@
 c0000018
 c001005a
 c0088063
-c00a01b5
-c00a80ea
-c00c00f8
-c00c80b7
+c00a01cb
+c00a80eb
+c00c00f9
+c00c80b8
 c00d0071
 c00e001c
-c0128209
-c01381fe
-c0588102
-c06280ff
-c06d019e
+c012821f
+c0138214
+c0588103
+c0628100
+c06d01b4
 2020235a
-c01201d7
+c01201ed
 c0128055
 c0130045
-c01c81d1
+c01c81e7
 c01f802a
-c02681d5
+c02681eb
 c17f8000
 2020235a
 2435a002
@@ -116,19 +116,20 @@
 37d98200
 7089460d
 70896f10
+708a8840
 708a13cd
 708a0610
 708a844a
 708a8540
 708a16fe
-204000bf
+204000c0
 6fe0c436
 205a70d7
 24558041
 37d98200
 70813b5f
 6fe0c099
-c00800ac
+c00800ad
 6fe0c438
 1fe1fe04
 67f08a02
@@ -139,25 +140,25 @@
 67f18a73
 708a8660
 708a8b3b
-2040009e
+2040009f
 70804300
 70804205
 58557474
 67f18968
 7089606e
-20400170
-2040019b
-20400099
+20400186
+204001b1
+2040009a
 7041480c
 20406f4e
-2020019d
+202001b3
 37d98200
 6fe0c11c
 67f0813a
 37d98200
 20600000
 6fe0c099
-c00c00a4
+c00c00a5
 6fe0c438
 1fe1fe06
 67f08a02
@@ -180,16 +181,16 @@
 67f18a73
 708a762a
 70890204
-2020008b
+2020008c
 6fe0c141
-c00500ba
+c00500bb
 2020220e
 708a1425
 58a93f3f
 67f18a60
 708a631f
 20600000
-203580e6
+203580e7
 6fe2020d
 207a0000
 37d98200
@@ -231,7 +232,7 @@
 6fe1415b
 207a0000
 67e1020f
-202000d0
+202000d1
 2040686f
 204021ba
 18002a08
@@ -273,33 +274,54 @@
 67e44512
 6fe448a6
 67e444fa
-58000127
+5800013d
 67e143db
-5800012a
+58000140
 67e143dd
 5800638a
 67e143df
-58000168
+5800017e
 67e143e3
-58000135
+5800014b
 67e14524
-204062c2
+5800012a
+67e143d5
+204062c4
 20406396
 6fe0c51a
-c0000124
+c0000127
 6fe0c51b
 67e0c4ec
 202063a1
 7044ecff
 70451c01
 20206340
+2040012d
+20406f35
+2020739a
+6fe0c6ce
+207a0000
+6fe0c523
+1fe27200
+da204526
+efe08011
+6848c6cf
+98467c00
+20228138
+1fe20400
+2040013b
+1a20a201
+c2000132
+20600000
+79200407
+20206edd
 dfe0000a
 204070c8
 20206327
 1a627e00
-c018812f
-c00a8131
-c01f8169
+c0188145
+c00a8147
+c01f817f
 202062da
 7048ae01
 20600000
@@ -310,10 +332,10 @@
 2040635d
 24760000
 1a227e00
-203a013c
+203a0152
 7048c200
 20404323
-20200146
+2020015c
 7048c201
 7048c100
 20404325
@@ -321,14 +343,14 @@
 6fe0c8c1
 247a0000
 6fe0c8c2
-243a0145
+243a015b
 7048c101
 20206371
 6fe0c8c3
 79407e00
 67e0c8c3
-c0000156
-c000814c
+c000016c
+c0008162
 20600000
 58000000
 67e1452e
@@ -339,7 +361,7 @@
 58000006
 67e1455b
 da60452e
-20200165
+2020017b
 58000000
 67e1452e
 58000002
@@ -349,7 +371,7 @@
 58000006
 67e1455b
 da60452e
-20200165
+2020017b
 68494430
 e7e08002
 efe08005
@@ -378,7 +400,7 @@
 708ac200
 708ac300
 d8e00006
-2040018d
+204001a3
 2a2ffe0d
 2040211d
 2a4ffe0d
@@ -386,14 +408,14 @@
 d8e00005
 2040211c
 2040211e
-2040018d
+204001a3
 d8a08ac2
 1a31fe00
 20402117
 1a51fe00
 20402117
 18e08fff
-20210182
+20210198
 2020214f
 2000003c
 58000f00
@@ -419,7 +441,7 @@
 6fe0c409
 67f080cd
 20000bb8
-204001ae
+204001c4
 708a08c1
 6a40c419
 df200008
@@ -430,7 +452,7 @@
 20600000
 7080cc03
 6ff08129
-c30281af
+c30281c5
 68590164
 6049440a
 7080cc00
@@ -439,7 +461,7 @@
 708a8d12
 708a8e0a
 6fe0c099
-c00801ce
+c00801e4
 58005762
 67f10907
 70890103
@@ -450,7 +472,7 @@
 708a8d44
 708a8e0a
 6fe0c099
-c00801cb
+c00801e1
 58002bb1
 67f10907
 c6978000
@@ -459,10 +481,10 @@
 20600000
 58004189
 67f10907
-202001c7
+202001dd
 58008312
 67f10907
-202001bc
+202001d2
 6fe0c334
 c1000000
 c001b04a
@@ -470,7 +492,7 @@
 793f8030
 20202af6
 204025c2
-c59781dd
+c59781f3
 783cfc00
 2000001e
 204025c2
@@ -481,7 +503,7 @@
 78507c00
 19623600
 37c18400
-203701e6
+203701fc
 1b420400
 604b000f
 242c26fa
@@ -493,7 +515,7 @@
 984fb600
 20406877
 20372677
-204001f4
+2040020a
 6fe08168
 c301a677
 2055a477
@@ -522,11 +544,11 @@
 6fe143e9
 20407d79
 58000012
-2040009b
+2040009c
 6fe240ad
 9840fe00
 67e240ad
-2040021c
+20400232
 6fe0c0cb
 79207e04
 204023e1
@@ -554,11 +576,11 @@
 efe08011
 e8408013
 98467c00
-2022822f
+20228245
 e7e08013
 37d98200
 1a20a201
 1a60a601
-c2000229
+c200023f
 1a420400
 20600000
Index: program/patch.prog
===================================================================
--- /1121s/branch/shutter/branch/shutter/yb_project/yc1386s_shutter_188/program/patch.prog	(revision 4507)
+++ /1121s/branch/shutter/branch/shutter/yb_project/yc1386s_shutter_188/program/patch.prog	(working copy)
@@ -159,7 +159,7 @@
 
 	jam 0x0d,0x8946
 	jam 0x10,0x896f
-
+	jam 0x40,core_rx_cfg0
 	jam 0xcd,0x8a13
 	jam 0x10,0x8a06
 	jam 0x4a,0x8a84
@@ -373,7 +373,10 @@
 	setarg p_shutter_key_change
 	store 2,mem_cb_shutter_keycan
 
-	call shutter_common_init
+	setarg p_shutter_le_before_hibernate
+	store 2,mem_cb_before_hibernate
+
+	call shutter_common_init+2
 	call shutter_load_buffer_config_form_DataRom
 
 p_shutter_power_switch:
@@ -388,6 +391,33 @@
 	jam SS_STATE_POWER_ON,mem_shutter_soft_switch_power_state
 	branch shutter_start_reconnect
 
+p_shutter_le_before_hibernate:
+	call p_set_key_gpio_before_hiernate
+	call gpio_set_before_lpm
+	branch disable_authrom
+
+p_set_key_gpio_before_hiernate:
+	fetch 1,mem_shutter_hard_soft_switch_case_temp
+	rtn blank
+	fetch 1,mem_shutter_key_num
+	copy pdata,loopcnt
+	arg mem_shutter_key_conf0,rega
+p_set_key_gpio_loop:
+	ifetch 1,rega
+	fetcht 1,mem_shutter_soft_switch_button_gpio_temp
+	isub temp,null
+	branch p_set_key_gpio_loop_end,zero
+	copy pdata,temp
+	call p_shutter_gpio_config_input_pd
+p_set_key_gpio_loop_end:
+	increase 1,rega
+	loop p_set_key_gpio_loop
+	rtn
+
+p_shutter_gpio_config_input_pd:
+	set1 gpio_active_bit,temp
+	branch gpio_config_input
+
 p_shutter_process_idle:
 	arg 10, pdata //Լ96ms
 	call wdt_init_config
@@ -445,7 +475,7 @@
 	beq 1,p_key_release_set_volume_inc
 	rtn
 
-	p_key_release_set_volume_inc:
+p_key_release_set_volume_inc:
 	setarg 0x0000
 	store 2,mem_key0_press
 	setarg 0x0001
