Index: output/otp.dat
===================================================================
--- /1121s/branch/mouse/mouse_public_Single_Mode/output/otp.dat	(revision 5743)
+++ /1121s/branch/mouse/mouse_public_Single_Mode/output/otp.dat	(working copy)
@@ -120,7 +120,7 @@
 ca
 91
 6a
-fa
+84
 f6
 82
 fe
@@ -176,7 +176,7 @@
 41
 16
 1f
-ff
+f9
 ad
 40
 82
@@ -5343,338 +5343,338 @@
 07
 6b
 0a
-d9
-93
-1b
-4f
+da
+8c
+fe
+b5
 94
 ff
 2a
 ed
-5a
-51
-f5
+57
+26
+f4
+fd
+da
+97
+63
+bf
+65
+08
+de
+3f
+ec
+1c
 78
-5f
-a2
+b0
+29
+8f
+dd
 2c
-7f
-f5
-a7
-3e
-7a
-33
-46
-37
-70
-b6
-2e
-3d
-13
-09
-79
-ec
-3b
+d6
+2f
+eb
+93
 55
 9d
-67
-ab
-39
-48
+87
 94
-83
-c6
-ed
-5c
-46
-2a
-2e
-3e
-a0
-48
-9d
+d2
+93
+d8
+ab
+80
+b4
+24
+06
+44
+c8
+3a
+80
 a1
-6c
-18
-29
+78
+39
+c0
+41
+7c
 8a
-77
-b3
-1d
-91
+17
+80
+d7
+29
+2e
+af
+e5
+79
+27
+be
+62
+c2
+79
+c4
+9b
 d6
-8a
-b0
-01
-07
-e4
-4d
-dd
-ce
-f0
-dc
-ae
-35
-13
+75
+16
+62
 52
-6d
-6c
-df
-e7
+8f
+97
+29
 43
 d9
-01
-a8
-1d
-bb
-29
-96
+6d
+7c
+65
+fb
+7e
+58
 eb
 6c
-c8
-fb
+f7
+0d
 c4
 b0
-46
-87
+47
+d7
 4f
 cc
-15
-19
+46
+46
 fd
-67
+07
 b0
-7e
-7a
-a6
-91
-61
 65
-cc
-a5
-e4
-fd
-36
-d8
+35
 06
-45
-9d
+5d
+79
+84
+e9
 73
-3d
-d4
-e3
-33
-6b
-17
-7d
+e8
+b2
+f6
+4e
+76
+a4
+d8
+ab
+71
+9b
+23
+a5
+cb
+13
+07
 6d
-0a
+26
 c6
 bb
 ed
-6c
+69
 58
 b8
 94
-8d
-c1
-de
-03
-aa
-f5
-71
-7c
-38
+b2
+8e
+7e
+92
+a0
+f1
+0b
+21
+32
 2b
-e5
-75
-67
-0c
-9f
-83
-99
-02
-83
-29
-b7
+85
+7a
+42
+5c
+96
+ff
+ce
+52
+ea
+04
+1a
 c7
 20
+b7
 b5
-b5
-85
-00
 ea
+ab
+b4
 ba
-a3
-f7
-82
+bb
+f6
+3f
+72
+61
+8d
+e8
+be
+0e
+6d
+27
+35
+c5
+bc
+0b
+9c
+e7
+8b
+59
 36
-11
-8f
-0a
+8c
 f9
-fe
-63
+47
+50
+bb
+e5
+0f
+0c
+94
+4a
+1c
 9d
-71
-8a
-7e
-48
-bc
 10
-2d
-e3
-7e
-34
-9d
-be
-39
-f4
-27
-4c
-29
-64
-44
-a6
-d8
-5f
-90
-3f
-75
-42
-73
-f9
+52
+7c
+5d
+b2
+7d
+43
+71
+06
+19
+a9
+0d
+c7
+2f
 34
-49
-db
-ea
-3c
-7f
-29
-1f
-31
+ca
 e0
-cf
-28
-fa
+ad
+a8
+f9
 df
