Lines Matching refs:buf
58 static int i2c_writebytes (struct nxt200x_state* state, u8 addr, u8 *buf, u8 len) in i2c_writebytes() argument
61 struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = buf, .len = len }; in i2c_writebytes()
71 static int i2c_readbytes(struct nxt200x_state *state, u8 addr, u8 *buf, u8 len) in i2c_readbytes() argument
74 struct i2c_msg msg = { .addr = addr, .flags = I2C_M_RD, .buf = buf, .len = len }; in i2c_readbytes()
85 const u8 *buf, u8 len) in nxt200x_writebytes() argument
89 …struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf2, .len = len +… in nxt200x_writebytes()
98 memcpy(&buf2[1], buf, len); in nxt200x_writebytes()
108 static int nxt200x_readbytes(struct nxt200x_state *state, u8 reg, u8 *buf, u8 len) in nxt200x_readbytes() argument
112 …struct i2c_msg msg [] = { { .addr = state->config->demod_address, .flags = 0, .buf = reg2, .len = … in nxt200x_readbytes()
113 { .addr = state->config->demod_address, .flags = I2C_M_RD, .buf = buf, .len = len } }; in nxt200x_readbytes()
143 u8 attr, len2, buf; in nxt200x_writereg_multibyte() local
155 buf = 0x02; in nxt200x_writereg_multibyte()
167 buf = 0x80; in nxt200x_writereg_multibyte()
177 nxt200x_writebytes(state, 0x21, &buf, 1); in nxt200x_writereg_multibyte()
179 nxt200x_readbytes(state, 0x21, &buf, 1); in nxt200x_writereg_multibyte()
183 if ((buf & 0x02) == 0) in nxt200x_writereg_multibyte()
187 if (buf == 0) in nxt200x_writereg_multibyte()
202 u8 buf, len2, attr; in nxt200x_readreg_multibyte() local
231 buf = 0x80; in nxt200x_readreg_multibyte()
232 nxt200x_writebytes(state, 0x21, &buf, 1); in nxt200x_readreg_multibyte()
246 u8 buf, stopval, counter = 0; in nxt200x_microcontroller_stop() local
262 buf = 0x80; in nxt200x_microcontroller_stop()
263 nxt200x_writebytes(state, 0x22, &buf, 1); in nxt200x_microcontroller_stop()
266 nxt200x_readbytes(state, 0x31, &buf, 1); in nxt200x_microcontroller_stop()
267 if (buf & stopval) in nxt200x_microcontroller_stop()
279 u8 buf; in nxt200x_microcontroller_start() local
282 buf = 0x00; in nxt200x_microcontroller_start()
283 nxt200x_writebytes(state, 0x22, &buf, 1); in nxt200x_microcontroller_start()
288 u8 buf[9]; in nxt2004_microcontroller_init() local
292 buf[0] = 0x00; in nxt2004_microcontroller_init()
293 nxt200x_writebytes(state, 0x2b, buf, 1); in nxt2004_microcontroller_init()
294 buf[0] = 0x70; in nxt2004_microcontroller_init()
295 nxt200x_writebytes(state, 0x34, buf, 1); in nxt2004_microcontroller_init()
296 buf[0] = 0x04; in nxt2004_microcontroller_init()
297 nxt200x_writebytes(state, 0x35, buf, 1); in nxt2004_microcontroller_init()
298 buf[0] = 0x01; buf[1] = 0x23; buf[2] = 0x45; buf[3] = 0x67; buf[4] = 0x89; in nxt2004_microcontroller_init()
299 buf[5] = 0xAB; buf[6] = 0xCD; buf[7] = 0xEF; buf[8] = 0xC0; in nxt2004_microcontroller_init()
300 nxt200x_writebytes(state, 0x36, buf, 9); in nxt2004_microcontroller_init()
301 buf[0] = 0x80; in nxt2004_microcontroller_init()
302 nxt200x_writebytes(state, 0x21, buf, 1); in nxt2004_microcontroller_init()
305 nxt200x_readbytes(state, 0x21, buf, 1); in nxt2004_microcontroller_init()
306 if (buf[0] == 0) in nxt2004_microcontroller_init()
319 u8 buf, count = 0; in nxt200x_writetuner() local
333 i2c_readbytes(state, data[0], &buf, 1); in nxt200x_writetuner()
334 if (buf & 0x40) in nxt200x_writetuner()
343 buf = 0x03; in nxt200x_writetuner()
344 nxt200x_writebytes(state, 0x20, &buf, 1); in nxt200x_writetuner()
347 buf = 0x04; in nxt200x_writetuner()
348 nxt200x_writebytes(state, 0x34, &buf, 1); in nxt200x_writetuner()
354 buf = data[0] << 1; in nxt200x_writetuner()
355 nxt200x_writebytes(state, 0x35, &buf, 1); in nxt200x_writetuner()
358 buf = 0x80; in nxt200x_writetuner()
359 nxt200x_writebytes(state, 0x21, &buf, 1); in nxt200x_writetuner()
362 nxt200x_readbytes(state, 0x21, &buf, 1); in nxt200x_writetuner()
363 if ((buf & 0x80)== 0x00) in nxt200x_writetuner()
378 u8 buf; in nxt200x_agc_reset() local
383 buf = 0x08; in nxt200x_agc_reset()
384 nxt200x_writebytes(state, 0x08, &buf, 1); in nxt200x_agc_reset()
385 buf = 0x00; in nxt200x_agc_reset()
386 nxt200x_writebytes(state, 0x08, &buf, 1); in nxt200x_agc_reset()
389 nxt200x_readreg_multibyte(state, 0x08, &buf, 1); in nxt200x_agc_reset()
390 buf = 0x08; in nxt200x_agc_reset()
391 nxt200x_writereg_multibyte(state, 0x08, &buf, 1); in nxt200x_agc_reset()
392 buf = 0x00; in nxt200x_agc_reset()
393 nxt200x_writereg_multibyte(state, 0x08, &buf, 1); in nxt200x_agc_reset()
405 u8 buf[3], written = 0, chunkpos = 0; in nxt2002_load_firmware() local
412 nxt200x_readbytes(state, 0x10, buf, 1); in nxt2002_load_firmware()
414 if (buf[0] & 0x10) in nxt2002_load_firmware()
422 buf[0] = 0x80; in nxt2002_load_firmware()
423 nxt200x_writebytes(state, 0x2B, buf, 1); in nxt2002_load_firmware()
429 buf[0] = ((rambase + position) >> 8); in nxt2002_load_firmware()
430 buf[1] = (rambase + position) & 0xFF; in nxt2002_load_firmware()
431 buf[2] = 0x81; in nxt2002_load_firmware()
433 nxt200x_writebytes(state, 0x29, buf, 3); in nxt2002_load_firmware()
448 buf[0] = crc << 8; in nxt2002_load_firmware()
449 buf[1] = crc & 0xFF; in nxt2002_load_firmware()
452 nxt200x_writebytes(state, 0x2C, buf, 2); in nxt2002_load_firmware()
455 nxt200x_readbytes(state, 0x2A, buf, 1); in nxt2002_load_firmware()
458 buf[0] = 0x80; in nxt2002_load_firmware()
459 nxt200x_writebytes(state, 0x2B, buf, 1); in nxt2002_load_firmware()
472 u8 buf[3]; in nxt2004_load_firmware() local
482 buf[0] = 0x80; in nxt2004_load_firmware()
483 nxt200x_writebytes(state, 0x2B, buf,1); in nxt2004_load_firmware()
490 buf[0] = rambase >> 8; in nxt2004_load_firmware()
491 buf[1] = rambase & 0xFF; in nxt2004_load_firmware()
492 buf[2] = 0x81; in nxt2004_load_firmware()
494 nxt200x_writebytes(state,0x29,buf,3); in nxt2004_load_firmware()
501 buf[0] = crc >> 8; in nxt2004_load_firmware()
502 buf[1] = crc & 0xFF; in nxt2004_load_firmware()
504 dprintk("firmware crc is 0x%02X 0x%02X\n", buf[0], buf[1]); in nxt2004_load_firmware()
507 nxt200x_writebytes(state, 0x2C, buf,2); in nxt2004_load_firmware()
510 nxt200x_readbytes(state, 0x2C, buf, 1); in nxt2004_load_firmware()
513 buf[0] = 0x80; in nxt2004_load_firmware()
514 nxt200x_writebytes(state, 0x2B, buf,1); in nxt2004_load_firmware()
523 u8 buf[5]; in nxt200x_setup_frontend_parameters() local
530 buf[0] = 0x04; in nxt200x_setup_frontend_parameters()
531 nxt200x_writebytes(state, 0x14, buf, 1); in nxt200x_setup_frontend_parameters()
532 buf[0] = 0x00; in nxt200x_setup_frontend_parameters()
533 nxt200x_writebytes(state, 0x17, buf, 1); in nxt200x_setup_frontend_parameters()
556 fe->ops.tuner_ops.calc_regs(fe, buf, 5); in nxt200x_setup_frontend_parameters()
559 nxt200x_writetuner(state, buf); in nxt200x_setup_frontend_parameters()
569 buf[0] = 0x74; in nxt200x_setup_frontend_parameters()
572 buf[0] = 0x70; in nxt200x_setup_frontend_parameters()
577 nxt200x_writebytes(state, 0x42, buf, 1); in nxt200x_setup_frontend_parameters()
582 buf[0] = 0x87; in nxt200x_setup_frontend_parameters()
585 buf[0] = 0x07; in nxt200x_setup_frontend_parameters()
590 nxt200x_writebytes(state, 0x57, buf, 1); in nxt200x_setup_frontend_parameters()
593 buf[0] = 0x10; in nxt200x_setup_frontend_parameters()
594 buf[1] = 0x00; in nxt200x_setup_frontend_parameters()
597 nxt200x_writereg_multibyte(state, 0x58, buf, 2); in nxt200x_setup_frontend_parameters()
600 nxt200x_writebytes(state, 0x58, buf, 2); in nxt200x_setup_frontend_parameters()
609 buf[0] = 0x68; in nxt200x_setup_frontend_parameters()
612 buf[0] = 0x64; in nxt200x_setup_frontend_parameters()
615 buf[0] = 0x60; in nxt200x_setup_frontend_parameters()
620 buf[1] = 0x00; in nxt200x_setup_frontend_parameters()
623 nxt200x_writereg_multibyte(state, 0x5C, buf, 2); in nxt200x_setup_frontend_parameters()
626 nxt200x_writebytes(state, 0x5C, buf, 2); in nxt200x_setup_frontend_parameters()
633 buf[0] = 0x05; in nxt200x_setup_frontend_parameters()
634 nxt200x_writebytes(state, 0x43, buf, 1); in nxt200x_setup_frontend_parameters()
638 buf[0] = 0x00; in nxt200x_setup_frontend_parameters()
639 buf[1] = 0x00; in nxt200x_setup_frontend_parameters()
640 nxt200x_writebytes(state, 0x46, buf, 2); in nxt200x_setup_frontend_parameters()
644 buf[0] = 0x80; in nxt200x_setup_frontend_parameters()
645 buf[1] = 0x00; in nxt200x_setup_frontend_parameters()
648 nxt200x_writereg_multibyte(state, 0x4B, buf, 2); in nxt200x_setup_frontend_parameters()
651 nxt200x_writebytes(state, 0x4B, buf, 2); in nxt200x_setup_frontend_parameters()
658 buf[0] = 0x00; in nxt200x_setup_frontend_parameters()
659 nxt200x_writebytes(state, 0x4D, buf, 1); in nxt200x_setup_frontend_parameters()
662 buf[0] = 0x44; in nxt200x_setup_frontend_parameters()
663 nxt200x_writebytes(state, 0x55, buf, 1); in nxt200x_setup_frontend_parameters()
666 buf[0] = 0x04; in nxt200x_setup_frontend_parameters()
667 nxt200x_writebytes(state, 0x41, buf, 1); in nxt200x_setup_frontend_parameters()
670 nxt200x_readreg_multibyte(state, 0x80, buf, 1); in nxt200x_setup_frontend_parameters()
671 buf[0] = 0x24; in nxt200x_setup_frontend_parameters()
672 nxt200x_writereg_multibyte(state, 0x80, buf, 1); in nxt200x_setup_frontend_parameters()
675 nxt200x_readreg_multibyte(state, 0x08, buf, 1); in nxt200x_setup_frontend_parameters()
676 buf[0] = 0x10; in nxt200x_setup_frontend_parameters()
677 nxt200x_writereg_multibyte(state, 0x08, buf, 1); in nxt200x_setup_frontend_parameters()
678 nxt200x_readreg_multibyte(state, 0x08, buf, 1); in nxt200x_setup_frontend_parameters()
679 buf[0] = 0x00; in nxt200x_setup_frontend_parameters()
680 nxt200x_writereg_multibyte(state, 0x08, buf, 1); in nxt200x_setup_frontend_parameters()
682 nxt200x_readreg_multibyte(state, 0x80, buf, 1); in nxt200x_setup_frontend_parameters()
683 buf[0] = 0x04; in nxt200x_setup_frontend_parameters()
684 nxt200x_writereg_multibyte(state, 0x80, buf, 1); in nxt200x_setup_frontend_parameters()
685 buf[0] = 0x00; in nxt200x_setup_frontend_parameters()
686 nxt200x_writereg_multibyte(state, 0x81, buf, 1); in nxt200x_setup_frontend_parameters()
687 buf[0] = 0x80; buf[1] = 0x00; buf[2] = 0x00; in nxt200x_setup_frontend_parameters()
688 nxt200x_writereg_multibyte(state, 0x82, buf, 3); in nxt200x_setup_frontend_parameters()
689 nxt200x_readreg_multibyte(state, 0x88, buf, 1); in nxt200x_setup_frontend_parameters()
690 buf[0] = 0x11; in nxt200x_setup_frontend_parameters()
691 nxt200x_writereg_multibyte(state, 0x88, buf, 1); in nxt200x_setup_frontend_parameters()
692 nxt200x_readreg_multibyte(state, 0x80, buf, 1); in nxt200x_setup_frontend_parameters()
693 buf[0] = 0x44; in nxt200x_setup_frontend_parameters()
694 nxt200x_writereg_multibyte(state, 0x80, buf, 1); in nxt200x_setup_frontend_parameters()
700 buf[0] = 0x02; in nxt200x_setup_frontend_parameters()
703 buf[0] = 0x03; in nxt200x_setup_frontend_parameters()
706 buf[0] = 0x00; in nxt200x_setup_frontend_parameters()
711 nxt200x_writebytes(state, 0x30, buf, 1); in nxt200x_setup_frontend_parameters()
714 buf[0] = 0x00; in nxt200x_setup_frontend_parameters()
715 nxt200x_writebytes(state, 0x41, buf, 1); in nxt200x_setup_frontend_parameters()
718 buf[0] = 0x80; in nxt200x_setup_frontend_parameters()
719 buf[1] = 0x00; in nxt200x_setup_frontend_parameters()
722 nxt200x_writereg_multibyte(state, 0x49, buf, 2); in nxt200x_setup_frontend_parameters()
723 nxt200x_writereg_multibyte(state, 0x4B, buf, 2); in nxt200x_setup_frontend_parameters()
726 nxt200x_writebytes(state, 0x49, buf, 2); in nxt200x_setup_frontend_parameters()
727 nxt200x_writebytes(state, 0x4B, buf, 2); in nxt200x_setup_frontend_parameters()
734 buf[0] = 0x04; in nxt200x_setup_frontend_parameters()
735 nxt200x_writebytes(state, 0x41, buf, 1); in nxt200x_setup_frontend_parameters()
743 buf[0] = 0xF0; in nxt200x_setup_frontend_parameters()
744 buf[1] = 0x00; in nxt200x_setup_frontend_parameters()
745 nxt200x_writebytes(state, 0x5C, buf, 2); in nxt200x_setup_frontend_parameters()
857 u8 buf[2]; in nxt2002_init() local
883 buf[0]=0x00; in nxt2002_init()
884 nxt200x_writebytes(state, 0x2B, buf, 1); in nxt2002_init()
890 buf[0] = 0x0F; in nxt2002_init()
891 nxt200x_writebytes(state, 0x08, buf, 1); in nxt2002_init()
892 buf[0] = 0x00; in nxt2002_init()
893 nxt200x_writebytes(state, 0x08, buf, 1); in nxt2002_init()
896 buf[0] = 0xF1; in nxt2002_init()
897 nxt200x_writebytes(state, 0x57, buf, 1); in nxt2002_init()
900 buf[0] = 0x20; in nxt2002_init()
901 nxt200x_writebytes(state, 0x09, buf, 1); in nxt2002_init()
904 buf[0] = 0x7E; in nxt2002_init()
905 buf[1] = 0x00; in nxt2002_init()
906 nxt200x_writebytes(state, 0xE9, buf, 2); in nxt2002_init()
909 buf[0] = 0x00; in nxt2002_init()
910 nxt200x_writebytes(state, 0xCC, buf, 1); in nxt2002_init()
920 u8 buf[3]; in nxt2004_init() local
923 buf[0]=0x00; in nxt2004_init()
924 nxt200x_writebytes(state, 0x1E, buf, 1); in nxt2004_init()
947 buf[0] = 0x01; in nxt2004_init()
948 nxt200x_writebytes(state, 0x19, buf, 1); in nxt2004_init()
957 buf[0] = 0xFF; in nxt2004_init()
958 nxt200x_writereg_multibyte(state, 0x08, buf, 1); in nxt2004_init()
959 buf[0] = 0x00; in nxt2004_init()
960 nxt200x_writereg_multibyte(state, 0x08, buf, 1); in nxt2004_init()
963 buf[0] = 0xD7; in nxt2004_init()
964 nxt200x_writebytes(state, 0x57, buf, 1); in nxt2004_init()
967 buf[0] = 0x07; in nxt2004_init()
968 buf[1] = 0xfe; in nxt2004_init()
969 nxt200x_writebytes(state, 0x35, buf, 2); in nxt2004_init()
970 buf[0] = 0x12; in nxt2004_init()
971 nxt200x_writebytes(state, 0x34, buf, 1); in nxt2004_init()
972 buf[0] = 0x80; in nxt2004_init()
973 nxt200x_writebytes(state, 0x21, buf, 1); in nxt2004_init()
976 buf[0] = 0x21; in nxt2004_init()
977 nxt200x_writebytes(state, 0x0A, buf, 1); in nxt2004_init()
980 buf[0] = 0x01; in nxt2004_init()
981 nxt200x_writereg_multibyte(state, 0x80, buf, 1); in nxt2004_init()
984 buf[0] = 0x7E; in nxt2004_init()
985 buf[1] = 0x00; in nxt2004_init()
986 nxt200x_writebytes(state, 0xE9, buf, 2); in nxt2004_init()
989 buf[0] = 0x00; in nxt2004_init()
990 nxt200x_writebytes(state, 0xCC, buf, 1); in nxt2004_init()
993 nxt200x_readreg_multibyte(state, 0x80, buf, 1); in nxt2004_init()
994 buf[0] = 0x00; in nxt2004_init()
995 nxt200x_writereg_multibyte(state, 0x80, buf, 1); in nxt2004_init()
998 nxt200x_readreg_multibyte(state, 0x08, buf, 1); in nxt2004_init()
999 buf[0] = 0x10; in nxt2004_init()
1000 nxt200x_writereg_multibyte(state, 0x08, buf, 1); in nxt2004_init()
1001 nxt200x_readreg_multibyte(state, 0x08, buf, 1); in nxt2004_init()
1002 buf[0] = 0x00; in nxt2004_init()
1003 nxt200x_writereg_multibyte(state, 0x08, buf, 1); in nxt2004_init()
1006 nxt200x_readreg_multibyte(state, 0x80, buf, 1); in nxt2004_init()
1007 buf[0] = 0x01; in nxt2004_init()
1008 nxt200x_writereg_multibyte(state, 0x80, buf, 1); in nxt2004_init()
1009 buf[0] = 0x70; in nxt2004_init()
1010 nxt200x_writereg_multibyte(state, 0x81, buf, 1); in nxt2004_init()
1011 buf[0] = 0x31; buf[1] = 0x5E; buf[2] = 0x66; in nxt2004_init()
1012 nxt200x_writereg_multibyte(state, 0x82, buf, 3); in nxt2004_init()
1014 nxt200x_readreg_multibyte(state, 0x88, buf, 1); in nxt2004_init()
1015 buf[0] = 0x11; in nxt2004_init()
1016 nxt200x_writereg_multibyte(state, 0x88, buf, 1); in nxt2004_init()
1017 nxt200x_readreg_multibyte(state, 0x80, buf, 1); in nxt2004_init()
1018 buf[0] = 0x40; in nxt2004_init()
1019 nxt200x_writereg_multibyte(state, 0x80, buf, 1); in nxt2004_init()
1021 nxt200x_readbytes(state, 0x10, buf, 1); in nxt2004_init()
1022 buf[0] = 0x10; in nxt2004_init()
1023 nxt200x_writebytes(state, 0x10, buf, 1); in nxt2004_init()
1024 nxt200x_readbytes(state, 0x0A, buf, 1); in nxt2004_init()
1025 buf[0] = 0x21; in nxt2004_init()
1026 nxt200x_writebytes(state, 0x0A, buf, 1); in nxt2004_init()
1030 buf[0] = 0x21; in nxt2004_init()
1031 nxt200x_writebytes(state, 0x0A, buf, 1); in nxt2004_init()
1032 buf[0] = 0x7E; in nxt2004_init()
1033 nxt200x_writebytes(state, 0xE9, buf, 1); in nxt2004_init()
1034 buf[0] = 0x00; in nxt2004_init()
1035 nxt200x_writebytes(state, 0xEA, buf, 1); in nxt2004_init()
1037 nxt200x_readreg_multibyte(state, 0x80, buf, 1); in nxt2004_init()
1038 buf[0] = 0x00; in nxt2004_init()
1039 nxt200x_writereg_multibyte(state, 0x80, buf, 1); in nxt2004_init()
1040 nxt200x_readreg_multibyte(state, 0x80, buf, 1); in nxt2004_init()
1041 buf[0] = 0x00; in nxt2004_init()
1042 nxt200x_writereg_multibyte(state, 0x80, buf, 1); in nxt2004_init()
1045 nxt200x_readreg_multibyte(state, 0x08, buf, 1); in nxt2004_init()
1046 buf[0] = 0x10; in nxt2004_init()
1047 nxt200x_writereg_multibyte(state, 0x08, buf, 1); in nxt2004_init()
1048 nxt200x_readreg_multibyte(state, 0x08, buf, 1); in nxt2004_init()
1049 buf[0] = 0x00; in nxt2004_init()
1050 nxt200x_writereg_multibyte(state, 0x08, buf, 1); in nxt2004_init()
1052 nxt200x_readreg_multibyte(state, 0x80, buf, 1); in nxt2004_init()
1053 buf[0] = 0x04; in nxt2004_init()
1054 nxt200x_writereg_multibyte(state, 0x80, buf, 1); in nxt2004_init()
1055 buf[0] = 0x00; in nxt2004_init()
1056 nxt200x_writereg_multibyte(state, 0x81, buf, 1); in nxt2004_init()
1057 buf[0] = 0x80; buf[1] = 0x00; buf[2] = 0x00; in nxt2004_init()
1058 nxt200x_writereg_multibyte(state, 0x82, buf, 3); in nxt2004_init()
1060 nxt200x_readreg_multibyte(state, 0x88, buf, 1); in nxt2004_init()
1061 buf[0] = 0x11; in nxt2004_init()
1062 nxt200x_writereg_multibyte(state, 0x88, buf, 1); in nxt2004_init()
1064 nxt200x_readreg_multibyte(state, 0x80, buf, 1); in nxt2004_init()
1065 buf[0] = 0x44; in nxt2004_init()
1066 nxt200x_writereg_multibyte(state, 0x80, buf, 1); in nxt2004_init()
1069 nxt200x_readbytes(state, 0x10, buf, 1); in nxt2004_init()
1070 buf[0] = 0x12; in nxt2004_init()
1071 nxt200x_writebytes(state, 0x10, buf, 1); in nxt2004_init()
1072 buf[0] = 0x04; in nxt2004_init()
1073 nxt200x_writebytes(state, 0x13, buf, 1); in nxt2004_init()
1074 buf[0] = 0x00; in nxt2004_init()
1075 nxt200x_writebytes(state, 0x16, buf, 1); in nxt2004_init()
1076 buf[0] = 0x04; in nxt2004_init()
1077 nxt200x_writebytes(state, 0x14, buf, 1); in nxt2004_init()
1078 buf[0] = 0x00; in nxt2004_init()
1079 nxt200x_writebytes(state, 0x14, buf, 1); in nxt2004_init()
1080 nxt200x_writebytes(state, 0x17, buf, 1); in nxt2004_init()
1081 nxt200x_writebytes(state, 0x14, buf, 1); in nxt2004_init()
1082 nxt200x_writebytes(state, 0x17, buf, 1); in nxt2004_init()
1128 u8 buf [] = {0,0,0,0,0}; in nxt200x_attach() local
1141 nxt200x_readbytes(state, 0x00, buf, 5); in nxt200x_attach()
1142 dprintk("NXT info: %*ph\n", 5, buf); in nxt200x_attach()
1145 switch (buf[0]) { in nxt200x_attach()
1161 if (buf[0] != 0x04) goto error; /* device id */ in nxt200x_attach()
1162 if (buf[1] != 0x02) goto error; /* fab id */ in nxt200x_attach()
1163 if (buf[2] != 0x11) goto error; /* month */ in nxt200x_attach()
1164 if (buf[3] != 0x20) goto error; /* year msb */ in nxt200x_attach()
1165 if (buf[4] != 0x00) goto error; /* year lsb */ in nxt200x_attach()
1168 if (buf[0] != 0x05) goto error; /* device id */ in nxt200x_attach()
1181 pr_err("Unknown/Unsupported NXT chip: %*ph\n", 5, buf); in nxt200x_attach()