mipi dsi cmd mode:
893 static unsigned int lcm_esd_check(void)
894 {
895 static int err_count = 0;
896 unsigned char buffer_1[12];
897 unsigned int array[16]={0};
898 int i;
899 unsigned char fResult;
900
901 /* esd check for nt35510 begin*/
902
903 /* esd check for nt35510 end*/
904
905 array[0] = 0x00063700;//0AH only 1 para
906 dsi_set_cmdq(array, 1, 1);
907
908 read_reg_v2(0x0A, buffer_1, 7);
909
910 for(i=0;i<11;i++)
911 {
912 buffer_1[i]=0;
913 }
914
915 if(err_report_buf[1] == 0x9C)
916 {
917
918 if((err_report_buf[4] == 0x02))
919 {
920 err_count ++;
921
922 array[0]=0x00063902;
923 array[1]=0x52AA55F0;
924 array[2]=0x00000108;
925 dsi_set_cmdq(array, 3, 1);
926 //MDELAY(10);
927 array[0] = 0x000c3700;//0AH only 1 para
928 dsi_set_cmdq(array, 1, 1);
929
930 read_reg_v2(0xD1, buffer_1, 12);
931 }
932 else
933 {
934 err_count = 0;
935 }
936 }
937 else
938 {
939 err_count ++;
940 }
941 #ifdef BUILD_UBOOT
942 //printf("nt35510 check id = 0x%08x\n", buffer_1[i]);
943 #else
944 printk("nt35510 check id err_count = %d\n", err_count);
945 #endif
946
947 #if 1
948 if(err_count >= 3)
949 {
950 err_count = 0;
951 fResult = 1;
952 }
953 else
954 {
955 fResult = 0;
956 }
957
958 if(fResult)
959 {
960 return 1;
961 }
962 else
963 {
964 return 0;
965 }
966 #endif
967 }