-5e
+3e
 92
-f8
-27
-a9
-12
-f6
-9b
-0c
-d7
+e6
+6f
+a1
+d1
+ce
+d4
+cc
+46
+87
+4b
+70
+b1
+55
+c3
+ee
 2a
-bb
-7e
-0b
-10
-8c
-2c
-3b
-5a
-99
-ea
-0c
+c4
+21
 ec
+27
+03
 32
-04
-01
-e5
-fa
-0a
+06
+d3
+44
+b2
+02
+4f
+b1
+81
+ee
+66
+46
+44
+7d
+e9
+c2
+da
+10
+92
 de
-1b
-ce
-2e
-a5
-78
-b4
-73
-53
-87
-95
-d2
-d1
-ea
-54
-18
-c9
-51
+ec
+1e
+b0
+2c
 e8
-fd
-de
-be
+ff
+5e
+ae
 2f
 dc
 0a
-ae
+ac
 34
-63
+03
 15
-d6
+c8
 42
-c2
-0e
-6e
+a2
+5c
+f4
 d4
 f5
 bd
-70
+72
 f2
-fa
-0c
-c4
+9a
+5e
+5e
 f8
-b8
-f1
-75
-c0
-1a
-c6
-d5
+d8
+a3
+eb
+fa
+1b
+bd
+46
 61
 14
 3a
-34
+22
 cb
 71
 76
-19
+01
 db
 a2
 77
-72
+77
 f4
 17
 78
-b7
+ac
 3c
 c2
 36
-82
+8d
 9b
 71
 f5
-35
+36
 8f
 f6
 22
-2b
-33
-48
-2f
-fc
-c2
-0a
-88
-b2
-d7
-a4
+2d
+ce
+05
+51
+ee
+e2
+2a
+df
+4d
+16
+f6
 17
 c4
 aa
Index: output/program.lis
===================================================================
--- /1121s/branch/mouse/mouse_public_Single_Mode/output/program.lis	(revision 5743)
+++ /1121s/branch/mouse/mouse_public_Single_Mode/output/program.lis	(working copy)
@@ -22,7 +22,7 @@
 0013 c03984f2 beq patch0e_3 ,p_mouse_setgpio_hibernate 
 0014 c03a023b beq patch0e_4 ,p_mouse_lpm_before_common 
 0015 c03c8515 beq patch0f_1 ,p_mouse_le_name_modify 
-0016 c03d053f beq patch0f_2 ,p_mouse_motion 
+0016 c03d0541 beq patch0f_2 ,p_mouse_motion 
 0017 c03f84d3 beq patch0f_7 ,p_mouse_3io6key_check 
 0018 c0408524 beq patch10_1 ,p_mouse_init_sensor 
 0019 c04203c1 beq patch10_4 ,p_mouse_buletooth_fast_conn_end 
@@ -36,7 +36,7 @@
 0021 c0468393 beq patch11_5 ,p_mouse_store_dpi_info_check 
 0022 c04704ba beq patch11_6 ,p_mouse_idle 
 0023 c0480308 beq patch12_0 ,p_mouse_check_select_device_by_switch 
-0024 c049854a beq patch12_3 ,p_mouse_drawing_optima 
+0024 c049854c beq patch12_3 ,p_mouse_drawing_optima 
 0025 c04a84e9 beq patch12_5 ,p_mouse_24g_hibernate_set 
 0026 c04b04fe beq patch12_6 ,p_mouse_24g_package_data 
 0027 c0628271 beq patch18_5 ,p_otp_read_data 
@@ -1758,125 +1758,127 @@
 052f 20205995 branch mouse_sensor_wr_seq 
 
 p_mouse_check_sensor_data:
-0530 6fe0c420 fetch 1 ,mem_spi_write_flash_sm 
-0531 c1800000 rtnne flash_sm_no_buys 
-0532 6fe0c957 fetch 1 ,mem_config_sensor_type 
-0533 c0058535 beq ka8g2 ,p_mouse_pka8g2_sensor_motion 
-0534 202059f8 branch mouse_check_sensor_data + 2 
+0530 6fe0c73f fetch 1 ,mem_sensor_shutdown_flag 
+0531 247a0000 nrtn blank 
+0532 6fe0c420 fetch 1 ,mem_spi_write_flash_sm 
+0533 c1800000 rtnne flash_sm_no_buys 
+0534 6fe0c957 fetch 1 ,mem_config_sensor_type 
+0535 c0058537 beq ka8g2 ,p_mouse_pka8g2_sensor_motion 
+0536 202059f8 branch mouse_check_sensor_data + 2 
 
 p_mouse_pka8g2_sensor_motion:
-0535 20405a6d call mouse_clear_sensor_data 
-0536 6fe0c659 fetch 1 ,mem_sensor_motion_gpio 
-0537 c07f853b beq gpio_disable ,p_mouse_pka8g2_sensor_motion_1 
-0538 6848c659 fetcht 1 ,mem_sensor_motion_gpio 
-0539 20406ee6 call gpio_get_bit 
-053a 24608000 nrtn true 
+0537 20405a6d call mouse_clear_sensor_data 
+0538 6fe0c659 fetch 1 ,mem_sensor_motion_gpio 
+0539 c07f853d beq gpio_disable ,p_mouse_pka8g2_sensor_motion_1 
+053a 6848c659 fetcht 1 ,mem_sensor_motion_gpio 
+053b 20406ee6 call gpio_get_bit 
+053c 24608000 nrtn true 
 
 p_mouse_pka8g2_sensor_motion_1:
-053b 58000000 setarg pan_reg_pid_l 
-053c 204069e5 call twspi_read 
-053d c0ac5955 bne pka8g2_id1 ,mouse_twspi_reset 
-053e 20205a2f branch mouse_p3212_sensor_motion_2 
+053d 58000000 setarg pan_reg_pid_l 
+053e 204069e5 call twspi_read 
+053f c0ac5955 bne pka8g2_id1 ,mouse_twspi_reset 
+0540 20205a2f branch mouse_p3212_sensor_motion_2 
 
 p_mouse_motion:
-053f 78547c00 disable user 
-0540 58000000 setarg 0 
-0541 67e34847 store 6 ,mem_mouse_x 
-0542 20400530 call p_mouse_check_sensor_data 
-0543 58000089 setarg 0x0089 
-0544 204069e4 call twspi_write 
-0545 20405747 call mouse_setting_sensor_type 
-0546 20405612 call mouse_zwheel 
-0547 20405617 call mouse_t_zwheel 
-0548 2040054d call p_mouse_key 
-0549 2020560c branch mouse_motion + 11 
+0541 78547c00 disable user 
+0542 58000000 setarg 0 
+0543 67e34847 store 6 ,mem_mouse_x 
+0544 20400530 call p_mouse_check_sensor_data 
+0545 58000089 setarg 0x0089 
+0546 204069e4 call twspi_write 
+0547 20405747 call mouse_setting_sensor_type 
+0548 20405612 call mouse_zwheel 
+0549 20405617 call mouse_t_zwheel 
+054a 2040054f call p_mouse_key 
+054b 2020560c branch mouse_motion + 11 
 
 p_mouse_drawing_optima:
-054a 6fe0c957 fetch 1 ,mem_config_sensor_type 
-054b c1058000 rtneq ka8g2 
-054c 20205f27 branch mouse_drawing_optima + 1 
+054c 6fe0c957 fetch 1 ,mem_config_sensor_type 
+054d c1058000 rtneq ka8g2 
+054e 20205f27 branch mouse_drawing_optima + 1 
 
 p_mouse_key:
-054d 2040584c call mouse_check_firekey_gpio 
-054e 6fe0c987 fetch 1 ,mem_fire_key_flag 
-054f 243a5860 nbranch fire_key_press ,blank 
-0550 6fe0c982 fetch 1 ,mem_fire_key_status 
-0551 243a585f nbranch fire_key_process ,blank 
-0552 20405888 call mouse_check_key_gpio 
-0553 20400555 call p_mouse_ghost_key_check 
-0554 202057ad branch mouse_key + 7 
+054f 2040584c call mouse_check_firekey_gpio 
+0550 6fe0c987 fetch 1 ,mem_fire_key_flag 
+0551 243a5860 nbranch fire_key_press ,blank 
+0552 6fe0c982 fetch 1 ,mem_fire_key_status 
+0553 243a585f nbranch fire_key_process ,blank 
+0554 20405888 call mouse_check_key_gpio 
+0555 20400557 call p_mouse_ghost_key_check 
+0556 202057ad branch mouse_key + 7 
 
 p_mouse_ghost_key_check:
-0555 70497900 jam 0 ,mem_mouse_matrix_key_cow_count 
-0556 70497a00 jam 0 ,mem_mouse_matrix_key_row_count 
-0557 70497b00 jam 0 ,mem_mouse_ghost_flag 
-0558 1fe22400 copy pdata ,regb 
-0559 6848c644 fetcht 1 ,mem_lbutton_gpio 
-055a 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-055b 98467c00 isub temp ,null 
-055c 20228567 branch p_mouse_matrix_ghost_key_l_bk ,zero 
-055d 6fe0c648 fetch 1 ,mem_fw_button_gpio 
-055e 98467c00 isub temp ,null 
-055f 2022856d branch p_mouse_matrix_ghost_key_l_fw ,zero 
-0560 6848c645 fetcht 1 ,mem_mbutton_gpio 
-0561 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-0562 98467c00 isub temp ,null 
-0563 20228576 branch p_mouse_ghost_key_mbk_rfw ,zero 
+0557 70497900 jam 0 ,mem_mouse_matrix_key_cow_count 
+0558 70497a00 jam 0 ,mem_mouse_matrix_key_row_count 
+0559 70497b00 jam 0 ,mem_mouse_ghost_flag 
+055a 1fe22400 copy pdata ,regb 
+055b 6848c644 fetcht 1 ,mem_lbutton_gpio 
+055c 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+055d 98467c00 isub temp ,null 
+055e 20228569 branch p_mouse_matrix_ghost_key_l_bk ,zero 
+055f 6fe0c648 fetch 1 ,mem_fw_button_gpio 
+0560 98467c00 isub temp ,null 
+0561 2022856f branch p_mouse_matrix_ghost_key_l_fw ,zero 
+0562 6848c645 fetcht 1 ,mem_mbutton_gpio 
+0563 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+0564 98467c00 isub temp ,null 
+0565 20228578 branch p_mouse_ghost_key_mbk_rfw ,zero 
 
 p_mouse_ghost_key_mfw_rbk:
-0564 204057fb call mouse_ghost_key_check_m_fw 
+0566 204057fb call mouse_ghost_key_check_m_fw 
 
 p_mouse_ghost_key_rbk:
-0565 2040057b call p_mouse_ghost_key_check_r_bk 
-0566 202057e5 branch mouse_ghost_key_check_next 
+0567 2040057d call p_mouse_ghost_key_check_r_bk 
+0568 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_matrix_ghost_key_l_bk:
-0567 6848c645 fetcht 1 ,mem_mbutton_gpio 
-0568 6fe0c648 fetch 1 ,mem_fw_button_gpio 
-0569 98467c00 isub temp ,null 
-056a 2022d7d6 branch mouse_ghost_key_lbk_mfw ,zero 
+0569 6848c645 fetcht 1 ,mem_mbutton_gpio 
+056a 6fe0c648 fetch 1 ,mem_fw_button_gpio 
+056b 98467c00 isub temp ,null 
+056c 2022d7d6 branch mouse_ghost_key_lbk_mfw ,zero 
 
 p_mouse_ghost_key_lbk_rfw:
-056b 204057ef call mouse_ghost_key_check_l_bk 
-056c 20200577 branch p_mouse_ghost_key_rfw 
+056d 204057ef call mouse_ghost_key_check_l_bk 
+056e 20200579 branch p_mouse_ghost_key_rfw 
 
 p_mouse_matrix_ghost_key_l_fw:
-056d 6848c645 fetcht 1 ,mem_mbutton_gpio 
-056e 6fe0c647 fetch 1 ,mem_bk_button_gpio 
-056f 98467c00 isub temp ,null 
-0570 20228573 branch p_mouse_ghost_key_lfw_mbk ,zero 
+056f 6848c645 fetcht 1 ,mem_mbutton_gpio 
+0570 6fe0c647 fetch 1 ,mem_bk_button_gpio 
+0571 98467c00 isub temp ,null 
+0572 20228575 branch p_mouse_ghost_key_lfw_mbk ,zero 
 
 p_mouse_ghost_key_lfw_rbk:
-0571 2040057d call p_mouse_ghost_key_check_l_fw 
-0572 20200565 branch p_mouse_ghost_key_rbk 
+0573 2040057f call p_mouse_ghost_key_check_l_fw 
+0574 20200567 branch p_mouse_ghost_key_rbk 
 
 p_mouse_ghost_key_lfw_mbk:
-0573 2040057d call p_mouse_ghost_key_check_l_fw 
-0574 20400579 call p_mouse_ghost_key_check_m_bk 
-0575 202057e5 branch mouse_ghost_key_check_next 
+0575 2040057f call p_mouse_ghost_key_check_l_fw 
+0576 2040057b call p_mouse_ghost_key_check_m_bk 
+0577 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_ghost_key_mbk_rfw:
-0576 20400579 call p_mouse_ghost_key_check_m_bk 
+0578 2040057b call p_mouse_ghost_key_check_m_bk 
 
 p_mouse_ghost_key_rfw:
-0577 2040057f call p_mouse_ghost_key_check_r_fw 
-0578 202057e5 branch mouse_ghost_key_check_next 
+0579 20400581 call p_mouse_ghost_key_check_r_fw 
+057a 202057e5 branch mouse_ghost_key_check_next 
 
 p_mouse_ghost_key_check_m_bk:
-0579 1a417e12 and regb ,mouse_m_bk_button ,pdata 
-057a 202057f3 branch mouse_ghost_key_check_m_bk + 1 
+057b 1a417e12 and regb ,mouse_m_bk_button ,pdata 
+057c 202057f3 branch mouse_ghost_key_check_m_bk + 1 
 
 p_mouse_ghost_key_check_r_bk:
-057b 1a417e0a and regb ,mouse_r_bk_button ,pdata 
-057c 202057f6 branch mouse_ghost_key_check_r_bk + 1 
+057d 1a417e0a and regb ,mouse_r_bk_button ,pdata 
+057e 202057f6 branch mouse_ghost_key_check_r_bk + 1 
 
 p_mouse_ghost_key_check_l_fw:
-057d 1a417e11 and regb ,mouse_l_fw_button ,pdata 
-057e 202057f9 branch mouse_ghost_key_check_l_fw + 1 
+057f 1a417e11 and regb ,mouse_l_fw_button ,pdata 
+0580 202057f9 branch mouse_ghost_key_check_l_fw + 1 
 
 p_mouse_ghost_key_check_r_fw:
-057f 1a417e12 and regb ,mouse_r_fw_button ,pdata 
-0580 202057ff branch mouse_ghost_key_check_r_fw + 1 
+0581 1a417e12 and regb ,mouse_r_fw_button ,pdata 
+0582 202057ff branch mouse_ghost_key_check_r_fw + 1 
               org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /1121s/branch/mouse/mouse_public_Single_Mode/program/patch.prog	(revision 5743)
+++ /1121s/branch/mouse/mouse_public_Single_Mode/program/patch.prog	(working copy)
@@ -1998,6 +1998,8 @@
 	branch mouse_sensor_wr_seq
 
 p_mouse_check_sensor_data:
+	fetch 1,mem_sensor_shutdown_flag
+	nrtn blank
 	fetch 1,mem_spi_write_flash_sm
 	rtnne FLASH_SM_NO_BUYS
 	fetch 1,mem_config_sensor_type
