Lines Matching full:dev
4 (C) 2006-2013 Stéphane Voltz <stef.dev@free.fr>
75 static SANE_Bool low_is_home_line (Lexmark_Device * dev,
80 Lexmark_Device * dev);
81 static void low_rewind (Lexmark_Device * dev, SANE_Byte * regs);
85 static SANE_Status low_simple_scan (Lexmark_Device * dev,
98 SANE_Byte * regs, Lexmark_Device * dev);
101 static SANE_Status read_buffer_init (Lexmark_Device * dev, int bytesperline);
389 lexmark_low_wake_up (Lexmark_Device * dev)
398 if (rts88xx_write_reg (dev->devnum, regs[i], values + i) !=
459 sanei_lexmark_low_init (Lexmark_Device * dev) in sanei_lexmark_low_init() argument
472 dev->shadow_regs[i] = 0; in sanei_lexmark_low_init()
476 dev->shadow_regs[0xf3] = 0xf8; in sanei_lexmark_low_init()
477 dev->shadow_regs[0xf4] = 0x7f; in sanei_lexmark_low_init()
479 switch (dev->model.sensor_type) in sanei_lexmark_low_init()
482 dev->shadow_regs[0x00] = 0x04; in sanei_lexmark_low_init()
483 dev->shadow_regs[0x01] = 0x43; in sanei_lexmark_low_init()
484 dev->shadow_regs[0x0b] = 0x70; in sanei_lexmark_low_init()
485 dev->shadow_regs[0x12] = 0x0f; in sanei_lexmark_low_init()
486 dev->shadow_regs[0x16] = 0x07; in sanei_lexmark_low_init()
487 dev->shadow_regs[0x1d] = 0x20; in sanei_lexmark_low_init()
488 dev->shadow_regs[0x28] = 0xe0; in sanei_lexmark_low_init()
489 dev->shadow_regs[0x29] = 0xe3; in sanei_lexmark_low_init()
490 dev->shadow_regs[0x2a] = 0xeb; in sanei_lexmark_low_init()
491 dev->shadow_regs[0x2b] = 0x0d; in sanei_lexmark_low_init()
492 dev->shadow_regs[0x2e] = 0x40; in sanei_lexmark_low_init()
493 dev->shadow_regs[0x2e] = 0x86; in sanei_lexmark_low_init()
494 dev->shadow_regs[0x2f] = 0x01; in sanei_lexmark_low_init()
495 dev->shadow_regs[0x30] = 0x48; in sanei_lexmark_low_init()
496 dev->shadow_regs[0x31] = 0x06; in sanei_lexmark_low_init()
497 dev->shadow_regs[0x33] = 0x01; in sanei_lexmark_low_init()
498 dev->shadow_regs[0x34] = 0x50; in sanei_lexmark_low_init()
499 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_init()
500 dev->shadow_regs[0x36] = 0x50; in sanei_lexmark_low_init()
501 dev->shadow_regs[0x37] = 0x01; in sanei_lexmark_low_init()
502 dev->shadow_regs[0x38] = 0x50; in sanei_lexmark_low_init()
503 dev->shadow_regs[0x3a] = 0x20; in sanei_lexmark_low_init()
504 dev->shadow_regs[0x3c] = 0x88; in sanei_lexmark_low_init()
505 dev->shadow_regs[0x3d] = 0x08; in sanei_lexmark_low_init()
506 dev->shadow_regs[0x65] = 0x80; in sanei_lexmark_low_init()
507 dev->shadow_regs[0x66] = 0x64; in sanei_lexmark_low_init()
508 dev->shadow_regs[0x6c] = 0xc8; in sanei_lexmark_low_init()
509 dev->shadow_regs[0x72] = 0x1a; in sanei_lexmark_low_init()
510 dev->shadow_regs[0x74] = 0x23; in sanei_lexmark_low_init()
511 dev->shadow_regs[0x75] = 0x03; in sanei_lexmark_low_init()
512 dev->shadow_regs[0x79] = 0x40; in sanei_lexmark_low_init()
513 dev->shadow_regs[0x7A] = 0x01; in sanei_lexmark_low_init()
514 dev->shadow_regs[0x8d] = 0x01; in sanei_lexmark_low_init()
515 dev->shadow_regs[0x8e] = 0x60; in sanei_lexmark_low_init()
516 dev->shadow_regs[0x8f] = 0x80; in sanei_lexmark_low_init()
517 dev->shadow_regs[0x93] = 0x02; in sanei_lexmark_low_init()
518 dev->shadow_regs[0x94] = 0x0e; in sanei_lexmark_low_init()
519 dev->shadow_regs[0xa3] = 0xcc; in sanei_lexmark_low_init()
520 dev->shadow_regs[0xa4] = 0x27; in sanei_lexmark_low_init()
521 dev->shadow_regs[0xa5] = 0x24; in sanei_lexmark_low_init()
522 dev->shadow_regs[0xc2] = 0x80; in sanei_lexmark_low_init()
523 dev->shadow_regs[0xc3] = 0x01; in sanei_lexmark_low_init()
524 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_init()
525 dev->shadow_regs[0xc5] = 0x0a; in sanei_lexmark_low_init()
526 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_init()
527 dev->shadow_regs[0xc9] = 0x39; in sanei_lexmark_low_init()
528 dev->shadow_regs[0xca] = 0x0a; in sanei_lexmark_low_init()
529 dev->shadow_regs[0xe2] = 0x70; in sanei_lexmark_low_init()
530 dev->shadow_regs[0xe3] = 0x17; in sanei_lexmark_low_init()
531 dev->shadow_regs[0xf3] = 0xe0; in sanei_lexmark_low_init()
532 dev->shadow_regs[0xf4] = 0xff; in sanei_lexmark_low_init()
533 dev->shadow_regs[0xf5] = 0x01; in sanei_lexmark_low_init()
537 dev->shadow_regs[0x01] = 0x43; in sanei_lexmark_low_init()
538 dev->shadow_regs[0x0b] = 0x70; in sanei_lexmark_low_init()
539 dev->shadow_regs[0x11] = 0x01; in sanei_lexmark_low_init()
540 dev->shadow_regs[0x12] = 0x0f; in sanei_lexmark_low_init()
541 dev->shadow_regs[0x13] = 0x01; in sanei_lexmark_low_init()
542 dev->shadow_regs[0x15] = 0x01; in sanei_lexmark_low_init()
543 dev->shadow_regs[0x16] = 0x0f; in sanei_lexmark_low_init()
544 dev->shadow_regs[0x1d] = 0x20; in sanei_lexmark_low_init()
545 dev->shadow_regs[0x28] = 0xeb; in sanei_lexmark_low_init()
546 dev->shadow_regs[0x29] = 0xee; in sanei_lexmark_low_init()
547 dev->shadow_regs[0x2a] = 0xf7; in sanei_lexmark_low_init()
548 dev->shadow_regs[0x2b] = 0x01; in sanei_lexmark_low_init()
549 dev->shadow_regs[0x2e] = 0x86; in sanei_lexmark_low_init()
550 dev->shadow_regs[0x30] = 0x48; in sanei_lexmark_low_init()
551 dev->shadow_regs[0x33] = 0x01; in sanei_lexmark_low_init()
552 dev->shadow_regs[0x3a] = 0x20; in sanei_lexmark_low_init()
553 dev->shadow_regs[0x3b] = 0x37; in sanei_lexmark_low_init()
554 dev->shadow_regs[0x3c] = 0x88; in sanei_lexmark_low_init()
555 dev->shadow_regs[0x3d] = 0x08; in sanei_lexmark_low_init()
556 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_init()
557 dev->shadow_regs[0x72] = 0x05; in sanei_lexmark_low_init()
558 dev->shadow_regs[0x74] = 0x0e; in sanei_lexmark_low_init()
559 dev->shadow_regs[0x8b] = 0xff; in sanei_lexmark_low_init()
560 dev->shadow_regs[0x8c] = 0x02; in sanei_lexmark_low_init()
561 dev->shadow_regs[0x8d] = 0x01; in sanei_lexmark_low_init()
562 dev->shadow_regs[0x8e] = 0x60; in sanei_lexmark_low_init()
563 dev->shadow_regs[0x8f] = 0x80; in sanei_lexmark_low_init()
564 dev->shadow_regs[0x94] = 0x0e; in sanei_lexmark_low_init()
565 dev->shadow_regs[0xa3] = 0xcc; in sanei_lexmark_low_init()
566 dev->shadow_regs[0xa4] = 0x27; in sanei_lexmark_low_init()
567 dev->shadow_regs[0xa5] = 0x24; in sanei_lexmark_low_init()
568 dev->shadow_regs[0xb0] = 0xb2; in sanei_lexmark_low_init()
569 dev->shadow_regs[0xb2] = 0x04; in sanei_lexmark_low_init()
570 dev->shadow_regs[0xc2] = 0x80; in sanei_lexmark_low_init()
571 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_init()
572 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_init()
573 dev->shadow_regs[0xc9] = 0x3b; in sanei_lexmark_low_init()
574 dev->shadow_regs[0xed] = 0xc2; in sanei_lexmark_low_init()
575 dev->shadow_regs[0xee] = 0x02; in sanei_lexmark_low_init()
579 dev->shadow_regs[0x00] = 0x00; in sanei_lexmark_low_init()
580 dev->shadow_regs[0x01] = 0x43; in sanei_lexmark_low_init()
581 dev->shadow_regs[0x0b] = 0x70; in sanei_lexmark_low_init()
582 dev->shadow_regs[0x0c] = 0x28; in sanei_lexmark_low_init()
583 dev->shadow_regs[0x0d] = 0xa4; in sanei_lexmark_low_init()
584 dev->shadow_regs[0x11] = 0x01; in sanei_lexmark_low_init()
585 dev->shadow_regs[0x12] = 0x0f; in sanei_lexmark_low_init()
586 dev->shadow_regs[0x13] = 0x01; in sanei_lexmark_low_init()
587 dev->shadow_regs[0x15] = 0x01; in sanei_lexmark_low_init()
588 dev->shadow_regs[0x16] = 0x0f; in sanei_lexmark_low_init()
589 dev->shadow_regs[0x17] = 0x00; in sanei_lexmark_low_init()
590 dev->shadow_regs[0x1d] = 0x20; in sanei_lexmark_low_init()
591 dev->shadow_regs[0x28] = 0xf5; in sanei_lexmark_low_init()
592 dev->shadow_regs[0x29] = 0xf7; in sanei_lexmark_low_init()
593 dev->shadow_regs[0x2a] = 0xf5; in sanei_lexmark_low_init()
594 dev->shadow_regs[0x2b] = 0x17; in sanei_lexmark_low_init()
595 dev->shadow_regs[0x2d] = 0x41; in sanei_lexmark_low_init()
596 dev->shadow_regs[0x2e] = 0x86; in sanei_lexmark_low_init()
597 dev->shadow_regs[0x2f] = 0x11; in sanei_lexmark_low_init()
598 dev->shadow_regs[0x30] = 0x48; in sanei_lexmark_low_init()
599 dev->shadow_regs[0x31] = 0x01; in sanei_lexmark_low_init()
600 dev->shadow_regs[0x33] = 0x01; in sanei_lexmark_low_init()
601 dev->shadow_regs[0x34] = 0x50; in sanei_lexmark_low_init()
602 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_init()
603 dev->shadow_regs[0x36] = 0x50; in sanei_lexmark_low_init()
604 dev->shadow_regs[0x37] = 0x01; in sanei_lexmark_low_init()
605 dev->shadow_regs[0x38] = 0x50; in sanei_lexmark_low_init()
606 dev->shadow_regs[0x3a] = 0x20; in sanei_lexmark_low_init()
607 dev->shadow_regs[0x3b] = 0x37; in sanei_lexmark_low_init()
608 dev->shadow_regs[0x3c] = 0x88; in sanei_lexmark_low_init()
609 dev->shadow_regs[0x3d] = 0x08; in sanei_lexmark_low_init()
610 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_init()
611 dev->shadow_regs[0x47] = 0x01; in sanei_lexmark_low_init()
612 dev->shadow_regs[0x48] = 0x1a; in sanei_lexmark_low_init()
613 dev->shadow_regs[0x49] = 0x5b; in sanei_lexmark_low_init()
614 dev->shadow_regs[0x4a] = 0x1b; in sanei_lexmark_low_init()
615 dev->shadow_regs[0x4b] = 0x5b; in sanei_lexmark_low_init()
616 dev->shadow_regs[0x4c] = 0x05; in sanei_lexmark_low_init()
617 dev->shadow_regs[0x4d] = 0x3f; in sanei_lexmark_low_init()
618 dev->shadow_regs[0x60] = 0x2f; in sanei_lexmark_low_init()
619 dev->shadow_regs[0x61] = 0x36; in sanei_lexmark_low_init()
620 dev->shadow_regs[0x62] = 0x30; in sanei_lexmark_low_init()
621 dev->shadow_regs[0x63] = 0x36; in sanei_lexmark_low_init()
622 dev->shadow_regs[0x65] = 0x80; in sanei_lexmark_low_init()
623 dev->shadow_regs[0x66] = 0x64; in sanei_lexmark_low_init()
624 dev->shadow_regs[0x6c] = 0xc8; in sanei_lexmark_low_init()
625 dev->shadow_regs[0x6d] = 0x00; in sanei_lexmark_low_init()
626 dev->shadow_regs[0x72] = 0x35; in sanei_lexmark_low_init()
627 dev->shadow_regs[0x74] = 0x4e; in sanei_lexmark_low_init()
628 dev->shadow_regs[0x75] = 0x03; in sanei_lexmark_low_init()
629 dev->shadow_regs[0x79] = 0x40; in sanei_lexmark_low_init()
630 dev->shadow_regs[0x7a] = 0x01; in sanei_lexmark_low_init()
631 dev->shadow_regs[0x85] = 0x02; in sanei_lexmark_low_init()
632 dev->shadow_regs[0x86] = 0x33; in sanei_lexmark_low_init()
633 dev->shadow_regs[0x87] = 0x0f; in sanei_lexmark_low_init()
634 dev->shadow_regs[0x88] = 0x24; in sanei_lexmark_low_init()
635 dev->shadow_regs[0x8b] = 0xff; in sanei_lexmark_low_init()
636 dev->shadow_regs[0x8c] = 0x02; in sanei_lexmark_low_init()
637 dev->shadow_regs[0x8d] = 0x01; in sanei_lexmark_low_init()
638 dev->shadow_regs[0x8e] = 0x60; in sanei_lexmark_low_init()
639 dev->shadow_regs[0x8f] = 0x80; in sanei_lexmark_low_init()
640 dev->shadow_regs[0x91] = 0x19; in sanei_lexmark_low_init()
641 dev->shadow_regs[0x92] = 0x20; in sanei_lexmark_low_init()
642 dev->shadow_regs[0x93] = 0x02; in sanei_lexmark_low_init()
643 dev->shadow_regs[0x94] = 0x0e; in sanei_lexmark_low_init()
644 dev->shadow_regs[0xa3] = 0x0d; in sanei_lexmark_low_init()
645 dev->shadow_regs[0xa4] = 0x5e; in sanei_lexmark_low_init()
646 dev->shadow_regs[0xa5] = 0x23; in sanei_lexmark_low_init()
647 dev->shadow_regs[0xb0] = 0x2c; in sanei_lexmark_low_init()
648 dev->shadow_regs[0xb1] = 0x07; in sanei_lexmark_low_init()
649 dev->shadow_regs[0xb2] = 0x04; in sanei_lexmark_low_init()
650 dev->shadow_regs[0xc2] = 0x80; in sanei_lexmark_low_init()
651 dev->shadow_regs[0xc3] = 0x01; in sanei_lexmark_low_init()
652 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_init()
653 dev->shadow_regs[0xc5] = 0x0a; in sanei_lexmark_low_init()
654 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_init()
655 dev->shadow_regs[0xc9] = 0x3b; in sanei_lexmark_low_init()
656 dev->shadow_regs[0xca] = 0x0a; in sanei_lexmark_low_init()
657 dev->shadow_regs[0xe2] = 0xf8; in sanei_lexmark_low_init()
658 dev->shadow_regs[0xe3] = 0x2a; in sanei_lexmark_low_init()
662 dev->shadow_regs[0x01] = 0x43; in sanei_lexmark_low_init()
663 dev->shadow_regs[0x11] = 0x01; in sanei_lexmark_low_init()
664 dev->shadow_regs[0x12] = 0x0f; in sanei_lexmark_low_init()
665 dev->shadow_regs[0x13] = 0x01; in sanei_lexmark_low_init()
666 dev->shadow_regs[0x15] = 0x01; in sanei_lexmark_low_init()
667 dev->shadow_regs[0x16] = 0x0f; in sanei_lexmark_low_init()
668 dev->shadow_regs[0x17] = 0x00; in sanei_lexmark_low_init()
669 dev->shadow_regs[0x1d] = 0x20; in sanei_lexmark_low_init()
670 dev->shadow_regs[0x28] = 0xf5; in sanei_lexmark_low_init()
671 dev->shadow_regs[0x29] = 0xf7; in sanei_lexmark_low_init()
672 dev->shadow_regs[0x2a] = 0xf5; in sanei_lexmark_low_init()
673 dev->shadow_regs[0x2b] = 0x17; in sanei_lexmark_low_init()
674 dev->shadow_regs[0x2d] = 0x41; in sanei_lexmark_low_init()
675 dev->shadow_regs[0x2e] = 0x86; in sanei_lexmark_low_init()
676 dev->shadow_regs[0x30] = 0x48; in sanei_lexmark_low_init()
677 dev->shadow_regs[0x31] = 0x01; in sanei_lexmark_low_init()
678 dev->shadow_regs[0x33] = 0x01; in sanei_lexmark_low_init()
679 dev->shadow_regs[0x34] = 0x50; in sanei_lexmark_low_init()
680 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_init()
681 dev->shadow_regs[0x36] = 0x50; in sanei_lexmark_low_init()
682 dev->shadow_regs[0x37] = 0x01; in sanei_lexmark_low_init()
683 dev->shadow_regs[0x38] = 0x50; in sanei_lexmark_low_init()
684 dev->shadow_regs[0x3c] = 0x88; in sanei_lexmark_low_init()
685 dev->shadow_regs[0x3d] = 0x08; in sanei_lexmark_low_init()
686 dev->shadow_regs[0x66] = 0x64; in sanei_lexmark_low_init()
687 dev->shadow_regs[0x67] = 0x00; in sanei_lexmark_low_init()
688 dev->shadow_regs[0x6c] = 0xc8; in sanei_lexmark_low_init()
689 dev->shadow_regs[0x6d] = 0x00; in sanei_lexmark_low_init()
690 dev->shadow_regs[0x72] = 0x35; in sanei_lexmark_low_init()
691 dev->shadow_regs[0x74] = 0x4e; in sanei_lexmark_low_init()
692 dev->shadow_regs[0x75] = 0x03; in sanei_lexmark_low_init()
693 dev->shadow_regs[0x7a] = 0x01; in sanei_lexmark_low_init()
694 dev->shadow_regs[0x93] = 0x0a; in sanei_lexmark_low_init()
695 dev->shadow_regs[0x94] = 0x0e; in sanei_lexmark_low_init()
697 dev->shadow_regs[0xc3] = 0x01; in sanei_lexmark_low_init()
698 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_init()
699 dev->shadow_regs[0xc5] = 0x0a; in sanei_lexmark_low_init()
700 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_init()
701 dev->shadow_regs[0xc9] = 0x3b; in sanei_lexmark_low_init()
702 dev->shadow_regs[0xca] = 0x0a; in sanei_lexmark_low_init()
703 dev->shadow_regs[0xe2] = 0xf8; in sanei_lexmark_low_init()
704 dev->shadow_regs[0xe3] = 0x2a; in sanei_lexmark_low_init()
708 dev->shadow_regs[0x01] = 0x43; in sanei_lexmark_low_init()
709 dev->shadow_regs[0x0b] = 0x70; in sanei_lexmark_low_init()
710 dev->shadow_regs[0x0c] = 0x28; in sanei_lexmark_low_init()
711 dev->shadow_regs[0x0d] = 0xa4; in sanei_lexmark_low_init()
712 dev->shadow_regs[0x11] = 0x01; in sanei_lexmark_low_init()
713 dev->shadow_regs[0x12] = 0x0f; in sanei_lexmark_low_init()
714 dev->shadow_regs[0x13] = 0x01; in sanei_lexmark_low_init()
715 dev->shadow_regs[0x15] = 0x01; in sanei_lexmark_low_init()
716 dev->shadow_regs[0x16] = 0x07; in sanei_lexmark_low_init()
717 dev->shadow_regs[0x1d] = 0x20; in sanei_lexmark_low_init()
718 dev->shadow_regs[0x28] = 0xf5; in sanei_lexmark_low_init()
719 dev->shadow_regs[0x29] = 0xf7; in sanei_lexmark_low_init()
720 dev->shadow_regs[0x2a] = 0xf5; in sanei_lexmark_low_init()
721 dev->shadow_regs[0x2b] = 0x17; in sanei_lexmark_low_init()
722 dev->shadow_regs[0x2e] = 0x86; in sanei_lexmark_low_init()
723 dev->shadow_regs[0x30] = 0x48; in sanei_lexmark_low_init()
724 dev->shadow_regs[0x31] = 0x01; in sanei_lexmark_low_init()
725 dev->shadow_regs[0x33] = 0x01; in sanei_lexmark_low_init()
726 dev->shadow_regs[0x3a] = 0x20; in sanei_lexmark_low_init()
727 dev->shadow_regs[0x3b] = 0x37; in sanei_lexmark_low_init()
728 dev->shadow_regs[0x3c] = 0x88; in sanei_lexmark_low_init()
729 dev->shadow_regs[0x3d] = 0x08; in sanei_lexmark_low_init()
730 dev->shadow_regs[0x47] = 0x21; in sanei_lexmark_low_init()
731 dev->shadow_regs[0x48] = 0x1a; in sanei_lexmark_low_init()
732 dev->shadow_regs[0x49] = 0x5b; in sanei_lexmark_low_init()
733 dev->shadow_regs[0x4a] = 0x1b; in sanei_lexmark_low_init()
734 dev->shadow_regs[0x4b] = 0x5b; in sanei_lexmark_low_init()
735 dev->shadow_regs[0x4c] = 0x05; in sanei_lexmark_low_init()
736 dev->shadow_regs[0x4d] = 0x3f; in sanei_lexmark_low_init()
737 dev->shadow_regs[0x65] = 0x80; in sanei_lexmark_low_init()
738 dev->shadow_regs[0x86] = 0x14; in sanei_lexmark_low_init()
739 dev->shadow_regs[0x87] = 0x06; in sanei_lexmark_low_init()
740 dev->shadow_regs[0x89] = 0xf5; in sanei_lexmark_low_init()
741 dev->shadow_regs[0x8d] = 0x01; in sanei_lexmark_low_init()
742 dev->shadow_regs[0x8e] = 0x60; in sanei_lexmark_low_init()
743 dev->shadow_regs[0x8f] = 0x80; in sanei_lexmark_low_init()
744 dev->shadow_regs[0x94] = 0x0e; in sanei_lexmark_low_init()
745 dev->shadow_regs[0xa3] = 0x0d; in sanei_lexmark_low_init()
746 dev->shadow_regs[0xa4] = 0x5e; in sanei_lexmark_low_init()
747 dev->shadow_regs[0xa5] = 0x23; in sanei_lexmark_low_init()
748 dev->shadow_regs[0xb0] = 0x2c; in sanei_lexmark_low_init()
749 dev->shadow_regs[0xb1] = 0x0f; in sanei_lexmark_low_init()
750 dev->shadow_regs[0xc2] = 0x80; in sanei_lexmark_low_init()
751 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_init()
752 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_init()
756 dev->shadow_regs[0x01] = 0x43; in sanei_lexmark_low_init()
757 dev->shadow_regs[0x0b] = 0x70; in sanei_lexmark_low_init()
758 dev->shadow_regs[0x0c] = 0x28; in sanei_lexmark_low_init()
759 dev->shadow_regs[0x0d] = 0xa4; in sanei_lexmark_low_init()
760 dev->shadow_regs[0x11] = 0x01; in sanei_lexmark_low_init()
761 dev->shadow_regs[0x12] = 0x0f; in sanei_lexmark_low_init()
762 dev->shadow_regs[0x13] = 0x01; in sanei_lexmark_low_init()
763 dev->shadow_regs[0x15] = 0x01; in sanei_lexmark_low_init()
764 dev->shadow_regs[0x16] = 0x0f; in sanei_lexmark_low_init()
765 dev->shadow_regs[0x1d] = 0x20; in sanei_lexmark_low_init()
766 dev->shadow_regs[0x28] = 0xe9; in sanei_lexmark_low_init()
767 dev->shadow_regs[0x29] = 0xeb; in sanei_lexmark_low_init()
768 dev->shadow_regs[0x2a] = 0xe9; in sanei_lexmark_low_init()
769 dev->shadow_regs[0x2b] = 0x0b; in sanei_lexmark_low_init()
770 dev->shadow_regs[0x2d] = 0x01; in sanei_lexmark_low_init()
771 dev->shadow_regs[0x2e] = 0x86; in sanei_lexmark_low_init()
772 dev->shadow_regs[0x2f] = 0x11; in sanei_lexmark_low_init()
773 dev->shadow_regs[0x30] = 0x48; in sanei_lexmark_low_init()
774 dev->shadow_regs[0x33] = 0x01; in sanei_lexmark_low_init()
775 dev->shadow_regs[0x34] = 0x50; in sanei_lexmark_low_init()
776 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_init()
777 dev->shadow_regs[0x36] = 0x50; in sanei_lexmark_low_init()
778 dev->shadow_regs[0x37] = 0x01; in sanei_lexmark_low_init()
779 dev->shadow_regs[0x38] = 0x50; in sanei_lexmark_low_init()
780 dev->shadow_regs[0x3a] = 0x20; in sanei_lexmark_low_init()
781 dev->shadow_regs[0x3b] = 0x37; in sanei_lexmark_low_init()
782 dev->shadow_regs[0x3c] = 0x88; in sanei_lexmark_low_init()
783 dev->shadow_regs[0x3d] = 0x08; in sanei_lexmark_low_init()
784 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_init()
785 dev->shadow_regs[0x47] = 0x01; in sanei_lexmark_low_init()
786 dev->shadow_regs[0x48] = 0x1a; in sanei_lexmark_low_init()
787 dev->shadow_regs[0x49] = 0x5b; in sanei_lexmark_low_init()
788 dev->shadow_regs[0x4a] = 0x1b; in sanei_lexmark_low_init()
789 dev->shadow_regs[0x4b] = 0x5b; in sanei_lexmark_low_init()
790 dev->shadow_regs[0x4c] = 0x05; in sanei_lexmark_low_init()
791 dev->shadow_regs[0x4d] = 0x3f; in sanei_lexmark_low_init()
792 dev->shadow_regs[0x60] = 0x12; in sanei_lexmark_low_init()
793 dev->shadow_regs[0x62] = 0x81; in sanei_lexmark_low_init()
794 dev->shadow_regs[0x63] = 0x03; in sanei_lexmark_low_init()
795 dev->shadow_regs[0x65] = 0x80; in sanei_lexmark_low_init()
796 dev->shadow_regs[0x66] = 0x64; in sanei_lexmark_low_init()
797 dev->shadow_regs[0x6c] = 0xc8; in sanei_lexmark_low_init()
798 dev->shadow_regs[0x72] = 0x1e; in sanei_lexmark_low_init()
799 dev->shadow_regs[0x74] = 0x3c; in sanei_lexmark_low_init()
800 dev->shadow_regs[0x75] = 0x03; in sanei_lexmark_low_init()
801 dev->shadow_regs[0x79] = 0x40; in sanei_lexmark_low_init()
802 dev->shadow_regs[0x7a] = 0x01; in sanei_lexmark_low_init()
803 dev->shadow_regs[0x85] = 0x20; in sanei_lexmark_low_init()
804 dev->shadow_regs[0x86] = 0x1e; in sanei_lexmark_low_init()
805 dev->shadow_regs[0x87] = 0x39; in sanei_lexmark_low_init()
806 dev->shadow_regs[0x8b] = 0xff; in sanei_lexmark_low_init()
807 dev->shadow_regs[0x8c] = 0x02; in sanei_lexmark_low_init()
808 dev->shadow_regs[0x8d] = 0x01; in sanei_lexmark_low_init()
809 dev->shadow_regs[0x8e] = 0x60; in sanei_lexmark_low_init()
810 dev->shadow_regs[0x8f] = 0x80; in sanei_lexmark_low_init()
811 dev->shadow_regs[0x92] = 0x92; in sanei_lexmark_low_init()
812 dev->shadow_regs[0x93] = 0x02; in sanei_lexmark_low_init()
813 dev->shadow_regs[0x94] = 0x0e; in sanei_lexmark_low_init()
814 dev->shadow_regs[0xa3] = 0x0d; in sanei_lexmark_low_init()
815 dev->shadow_regs[0xa4] = 0x5e; in sanei_lexmark_low_init()
816 dev->shadow_regs[0xa5] = 0x23; in sanei_lexmark_low_init()
817 dev->shadow_regs[0xb0] = 0x2c; in sanei_lexmark_low_init()
818 dev->shadow_regs[0xb1] = 0x07; in sanei_lexmark_low_init()
819 dev->shadow_regs[0xb2] = 0x04; in sanei_lexmark_low_init()
820 dev->shadow_regs[0xc2] = 0x80; in sanei_lexmark_low_init()
821 dev->shadow_regs[0xc3] = 0x01; in sanei_lexmark_low_init()
822 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_init()
823 dev->shadow_regs[0xc5] = 0x0a; in sanei_lexmark_low_init()
824 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_init()
825 dev->shadow_regs[0xc9] = 0x3b; in sanei_lexmark_low_init()
826 dev->shadow_regs[0xca] = 0x0a; in sanei_lexmark_low_init()
827 dev->shadow_regs[0xe2] = 0xf8; in sanei_lexmark_low_init()
828 dev->shadow_regs[0xe3] = 0x2a; in sanei_lexmark_low_init()
829 dev->shadow_regs[0xf3] = 0xff; in sanei_lexmark_low_init()
830 dev->shadow_regs[0xf4] = 0x0f; in sanei_lexmark_low_init()
834 dev->model.model, dev->model.name); in sanei_lexmark_low_init()
840 sanei_lexmark_low_destroy (Lexmark_Device * dev) in sanei_lexmark_low_destroy() argument
843 if (dev->read_buffer != NULL) in sanei_lexmark_low_destroy()
844 read_buffer_free (dev->read_buffer); in sanei_lexmark_low_destroy()
1035 low_simple_scan (Lexmark_Device * dev, SANE_Byte * regs, int xoffset, in low_simple_scan() argument
1051 if ((dev->model.motor_type == A920_MOTOR in low_simple_scan()
1052 || dev->model.motor_type == X74_MOTOR) && rts88xx_is_color (regs) in low_simple_scan()
1053 && dev->val[OPT_RESOLUTION].w == 600) in low_simple_scan()
1078 status = low_cancel (dev->devnum); in low_simple_scan()
1083 status = low_start_scan (dev->devnum, regs); in low_simple_scan()
1088 status = low_poll_data (dev->devnum); in low_simple_scan()
1104 rts88xx_read_data (dev->devnum, needed - read, (*data) + read, &size); in low_simple_scan()
1117 if (rts88xx_read_reg (dev->devnum, 0xb3, ®) != SANE_STATUS_GOOD) in low_simple_scan()
1135 status = low_cancel (dev->devnum); in low_simple_scan()
1150 sanei_lexmark_low_open_device (Lexmark_Device * dev) in sanei_lexmark_low_open_device() argument
1176 result = sanei_usb_open (dev->sane.name, &(dev->devnum)); in sanei_lexmark_low_open_device()
1178 DBG (2, "sanei_lexmark_low_open_device: devnum=%d\n", dev->devnum); in sanei_lexmark_low_open_device()
1181 low_usb_bulk_write (dev->devnum, command_block, &size); in sanei_lexmark_low_open_device()
1184 low_usb_bulk_read (dev->devnum, shadow_regs, &size); in sanei_lexmark_low_open_device()
1204 ex - sx, dev->shadow_regs[0x7a], shadow_regs[0x2f]); in sanei_lexmark_low_open_device()
1212 if (shadow_regs[0xb0] == 0x2c && dev->model.sensor_type == X1100_B2_SENSOR) in sanei_lexmark_low_open_device()
1218 if ((dev->model.sensor_type == X1200_SENSOR) && (shadow_regs[0x10] == 0x97)) in sanei_lexmark_low_open_device()
1231 sanei_lexmark_low_assign_model (dev, dev->sane.name, in sanei_lexmark_low_open_device()
1232 dev->model.vendor_id, in sanei_lexmark_low_open_device()
1233 dev->model.product_id, variant); in sanei_lexmark_low_open_device()
1235 sanei_lexmark_low_init (dev); in sanei_lexmark_low_open_device()
1242 sanei_lexmark_low_close_device (Lexmark_Device * dev) in sanei_lexmark_low_close_device() argument
1245 lexmark_low_set_idle (dev->devnum); in sanei_lexmark_low_close_device()
1249 sanei_usb_close (dev->devnum); in sanei_lexmark_low_close_device()
1304 low_is_home_line (Lexmark_Device * dev, unsigned char *buffer) in low_is_home_line() argument
1436 home_point1 = dev->model.HomeEdgePoint1; in low_is_home_line()
1448 home_point2 = dev->model.HomeEdgePoint2; in low_is_home_line()
1464 sanei_lexmark_low_move_fwd (SANE_Int distance, Lexmark_Device * dev, in sanei_lexmark_low_move_fwd() argument
1486 devnum = dev->devnum; in sanei_lexmark_low_move_fwd()
1493 switch (dev->model.sensor_type) in sanei_lexmark_low_move_fwd()
1515 dev->shadow_regs[0x2d] = 0x01; in sanei_lexmark_low_move_fwd()
1519 dev->shadow_regs[0x2d] = 0x4f; in sanei_lexmark_low_move_fwd()
1562 switch (dev->model.motor_type) in sanei_lexmark_low_move_fwd()
1641 if (dev->model.sensor_type == X74_SENSOR) in sanei_lexmark_low_move_fwd()
1648 sanei_lexmark_low_search_home_fwd (Lexmark_Device * dev) in sanei_lexmark_low_search_home_fwd() argument
1666 devnum = dev->devnum; in sanei_lexmark_low_search_home_fwd()
1671 switch (dev->model.sensor_type) in sanei_lexmark_low_search_home_fwd()
1674 dev->shadow_regs[0x2c] = 0x03; in sanei_lexmark_low_search_home_fwd()
1675 dev->shadow_regs[0x2d] = 0x45; in sanei_lexmark_low_search_home_fwd()
1676 dev->shadow_regs[0x2f] = 0x21; in sanei_lexmark_low_search_home_fwd()
1677 dev->shadow_regs[0x30] = 0x48; in sanei_lexmark_low_search_home_fwd()
1678 dev->shadow_regs[0x31] = 0x06; in sanei_lexmark_low_search_home_fwd()
1679 dev->shadow_regs[0x34] = 0x05; in sanei_lexmark_low_search_home_fwd()
1680 dev->shadow_regs[0x35] = 0x05; in sanei_lexmark_low_search_home_fwd()
1681 dev->shadow_regs[0x36] = 0x09; in sanei_lexmark_low_search_home_fwd()
1682 dev->shadow_regs[0x37] = 0x09; in sanei_lexmark_low_search_home_fwd()
1683 dev->shadow_regs[0x38] = 0x0d; in sanei_lexmark_low_search_home_fwd()
1684 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_search_home_fwd()
1685 dev->shadow_regs[0x75] = 0x00; in sanei_lexmark_low_search_home_fwd()
1686 dev->shadow_regs[0x8b] = 0xff; in sanei_lexmark_low_search_home_fwd()
1687 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_search_home_fwd()
1690 dev->shadow_regs[0x2c] = 0x0f; in sanei_lexmark_low_search_home_fwd()
1691 dev->shadow_regs[0x2d] = 0x51; in sanei_lexmark_low_search_home_fwd()
1692 dev->shadow_regs[0x2f] = 0x21; in sanei_lexmark_low_search_home_fwd()
1693 dev->shadow_regs[0x34] = 0x04; in sanei_lexmark_low_search_home_fwd()
1694 dev->shadow_regs[0x35] = 0x04; in sanei_lexmark_low_search_home_fwd()
1695 dev->shadow_regs[0x36] = 0x08; in sanei_lexmark_low_search_home_fwd()
1696 dev->shadow_regs[0x37] = 0x08; in sanei_lexmark_low_search_home_fwd()
1697 dev->shadow_regs[0x38] = 0x0b; in sanei_lexmark_low_search_home_fwd()
1698 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_search_home_fwd()
1701 dev->shadow_regs[0x2c] = 0x0d; in sanei_lexmark_low_search_home_fwd()
1702 dev->shadow_regs[0x2d] = 0x4f; in sanei_lexmark_low_search_home_fwd()
1703 dev->shadow_regs[0x34] = 0x05; in sanei_lexmark_low_search_home_fwd()
1704 dev->shadow_regs[0x35] = 0x05; in sanei_lexmark_low_search_home_fwd()
1705 dev->shadow_regs[0x36] = 0x09; in sanei_lexmark_low_search_home_fwd()
1706 dev->shadow_regs[0x37] = 0x09; in sanei_lexmark_low_search_home_fwd()
1707 dev->shadow_regs[0x38] = 0x0d; in sanei_lexmark_low_search_home_fwd()
1708 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_search_home_fwd()
1709 dev->shadow_regs[0x72] = 0x35; in sanei_lexmark_low_search_home_fwd()
1710 dev->shadow_regs[0x74] = 0x4e; in sanei_lexmark_low_search_home_fwd()
1712 dev->shadow_regs[0x85] = 0x20; /* 05 */ in sanei_lexmark_low_search_home_fwd()
1713 dev->shadow_regs[0x86] = 0x00; /* 05 */ in sanei_lexmark_low_search_home_fwd()
1714 dev->shadow_regs[0x87] = 0x00; /* 05 */ in sanei_lexmark_low_search_home_fwd()
1715 dev->shadow_regs[0x88] = 0x00; /* 45 */ in sanei_lexmark_low_search_home_fwd()
1716 dev->shadow_regs[0x89] = 0x00; in sanei_lexmark_low_search_home_fwd()
1717 dev->shadow_regs[0x8b] = 0xff; in sanei_lexmark_low_search_home_fwd()
1719 dev->shadow_regs[0x93] = 0x06; /* 0e */ in sanei_lexmark_low_search_home_fwd()
1721 dev->shadow_regs[0x75] = 0x00; /* */ in sanei_lexmark_low_search_home_fwd()
1722 dev->shadow_regs[0x91] = 0x00; /* 60 */ in sanei_lexmark_low_search_home_fwd()
1723 dev->shadow_regs[0x92] = 0x00; /* 8d */ in sanei_lexmark_low_search_home_fwd()
1724 dev->shadow_regs[0xb1] = 0x00; /* */ in sanei_lexmark_low_search_home_fwd()
1725 dev->shadow_regs[0xc5] = 0x00; /* */ in sanei_lexmark_low_search_home_fwd()
1726 dev->shadow_regs[0xca] = 0x00; /* */ in sanei_lexmark_low_search_home_fwd()
1727 dev->shadow_regs[0xc3] = 0x01; /* */ in sanei_lexmark_low_search_home_fwd()
1730 dev->shadow_regs[0x2c] = 0x0d; in sanei_lexmark_low_search_home_fwd()
1731 dev->shadow_regs[0x2d] = 0x4f; in sanei_lexmark_low_search_home_fwd()
1732 dev->shadow_regs[0x34] = 0x05; in sanei_lexmark_low_search_home_fwd()
1733 dev->shadow_regs[0x35] = 0x05; in sanei_lexmark_low_search_home_fwd()
1734 dev->shadow_regs[0x36] = 0x09; in sanei_lexmark_low_search_home_fwd()
1735 dev->shadow_regs[0x37] = 0x09; in sanei_lexmark_low_search_home_fwd()
1736 dev->shadow_regs[0x38] = 0x0d; in sanei_lexmark_low_search_home_fwd()
1737 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_search_home_fwd()
1738 dev->shadow_regs[0x72] = 0x35; in sanei_lexmark_low_search_home_fwd()
1739 dev->shadow_regs[0x74] = 0x4e; in sanei_lexmark_low_search_home_fwd()
1740 dev->shadow_regs[0x85] = 0x05; in sanei_lexmark_low_search_home_fwd()
1741 dev->shadow_regs[0x88] = 0x45; in sanei_lexmark_low_search_home_fwd()
1742 dev->shadow_regs[0x89] = 0x00; in sanei_lexmark_low_search_home_fwd()
1743 dev->shadow_regs[0x8b] = 0xff; in sanei_lexmark_low_search_home_fwd()
1744 dev->shadow_regs[0x91] = 0x60; in sanei_lexmark_low_search_home_fwd()
1745 dev->shadow_regs[0x92] = 0x8d; in sanei_lexmark_low_search_home_fwd()
1746 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_search_home_fwd()
1749 dev->shadow_regs[0x2c] = 0x01; in sanei_lexmark_low_search_home_fwd()
1750 dev->shadow_regs[0x2d] = 0x03; in sanei_lexmark_low_search_home_fwd()
1751 dev->shadow_regs[0x34] = 0x04; in sanei_lexmark_low_search_home_fwd()
1752 dev->shadow_regs[0x35] = 0x04; in sanei_lexmark_low_search_home_fwd()
1753 dev->shadow_regs[0x36] = 0x08; in sanei_lexmark_low_search_home_fwd()
1754 dev->shadow_regs[0x37] = 0x08; in sanei_lexmark_low_search_home_fwd()
1755 dev->shadow_regs[0x38] = 0x0b; in sanei_lexmark_low_search_home_fwd()
1756 dev->shadow_regs[0x66] = 0x88; in sanei_lexmark_low_search_home_fwd()
1757 dev->shadow_regs[0x6c] = 0x10; in sanei_lexmark_low_search_home_fwd()
1758 dev->shadow_regs[0x6d] = 0x14; in sanei_lexmark_low_search_home_fwd()
1759 dev->shadow_regs[0x75] = 0x00; in sanei_lexmark_low_search_home_fwd()
1760 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_search_home_fwd()
1761 dev->shadow_regs[0xc5] = 0x00; in sanei_lexmark_low_search_home_fwd()
1762 dev->shadow_regs[0xca] = 0x00; in sanei_lexmark_low_search_home_fwd()
1765 dev->shadow_regs[0x0b] = 0x70; in sanei_lexmark_low_search_home_fwd()
1766 dev->shadow_regs[0x0c] = 0x28; in sanei_lexmark_low_search_home_fwd()
1767 dev->shadow_regs[0x0d] = 0xa4; in sanei_lexmark_low_search_home_fwd()
1768 dev->shadow_regs[0x2c] = 0x0d; in sanei_lexmark_low_search_home_fwd()
1769 dev->shadow_regs[0x2d] = 0x4f; in sanei_lexmark_low_search_home_fwd()
1770 dev->shadow_regs[0x2f] = 0x21; in sanei_lexmark_low_search_home_fwd()
1771 dev->shadow_regs[0x32] = 0x40; in sanei_lexmark_low_search_home_fwd()
1772 dev->shadow_regs[0x34] = 0x05; in sanei_lexmark_low_search_home_fwd()
1773 dev->shadow_regs[0x35] = 0x05; in sanei_lexmark_low_search_home_fwd()
1774 dev->shadow_regs[0x36] = 0x09; in sanei_lexmark_low_search_home_fwd()
1775 dev->shadow_regs[0x37] = 0x09; in sanei_lexmark_low_search_home_fwd()
1776 dev->shadow_regs[0x38] = 0x0d; in sanei_lexmark_low_search_home_fwd()
1777 dev->shadow_regs[0x3a] = 0x20; in sanei_lexmark_low_search_home_fwd()
1778 dev->shadow_regs[0x3b] = 0x37; in sanei_lexmark_low_search_home_fwd()
1779 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_search_home_fwd()
1780 dev->shadow_regs[0x47] = 0x01; in sanei_lexmark_low_search_home_fwd()
1781 dev->shadow_regs[0x48] = 0x1a; in sanei_lexmark_low_search_home_fwd()
1782 dev->shadow_regs[0x49] = 0x5b; in sanei_lexmark_low_search_home_fwd()
1783 dev->shadow_regs[0x4a] = 0x1b; in sanei_lexmark_low_search_home_fwd()
1784 dev->shadow_regs[0x4b] = 0x5b; in sanei_lexmark_low_search_home_fwd()
1785 dev->shadow_regs[0x4c] = 0x05; in sanei_lexmark_low_search_home_fwd()
1786 dev->shadow_regs[0x4d] = 0x3f; in sanei_lexmark_low_search_home_fwd()
1787 dev->shadow_regs[0x75] = 0x00; in sanei_lexmark_low_search_home_fwd()
1788 dev->shadow_regs[0x85] = 0x03; in sanei_lexmark_low_search_home_fwd()
1789 dev->shadow_regs[0x86] = 0x33; in sanei_lexmark_low_search_home_fwd()
1790 dev->shadow_regs[0x87] = 0x8f; in sanei_lexmark_low_search_home_fwd()
1791 dev->shadow_regs[0x88] = 0x34; in sanei_lexmark_low_search_home_fwd()
1792 dev->shadow_regs[0x8b] = 0xff; in sanei_lexmark_low_search_home_fwd()
1793 dev->shadow_regs[0x8e] = 0x60; in sanei_lexmark_low_search_home_fwd()
1794 dev->shadow_regs[0x8f] = 0x80; in sanei_lexmark_low_search_home_fwd()
1795 dev->shadow_regs[0x91] = 0x59; in sanei_lexmark_low_search_home_fwd()
1796 dev->shadow_regs[0x92] = 0x10; in sanei_lexmark_low_search_home_fwd()
1797 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_search_home_fwd()
1798 dev->shadow_regs[0xa3] = 0x0d; in sanei_lexmark_low_search_home_fwd()
1799 dev->shadow_regs[0xa4] = 0x5e; in sanei_lexmark_low_search_home_fwd()
1800 dev->shadow_regs[0xa5] = 0x23; in sanei_lexmark_low_search_home_fwd()
1801 dev->shadow_regs[0xb1] = 0x07; in sanei_lexmark_low_search_home_fwd()
1802 dev->shadow_regs[0xc2] = 0x80; in sanei_lexmark_low_search_home_fwd()
1803 dev->shadow_regs[0xc5] = 0x00; in sanei_lexmark_low_search_home_fwd()
1804 dev->shadow_regs[0xca] = 0x00; in sanei_lexmark_low_search_home_fwd()
1807 dev->shadow_regs[0x65] = 0x80; in sanei_lexmark_low_search_home_fwd()
1808 dev->shadow_regs[0x8c] = 0x02; in sanei_lexmark_low_search_home_fwd()
1809 dev->shadow_regs[0x8d] = 0x01; in sanei_lexmark_low_search_home_fwd()
1810 dev->shadow_regs[0xb2] = 0x00; in sanei_lexmark_low_search_home_fwd()
1811 dev->shadow_regs[0xed] = 0x00; in sanei_lexmark_low_search_home_fwd()
1812 dev->shadow_regs[0xee] = 0x00; in sanei_lexmark_low_search_home_fwd()
1814 rts88xx_set_gain (dev->shadow_regs, dev->sensor->default_gain, in sanei_lexmark_low_search_home_fwd()
1815 dev->sensor->default_gain, dev->sensor->default_gain); in sanei_lexmark_low_search_home_fwd()
1816 rts88xx_set_offset (dev->shadow_regs, 0x80, 0x80, 0x80); in sanei_lexmark_low_search_home_fwd()
1819 rts88xx_set_gray_scan (dev->shadow_regs); in sanei_lexmark_low_search_home_fwd()
1822 dev->shadow_regs[0x39] = 0x07; in sanei_lexmark_low_search_home_fwd()
1825 dev->shadow_regs[0x60] = 0x01; in sanei_lexmark_low_search_home_fwd()
1826 dev->shadow_regs[0x61] = 0x00; in sanei_lexmark_low_search_home_fwd()
1827 dev->shadow_regs[0x62] = 0x02; in sanei_lexmark_low_search_home_fwd()
1828 dev->shadow_regs[0x63] = 0x00; in sanei_lexmark_low_search_home_fwd()
1831 rts88xx_set_scan_frequency (dev->shadow_regs, 1); in sanei_lexmark_low_search_home_fwd()
1834 dev->shadow_regs[0x66] = 0x6a; /* 0x88 for X1200 */ in sanei_lexmark_low_search_home_fwd()
1835 dev->shadow_regs[0x67] = 0x00; in sanei_lexmark_low_search_home_fwd()
1837 dev->shadow_regs[0x6c] = 0xf2; /* 0x1410 for X1200 */ in sanei_lexmark_low_search_home_fwd()
1838 dev->shadow_regs[0x6d] = 0x13; in sanei_lexmark_low_search_home_fwd()
1840 dev->shadow_regs[0x79] = 0x40; in sanei_lexmark_low_search_home_fwd()
1841 dev->shadow_regs[0x7a] = 0x02; in sanei_lexmark_low_search_home_fwd()
1843 dev->shadow_regs[0xc3] = 0x01; in sanei_lexmark_low_search_home_fwd()
1845 dev->shadow_regs[0xc6] = 0x01; in sanei_lexmark_low_search_home_fwd()
1847 switch (dev->model.motor_type) in sanei_lexmark_low_search_home_fwd()
1852 dev->shadow_regs[0xc9] = 0x3b; in sanei_lexmark_low_search_home_fwd()
1854 dev->shadow_regs[0xe2] = 0x01; in sanei_lexmark_low_search_home_fwd()
1856 dev->shadow_regs[0xe3] = 0x03; in sanei_lexmark_low_search_home_fwd()
1859 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_search_home_fwd()
1860 dev->shadow_regs[0xc5] = 0x00; in sanei_lexmark_low_search_home_fwd()
1861 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_search_home_fwd()
1863 dev->shadow_regs[0xc9] = 0x39; in sanei_lexmark_low_search_home_fwd()
1864 dev->shadow_regs[0xca] = 0x00; in sanei_lexmark_low_search_home_fwd()
1866 dev->shadow_regs[0xe0] = 0x29; in sanei_lexmark_low_search_home_fwd()
1867 dev->shadow_regs[0xe1] = 0x17; in sanei_lexmark_low_search_home_fwd()
1868 dev->shadow_regs[0xe2] = 0x8f; in sanei_lexmark_low_search_home_fwd()
1869 dev->shadow_regs[0xe3] = 0x06; in sanei_lexmark_low_search_home_fwd()
1870 dev->shadow_regs[0xe4] = 0x61; in sanei_lexmark_low_search_home_fwd()
1871 dev->shadow_regs[0xe5] = 0x16; in sanei_lexmark_low_search_home_fwd()
1872 dev->shadow_regs[0xe6] = 0x64; in sanei_lexmark_low_search_home_fwd()
1873 dev->shadow_regs[0xe7] = 0xb5; in sanei_lexmark_low_search_home_fwd()
1874 dev->shadow_regs[0xe8] = 0x08; in sanei_lexmark_low_search_home_fwd()
1875 dev->shadow_regs[0xe9] = 0x32; in sanei_lexmark_low_search_home_fwd()
1876 dev->shadow_regs[0xec] = 0x0c; in sanei_lexmark_low_search_home_fwd()
1877 dev->shadow_regs[0xef] = 0x08; in sanei_lexmark_low_search_home_fwd()
1885 dev->shadow_regs[0x32] = 0x00; in sanei_lexmark_low_search_home_fwd()
1886 low_write_all_regs (devnum, dev->shadow_regs); in sanei_lexmark_low_search_home_fwd()
1887 dev->shadow_regs[0x32] = 0x40; in sanei_lexmark_low_search_home_fwd()
1888 low_write_all_regs (devnum, dev->shadow_regs); in sanei_lexmark_low_search_home_fwd()
1891 rts88xx_commit (devnum, dev->shadow_regs[0x2c]); in sanei_lexmark_low_search_home_fwd()
1933 ret_val = low_is_home_line (dev, buffer); in sanei_lexmark_low_search_home_fwd()
1946 sanei_lexmark_low_search_home_bwd (Lexmark_Device * dev) in sanei_lexmark_low_search_home_bwd() argument
2001 devnum = dev->devnum; in sanei_lexmark_low_search_home_bwd()
2006 switch (dev->model.sensor_type) in sanei_lexmark_low_search_home_bwd()
2009 dev->shadow_regs[0x2c] = 0x03; in sanei_lexmark_low_search_home_bwd()
2010 dev->shadow_regs[0x2d] = 0x45; in sanei_lexmark_low_search_home_bwd()
2011 dev->shadow_regs[0x34] = 0x09; in sanei_lexmark_low_search_home_bwd()
2012 dev->shadow_regs[0x35] = 0x09; in sanei_lexmark_low_search_home_bwd()
2013 dev->shadow_regs[0x36] = 0x11; in sanei_lexmark_low_search_home_bwd()
2014 dev->shadow_regs[0x37] = 0x11; in sanei_lexmark_low_search_home_bwd()
2015 dev->shadow_regs[0x38] = 0x19; in sanei_lexmark_low_search_home_bwd()
2016 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_search_home_bwd()
2017 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_search_home_bwd()
2018 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_search_home_bwd()
2020 dev->shadow_regs[0x75] = 0x00; in sanei_lexmark_low_search_home_bwd()
2021 dev->shadow_regs[0x8b] = 0xff; in sanei_lexmark_low_search_home_bwd()
2024 dev->shadow_regs[0x2c] = 0x0f; in sanei_lexmark_low_search_home_bwd()
2025 dev->shadow_regs[0x2d] = 0x51; in sanei_lexmark_low_search_home_bwd()
2026 dev->shadow_regs[0x34] = 0x07; in sanei_lexmark_low_search_home_bwd()
2027 dev->shadow_regs[0x35] = 0x07; in sanei_lexmark_low_search_home_bwd()
2028 dev->shadow_regs[0x36] = 0x0f; in sanei_lexmark_low_search_home_bwd()
2029 dev->shadow_regs[0x37] = 0x0f; in sanei_lexmark_low_search_home_bwd()
2030 dev->shadow_regs[0x38] = 0x15; in sanei_lexmark_low_search_home_bwd()
2031 dev->shadow_regs[0x85] = 0x20; in sanei_lexmark_low_search_home_bwd()
2032 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_search_home_bwd()
2035 dev->shadow_regs[0x2c] = 0x0d; in sanei_lexmark_low_search_home_bwd()
2036 dev->shadow_regs[0x2d] = 0x4f; in sanei_lexmark_low_search_home_bwd()
2037 dev->shadow_regs[0x34] = 0x09; in sanei_lexmark_low_search_home_bwd()
2038 dev->shadow_regs[0x35] = 0x09; in sanei_lexmark_low_search_home_bwd()
2039 dev->shadow_regs[0x36] = 0x11; in sanei_lexmark_low_search_home_bwd()
2040 dev->shadow_regs[0x37] = 0x11; in sanei_lexmark_low_search_home_bwd()
2041 dev->shadow_regs[0x38] = 0x19; in sanei_lexmark_low_search_home_bwd()
2042 dev->shadow_regs[0x85] = 0x20; in sanei_lexmark_low_search_home_bwd()
2043 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_search_home_bwd()
2046 dev->shadow_regs[0x2c] = 0x0d; in sanei_lexmark_low_search_home_bwd()
2047 dev->shadow_regs[0x2d] = 0x4f; in sanei_lexmark_low_search_home_bwd()
2048 dev->shadow_regs[0x34] = 0x09; in sanei_lexmark_low_search_home_bwd()
2049 dev->shadow_regs[0x35] = 0x09; in sanei_lexmark_low_search_home_bwd()
2050 dev->shadow_regs[0x36] = 0x11; in sanei_lexmark_low_search_home_bwd()
2051 dev->shadow_regs[0x37] = 0x11; in sanei_lexmark_low_search_home_bwd()
2052 dev->shadow_regs[0x38] = 0x19; in sanei_lexmark_low_search_home_bwd()
2053 dev->shadow_regs[0x85] = 0x05; in sanei_lexmark_low_search_home_bwd()
2054 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_search_home_bwd()
2057 dev->shadow_regs[0x2c] = 0x01; in sanei_lexmark_low_search_home_bwd()
2058 dev->shadow_regs[0x2d] = 0x03; in sanei_lexmark_low_search_home_bwd()
2059 dev->shadow_regs[0x34] = 0x07; in sanei_lexmark_low_search_home_bwd()
2060 dev->shadow_regs[0x35] = 0x07; in sanei_lexmark_low_search_home_bwd()
2061 dev->shadow_regs[0x36] = 0x0f; in sanei_lexmark_low_search_home_bwd()
2062 dev->shadow_regs[0x37] = 0x0f; in sanei_lexmark_low_search_home_bwd()
2063 dev->shadow_regs[0x38] = 0x15; in sanei_lexmark_low_search_home_bwd()
2067 dev->shadow_regs[0x2c] = 0x0d; in sanei_lexmark_low_search_home_bwd()
2068 dev->shadow_regs[0x2d] = 0x4f; in sanei_lexmark_low_search_home_bwd()
2069 dev->shadow_regs[0x34] = 0x09; in sanei_lexmark_low_search_home_bwd()
2070 dev->shadow_regs[0x35] = 0x09; in sanei_lexmark_low_search_home_bwd()
2071 dev->shadow_regs[0x36] = 0x11; in sanei_lexmark_low_search_home_bwd()
2072 dev->shadow_regs[0x37] = 0x11; in sanei_lexmark_low_search_home_bwd()
2073 dev->shadow_regs[0x38] = 0x19; in sanei_lexmark_low_search_home_bwd()
2074 dev->shadow_regs[0x85] = 0x03; in sanei_lexmark_low_search_home_bwd()
2075 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_search_home_bwd()
2078 rts88xx_set_gain (dev->shadow_regs, dev->sensor->default_gain, in sanei_lexmark_low_search_home_bwd()
2079 dev->sensor->default_gain, dev->sensor->default_gain); in sanei_lexmark_low_search_home_bwd()
2080 dev->shadow_regs[0x65] = 0x80; in sanei_lexmark_low_search_home_bwd()
2081 dev->shadow_regs[0x8b] = 0xff; in sanei_lexmark_low_search_home_bwd()
2082 dev->shadow_regs[0x8c] = 0x02; in sanei_lexmark_low_search_home_bwd()
2083 dev->shadow_regs[0xb2] = 0x00; in sanei_lexmark_low_search_home_bwd()
2086 rts88xx_set_offset (dev->shadow_regs, 0x80, 0x80, 0x80); in sanei_lexmark_low_search_home_bwd()
2089 dev->shadow_regs[0x2f] = 0x21; in sanei_lexmark_low_search_home_bwd()
2091 dev->shadow_regs[0x39] = 0x03; in sanei_lexmark_low_search_home_bwd()
2093 dev->shadow_regs[0x60] = 0x0a; in sanei_lexmark_low_search_home_bwd()
2094 dev->shadow_regs[0x61] = 0x00; in sanei_lexmark_low_search_home_bwd()
2095 dev->shadow_regs[0x62] = 0x46; in sanei_lexmark_low_search_home_bwd()
2096 dev->shadow_regs[0x63] = 0x0f; in sanei_lexmark_low_search_home_bwd()
2098 rts88xx_set_scan_frequency (dev->shadow_regs, 2); in sanei_lexmark_low_search_home_bwd()
2100 dev->shadow_regs[0x66] = 0x6a; /* 0x88 for X1200 */ in sanei_lexmark_low_search_home_bwd()
2101 dev->shadow_regs[0x67] = 0x00; in sanei_lexmark_low_search_home_bwd()
2103 dev->shadow_regs[0x6c] = 0xf2; /* 0x1410 for X1200, 13f2 for X1200/rev. 97 */ in sanei_lexmark_low_search_home_bwd()
2104 dev->shadow_regs[0x6d] = 0x13; in sanei_lexmark_low_search_home_bwd()
2106 dev->shadow_regs[0x79] = 0x40; in sanei_lexmark_low_search_home_bwd()
2107 dev->shadow_regs[0x7a] = 0x02; in sanei_lexmark_low_search_home_bwd()
2110 dev->shadow_regs[0xc6] = 0x01; in sanei_lexmark_low_search_home_bwd()
2112 dev->shadow_regs[0xc3] = 0x81; in sanei_lexmark_low_search_home_bwd()
2114 switch (dev->model.motor_type) in sanei_lexmark_low_search_home_bwd()
2117 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_search_home_bwd()
2118 dev->shadow_regs[0xc5] = 0x00; in sanei_lexmark_low_search_home_bwd()
2119 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_search_home_bwd()
2121 dev->shadow_regs[0xc9] = 0x39; in sanei_lexmark_low_search_home_bwd()
2122 dev->shadow_regs[0xca] = 0x00; in sanei_lexmark_low_search_home_bwd()
2124 dev->shadow_regs[0xe0] = 0x29; in sanei_lexmark_low_search_home_bwd()
2125 dev->shadow_regs[0xe1] = 0x17; in sanei_lexmark_low_search_home_bwd()
2126 dev->shadow_regs[0xe2] = 0x8f; in sanei_lexmark_low_search_home_bwd()
2127 dev->shadow_regs[0xe3] = 0x06; in sanei_lexmark_low_search_home_bwd()
2128 dev->shadow_regs[0xe4] = 0x61; in sanei_lexmark_low_search_home_bwd()
2129 dev->shadow_regs[0xe5] = 0x16; in sanei_lexmark_low_search_home_bwd()
2130 dev->shadow_regs[0xe6] = 0x64; in sanei_lexmark_low_search_home_bwd()
2131 dev->shadow_regs[0xe7] = 0xb5; in sanei_lexmark_low_search_home_bwd()
2132 dev->shadow_regs[0xe8] = 0x08; in sanei_lexmark_low_search_home_bwd()
2133 dev->shadow_regs[0xe9] = 0x32; in sanei_lexmark_low_search_home_bwd()
2134 dev->shadow_regs[0xec] = 0x0c; in sanei_lexmark_low_search_home_bwd()
2135 dev->shadow_regs[0xef] = 0x08; in sanei_lexmark_low_search_home_bwd()
2140 dev->shadow_regs[0xc5] = 0x19; in sanei_lexmark_low_search_home_bwd()
2142 dev->shadow_regs[0xc9] = 0x3a; in sanei_lexmark_low_search_home_bwd()
2144 dev->shadow_regs[0xca] = 0x08; in sanei_lexmark_low_search_home_bwd()
2146 dev->shadow_regs[0xe0] = 0xe3; in sanei_lexmark_low_search_home_bwd()
2147 dev->shadow_regs[0xe1] = 0x18; in sanei_lexmark_low_search_home_bwd()
2148 dev->shadow_regs[0xe2] = 0x03; in sanei_lexmark_low_search_home_bwd()
2149 dev->shadow_regs[0xe3] = 0x06; in sanei_lexmark_low_search_home_bwd()
2150 dev->shadow_regs[0xe4] = 0x2b; in sanei_lexmark_low_search_home_bwd()
2151 dev->shadow_regs[0xe5] = 0x17; in sanei_lexmark_low_search_home_bwd()
2152 dev->shadow_regs[0xe6] = 0xdc; in sanei_lexmark_low_search_home_bwd()
2153 dev->shadow_regs[0xe7] = 0xb3; in sanei_lexmark_low_search_home_bwd()
2154 dev->shadow_regs[0xe8] = 0x07; in sanei_lexmark_low_search_home_bwd()
2155 dev->shadow_regs[0xe9] = 0x1b; in sanei_lexmark_low_search_home_bwd()
2156 dev->shadow_regs[0xec] = 0x07; in sanei_lexmark_low_search_home_bwd()
2157 dev->shadow_regs[0xef] = 0x03; in sanei_lexmark_low_search_home_bwd()
2165 dev->shadow_regs[0x32] = 0x00; in sanei_lexmark_low_search_home_bwd()
2166 low_write_all_regs (devnum, dev->shadow_regs); in sanei_lexmark_low_search_home_bwd()
2167 dev->shadow_regs[0x32] = 0x40; in sanei_lexmark_low_search_home_bwd()
2168 low_write_all_regs (devnum, dev->shadow_regs); in sanei_lexmark_low_search_home_bwd()
2171 status = rts88xx_commit (devnum, dev->shadow_regs[0x2c]); in sanei_lexmark_low_search_home_bwd()
2267 if (low_is_home_line (dev, buffer_start)) in sanei_lexmark_low_search_home_bwd()
2312 Lexmark_Device * dev) in low_get_start_loc() argument
2316 switch (dev->model.sensor_type) in low_get_start_loc()
2371 /* If we're here we have an unknown dev->model.sensor_type */ in low_get_start_loc()
2408 SANE_Byte * regs, Lexmark_Device * dev) in low_set_scan_area() argument
2416 low_get_start_loc (res, &vert_start, &hor_start, offset, dev); in low_set_scan_area()
2457 sanei_lexmark_low_find_start_line (Lexmark_Device * dev) in sanei_lexmark_low_find_start_line() argument
2526 switch (dev->model.sensor_type) in sanei_lexmark_low_find_start_line()
2529 dev->shadow_regs[0x2c] = 0x04; in sanei_lexmark_low_find_start_line()
2530 dev->shadow_regs[0x2d] = 0x46; in sanei_lexmark_low_find_start_line()
2531 dev->shadow_regs[0x34] = 0x05; in sanei_lexmark_low_find_start_line()
2532 dev->shadow_regs[0x35] = 0x05; in sanei_lexmark_low_find_start_line()
2533 dev->shadow_regs[0x36] = 0x0b; in sanei_lexmark_low_find_start_line()
2534 dev->shadow_regs[0x37] = 0x0b; in sanei_lexmark_low_find_start_line()
2535 dev->shadow_regs[0x38] = 0x11; in sanei_lexmark_low_find_start_line()
2536 dev->shadow_regs[0x40] = 0x40; in sanei_lexmark_low_find_start_line()
2537 rts88xx_set_gain (dev->shadow_regs, 6, 6, 6); in sanei_lexmark_low_find_start_line()
2540 dev->shadow_regs[0x2c] = 0x0f; in sanei_lexmark_low_find_start_line()
2541 dev->shadow_regs[0x2d] = 0x51; in sanei_lexmark_low_find_start_line()
2542 dev->shadow_regs[0x34] = 0x0d; in sanei_lexmark_low_find_start_line()
2543 dev->shadow_regs[0x35] = 0x0d; in sanei_lexmark_low_find_start_line()
2544 dev->shadow_regs[0x36] = 0x1d; in sanei_lexmark_low_find_start_line()
2545 dev->shadow_regs[0x37] = 0x1d; in sanei_lexmark_low_find_start_line()
2546 dev->shadow_regs[0x38] = 0x29; in sanei_lexmark_low_find_start_line()
2547 dev->shadow_regs[0x65] = 0x80; in sanei_lexmark_low_find_start_line()
2548 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_find_start_line()
2549 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_find_start_line()
2550 rts88xx_set_gain (dev->shadow_regs, 6, 6, 6); in sanei_lexmark_low_find_start_line()
2553 rts88xx_set_gain (dev->shadow_regs, 10, 10, 10); in sanei_lexmark_low_find_start_line()
2554 dev->shadow_regs[0x28] = 0xf5; in sanei_lexmark_low_find_start_line()
2555 dev->shadow_regs[0x29] = 0xf7; in sanei_lexmark_low_find_start_line()
2556 dev->shadow_regs[0x2a] = 0xf5; in sanei_lexmark_low_find_start_line()
2557 dev->shadow_regs[0x2b] = 0x17; in sanei_lexmark_low_find_start_line()
2559 dev->shadow_regs[0x2c] = 0x0d; in sanei_lexmark_low_find_start_line()
2560 dev->shadow_regs[0x2d] = 0x4f; in sanei_lexmark_low_find_start_line()
2561 dev->shadow_regs[0x31] = 0x01; in sanei_lexmark_low_find_start_line()
2562 dev->shadow_regs[0x34] = 0x11; in sanei_lexmark_low_find_start_line()
2563 dev->shadow_regs[0x35] = 0x11; in sanei_lexmark_low_find_start_line()
2564 dev->shadow_regs[0x36] = 0x21; in sanei_lexmark_low_find_start_line()
2565 dev->shadow_regs[0x37] = 0x21; in sanei_lexmark_low_find_start_line()
2566 dev->shadow_regs[0x38] = 0x31; in sanei_lexmark_low_find_start_line()
2567 dev->shadow_regs[0x72] = 0x35; in sanei_lexmark_low_find_start_line()
2568 dev->shadow_regs[0x74] = 0x4e; in sanei_lexmark_low_find_start_line()
2569 dev->shadow_regs[0x85] = 0x02; in sanei_lexmark_low_find_start_line()
2570 dev->shadow_regs[0x86] = 0x33; in sanei_lexmark_low_find_start_line()
2571 dev->shadow_regs[0x87] = 0x0f; in sanei_lexmark_low_find_start_line()
2572 dev->shadow_regs[0x88] = 0x24; in sanei_lexmark_low_find_start_line()
2573 dev->shadow_regs[0x91] = 0x19; in sanei_lexmark_low_find_start_line()
2574 dev->shadow_regs[0x92] = 0x20; in sanei_lexmark_low_find_start_line()
2575 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_find_start_line()
2576 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_find_start_line()
2579 dev->shadow_regs[0x2c] = 0x0d; in sanei_lexmark_low_find_start_line()
2580 dev->shadow_regs[0x2d] = 0x4f; in sanei_lexmark_low_find_start_line()
2581 dev->shadow_regs[0x34] = 0x11; in sanei_lexmark_low_find_start_line()
2582 dev->shadow_regs[0x35] = 0x11; in sanei_lexmark_low_find_start_line()
2583 dev->shadow_regs[0x36] = 0x21; in sanei_lexmark_low_find_start_line()
2584 dev->shadow_regs[0x37] = 0x21; in sanei_lexmark_low_find_start_line()
2585 dev->shadow_regs[0x38] = 0x31; in sanei_lexmark_low_find_start_line()
2586 dev->shadow_regs[0x85] = 0x05; in sanei_lexmark_low_find_start_line()
2587 dev->shadow_regs[0x88] = 0x44; in sanei_lexmark_low_find_start_line()
2588 dev->shadow_regs[0x92] = 0x85; in sanei_lexmark_low_find_start_line()
2589 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_find_start_line()
2590 rts88xx_set_gain (dev->shadow_regs, 6, 6, 6); in sanei_lexmark_low_find_start_line()
2593 dev->shadow_regs[0x2c] = 0x01; in sanei_lexmark_low_find_start_line()
2594 dev->shadow_regs[0x2d] = 0x03; in sanei_lexmark_low_find_start_line()
2595 dev->shadow_regs[0x34] = 0x0d; in sanei_lexmark_low_find_start_line()
2596 dev->shadow_regs[0x35] = 0x0d; in sanei_lexmark_low_find_start_line()
2597 dev->shadow_regs[0x36] = 0x1d; in sanei_lexmark_low_find_start_line()
2598 dev->shadow_regs[0x37] = 0x1d; in sanei_lexmark_low_find_start_line()
2599 dev->shadow_regs[0x38] = 0x29; in sanei_lexmark_low_find_start_line()
2600 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_find_start_line()
2601 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_find_start_line()
2602 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_find_start_line()
2603 dev->shadow_regs[0x50] = 0x00; in sanei_lexmark_low_find_start_line()
2604 dev->shadow_regs[0x81] = 0x00; in sanei_lexmark_low_find_start_line()
2605 dev->shadow_regs[0x82] = 0x00; in sanei_lexmark_low_find_start_line()
2606 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_find_start_line()
2607 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_find_start_line()
2608 dev->shadow_regs[0x87] = 0xff; in sanei_lexmark_low_find_start_line()
2609 dev->shadow_regs[0x88] = 0x02; in sanei_lexmark_low_find_start_line()
2610 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_find_start_line()
2611 rts88xx_set_gain (dev->shadow_regs, 10, 10, 10); in sanei_lexmark_low_find_start_line()
2614 dev->shadow_regs[0x2c] = 0x01; in sanei_lexmark_low_find_start_line()
2615 dev->shadow_regs[0x2d] = 0x03; in sanei_lexmark_low_find_start_line()
2616 dev->shadow_regs[0x34] = 0x0d; in sanei_lexmark_low_find_start_line()
2617 dev->shadow_regs[0x35] = 0x0d; in sanei_lexmark_low_find_start_line()
2618 dev->shadow_regs[0x36] = 0x1d; in sanei_lexmark_low_find_start_line()
2619 dev->shadow_regs[0x37] = 0x1d; in sanei_lexmark_low_find_start_line()
2620 dev->shadow_regs[0x38] = 0x29; in sanei_lexmark_low_find_start_line()
2621 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_find_start_line()
2622 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_find_start_line()
2623 rts88xx_set_gain (dev->shadow_regs, 10, 10, 10); in sanei_lexmark_low_find_start_line()
2628 rts88xx_set_offset (dev->shadow_regs, 0x80, 0x80, 0x80); in sanei_lexmark_low_find_start_line()
2630 dev->shadow_regs[0x2f] = 0x21; in sanei_lexmark_low_find_start_line()
2632 dev->shadow_regs[0x39] = 0x01; in sanei_lexmark_low_find_start_line()
2634 dev->shadow_regs[0x60] = 0x03; in sanei_lexmark_low_find_start_line()
2635 dev->shadow_regs[0x61] = 0x00; in sanei_lexmark_low_find_start_line()
2636 dev->shadow_regs[0x62] = 0x3e; in sanei_lexmark_low_find_start_line()
2637 dev->shadow_regs[0x63] = 0x00; in sanei_lexmark_low_find_start_line()
2639 rts88xx_set_scan_frequency (dev->shadow_regs, 1); in sanei_lexmark_low_find_start_line()
2641 dev->shadow_regs[0x66] = 0xd4; /* 0xf2 for X1200 */ in sanei_lexmark_low_find_start_line()
2642 dev->shadow_regs[0x67] = 0x09; in sanei_lexmark_low_find_start_line()
2644 dev->shadow_regs[0x6c] = 0x84; /* 0xa2 for X1200 */ in sanei_lexmark_low_find_start_line()
2645 dev->shadow_regs[0x6d] = 0x0a; in sanei_lexmark_low_find_start_line()
2647 dev->shadow_regs[0x79] = 0x40; in sanei_lexmark_low_find_start_line()
2648 dev->shadow_regs[0x7a] = 0x02; in sanei_lexmark_low_find_start_line()
2651 dev->shadow_regs[0xc3] = 0x81; in sanei_lexmark_low_find_start_line()
2657 switch (dev->model.motor_type) in sanei_lexmark_low_find_start_line()
2662 dev->shadow_regs[0xc5] = 0x22; in sanei_lexmark_low_find_start_line()
2664 dev->shadow_regs[0xc6] = 0x09; in sanei_lexmark_low_find_start_line()
2666 dev->shadow_regs[0xc9] = 0x3b; in sanei_lexmark_low_find_start_line()
2668 dev->shadow_regs[0xca] = 0x1f; in sanei_lexmark_low_find_start_line()
2669 dev->shadow_regs[0xe0] = 0xf7; in sanei_lexmark_low_find_start_line()
2670 dev->shadow_regs[0xe1] = 0x16; in sanei_lexmark_low_find_start_line()
2672 dev->shadow_regs[0xe2] = 0x87; in sanei_lexmark_low_find_start_line()
2674 dev->shadow_regs[0xe3] = 0x13; in sanei_lexmark_low_find_start_line()
2675 dev->shadow_regs[0xe4] = 0x1b; in sanei_lexmark_low_find_start_line()
2676 dev->shadow_regs[0xe5] = 0x16; in sanei_lexmark_low_find_start_line()
2677 dev->shadow_regs[0xe6] = 0xdc; in sanei_lexmark_low_find_start_line()
2678 dev->shadow_regs[0xe7] = 0x00; in sanei_lexmark_low_find_start_line()
2679 dev->shadow_regs[0xe8] = 0x00; in sanei_lexmark_low_find_start_line()
2680 dev->shadow_regs[0xe9] = 0x1b; in sanei_lexmark_low_find_start_line()
2681 dev->shadow_regs[0xec] = 0x07; in sanei_lexmark_low_find_start_line()
2682 dev->shadow_regs[0xef] = 0x03; in sanei_lexmark_low_find_start_line()
2685 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_find_start_line()
2686 dev->shadow_regs[0xc5] = 0x22; in sanei_lexmark_low_find_start_line()
2688 dev->shadow_regs[0xc6] = 0x0b; in sanei_lexmark_low_find_start_line()
2690 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_find_start_line()
2691 dev->shadow_regs[0xc9] = 0x39; in sanei_lexmark_low_find_start_line()
2692 dev->shadow_regs[0xca] = 0x1f; in sanei_lexmark_low_find_start_line()
2695 dev->shadow_regs[0xe0] = 0x2f; in sanei_lexmark_low_find_start_line()
2696 dev->shadow_regs[0xe1] = 0x11; in sanei_lexmark_low_find_start_line()
2698 dev->shadow_regs[0xe2] = 0x9f; in sanei_lexmark_low_find_start_line()
2700 dev->shadow_regs[0xe3] = 0x0f; in sanei_lexmark_low_find_start_line()
2702 dev->shadow_regs[0xe4] = 0xcb; in sanei_lexmark_low_find_start_line()
2704 dev->shadow_regs[0xe5] = 0x10; in sanei_lexmark_low_find_start_line()
2706 dev->shadow_regs[0xe6] = 0x64; in sanei_lexmark_low_find_start_line()
2708 dev->shadow_regs[0xe7] = 0x00; in sanei_lexmark_low_find_start_line()
2709 dev->shadow_regs[0xe8] = 0x00; in sanei_lexmark_low_find_start_line()
2711 dev->shadow_regs[0xe9] = 0x32; in sanei_lexmark_low_find_start_line()
2713 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_find_start_line()
2714 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_find_start_line()
2716 dev->shadow_regs[0xec] = 0x0c; in sanei_lexmark_low_find_start_line()
2718 dev->shadow_regs[0xed] = 0x00; in sanei_lexmark_low_find_start_line()
2719 dev->shadow_regs[0xee] = 0x00; in sanei_lexmark_low_find_start_line()
2721 dev->shadow_regs[0xef] = 0x08; in sanei_lexmark_low_find_start_line()
2727 low_stop_mvmt (dev->devnum); in sanei_lexmark_low_find_start_line()
2730 dev->shadow_regs[0x32] = 0x00; in sanei_lexmark_low_find_start_line()
2731 low_write_all_regs (dev->devnum, dev->shadow_regs); in sanei_lexmark_low_find_start_line()
2732 dev->shadow_regs[0x32] = 0x40; in sanei_lexmark_low_find_start_line()
2733 low_write_all_regs (dev->devnum, dev->shadow_regs); in sanei_lexmark_low_find_start_line()
2736 rts88xx_commit (dev->devnum, dev->shadow_regs[0x2c]); in sanei_lexmark_low_find_start_line()
2743 low_usb_bulk_write (dev->devnum, command4_block, &cmd_size); in sanei_lexmark_low_find_start_line()
2745 low_usb_bulk_read (dev->devnum, poll_result, &cmd_size); in sanei_lexmark_low_find_start_line()
2768 low_usb_bulk_write (dev->devnum, command5_block, &cmd_size); in sanei_lexmark_low_find_start_line()
2771 low_usb_bulk_read (dev->devnum, buffer, &cmd_size); in sanei_lexmark_low_find_start_line()
2774 low_stop_mvmt (dev->devnum); in sanei_lexmark_low_find_start_line()
2855 if (dev->model.sensor_type == X74_SENSOR) in sanei_lexmark_low_find_start_line()
2856 low_stop_mvmt (dev->devnum); in sanei_lexmark_low_find_start_line()
2864 sanei_lexmark_low_set_scan_regs (Lexmark_Device * dev, SANE_Int resolution, in sanei_lexmark_low_set_scan_regs() argument
2874 if (strcmp (dev->val[OPT_MODE].s, SANE_VALUE_SCAN_MODE_COLOR) == 0) in sanei_lexmark_low_set_scan_regs()
2880 switch (dev->model.sensor_type) in sanei_lexmark_low_set_scan_regs()
2883 dev->shadow_regs[0x2c] = 0x03; in sanei_lexmark_low_set_scan_regs()
2884 dev->shadow_regs[0x2d] = 0x45; in sanei_lexmark_low_set_scan_regs()
2887 dev->shadow_regs[0x2c] = 0x0f; in sanei_lexmark_low_set_scan_regs()
2888 dev->shadow_regs[0x2d] = 0x51; in sanei_lexmark_low_set_scan_regs()
2891 dev->shadow_regs[0x2c] = 0x0d; in sanei_lexmark_low_set_scan_regs()
2892 dev->shadow_regs[0x2d] = 0x4f; in sanei_lexmark_low_set_scan_regs()
2895 dev->shadow_regs[0x2c] = 0x0d; in sanei_lexmark_low_set_scan_regs()
2896 dev->shadow_regs[0x2d] = 0x4f; in sanei_lexmark_low_set_scan_regs()
2899 dev->shadow_regs[0x2c] = 0x01; in sanei_lexmark_low_set_scan_regs()
2900 dev->shadow_regs[0x2d] = 0x03; in sanei_lexmark_low_set_scan_regs()
2903 dev->shadow_regs[0x2c] = 0x01; in sanei_lexmark_low_set_scan_regs()
2904 dev->shadow_regs[0x2d] = 0x03; in sanei_lexmark_low_set_scan_regs()
2909 dev->val[OPT_TL_X].w, in sanei_lexmark_low_set_scan_regs()
2910 dev->val[OPT_TL_Y].w, in sanei_lexmark_low_set_scan_regs()
2911 dev->val[OPT_BR_X].w, in sanei_lexmark_low_set_scan_regs()
2912 dev->val[OPT_BR_Y].w, in sanei_lexmark_low_set_scan_regs()
2914 (dev->model.motor_type == A920_MOTOR in sanei_lexmark_low_set_scan_regs()
2915 || dev->model.motor_type == X74_MOTOR) && isColourScan in sanei_lexmark_low_set_scan_regs()
2916 && (resolution == 600), dev->shadow_regs, dev); in sanei_lexmark_low_set_scan_regs()
2919 if (dev->val[OPT_RESOLUTION].w < 600) in sanei_lexmark_low_set_scan_regs()
2920 dev->shadow_regs[0x7a] = 600 / dev->val[OPT_RESOLUTION].w; in sanei_lexmark_low_set_scan_regs()
2922 dev->shadow_regs[0x7a] = 1; in sanei_lexmark_low_set_scan_regs()
2931 switch (dev->model.sensor_type) in sanei_lexmark_low_set_scan_regs()
2935 dev->shadow_regs[0x34] = 0x04; in sanei_lexmark_low_set_scan_regs()
2936 dev->shadow_regs[0x36] = 0x03; in sanei_lexmark_low_set_scan_regs()
2937 dev->shadow_regs[0x38] = 0x03; in sanei_lexmark_low_set_scan_regs()
2939 dev->shadow_regs[0x79] = 0x08; in sanei_lexmark_low_set_scan_regs()
2941 dev->shadow_regs[0x80] = 0x0d; in sanei_lexmark_low_set_scan_regs()
2942 dev->shadow_regs[0x81] = 0x0e; in sanei_lexmark_low_set_scan_regs()
2943 dev->shadow_regs[0x82] = 0x02; in sanei_lexmark_low_set_scan_regs()
2945 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
2946 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
2947 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
2948 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
2950 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
2951 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
2952 dev->shadow_regs[0x93] = 0x06;; in sanei_lexmark_low_set_scan_regs()
2957 dev->shadow_regs[0x34] = 0x05; in sanei_lexmark_low_set_scan_regs()
2958 dev->shadow_regs[0x36] = 0x05; in sanei_lexmark_low_set_scan_regs()
2959 dev->shadow_regs[0x38] = 0x05; in sanei_lexmark_low_set_scan_regs()
2961 dev->shadow_regs[0x80] = 0x0c; in sanei_lexmark_low_set_scan_regs()
2962 dev->shadow_regs[0x81] = 0x0c; in sanei_lexmark_low_set_scan_regs()
2963 dev->shadow_regs[0x82] = 0x09; in sanei_lexmark_low_set_scan_regs()
2965 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
2966 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
2967 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
2968 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
2970 dev->shadow_regs[0x91] = 0x8c; in sanei_lexmark_low_set_scan_regs()
2971 dev->shadow_regs[0x92] = 0x40; in sanei_lexmark_low_set_scan_regs()
2972 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
2976 dev->shadow_regs[0x34] = 0x03; in sanei_lexmark_low_set_scan_regs()
2977 dev->shadow_regs[0x36] = 0x04; in sanei_lexmark_low_set_scan_regs()
2978 dev->shadow_regs[0x38] = 0x03; in sanei_lexmark_low_set_scan_regs()
2980 dev->shadow_regs[0x80] = 0x00; in sanei_lexmark_low_set_scan_regs()
2981 dev->shadow_regs[0x81] = 0x02; in sanei_lexmark_low_set_scan_regs()
2982 dev->shadow_regs[0x82] = 0x03; in sanei_lexmark_low_set_scan_regs()
2984 dev->shadow_regs[0x85] = 0x20; in sanei_lexmark_low_set_scan_regs()
2985 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
2986 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
2987 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
2989 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
2990 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
2991 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
2995 dev->shadow_regs[0x34] = 0x02; in sanei_lexmark_low_set_scan_regs()
2996 dev->shadow_regs[0x36] = 0x04; in sanei_lexmark_low_set_scan_regs()
2997 dev->shadow_regs[0x38] = 0x03; in sanei_lexmark_low_set_scan_regs()
2999 dev->shadow_regs[0x80] = 0x07; in sanei_lexmark_low_set_scan_regs()
3000 dev->shadow_regs[0x81] = 0x0f; in sanei_lexmark_low_set_scan_regs()
3001 dev->shadow_regs[0x82] = 0x03; in sanei_lexmark_low_set_scan_regs()
3003 dev->shadow_regs[0x85] = 0x05; in sanei_lexmark_low_set_scan_regs()
3004 dev->shadow_regs[0x86] = 0x14; in sanei_lexmark_low_set_scan_regs()
3005 dev->shadow_regs[0x87] = 0x06; in sanei_lexmark_low_set_scan_regs()
3006 dev->shadow_regs[0x88] = 0x44; in sanei_lexmark_low_set_scan_regs()
3008 dev->shadow_regs[0x91] = 0x60; in sanei_lexmark_low_set_scan_regs()
3009 dev->shadow_regs[0x92] = 0x85; in sanei_lexmark_low_set_scan_regs()
3010 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3014 dev->shadow_regs[0x34] = 0x02; in sanei_lexmark_low_set_scan_regs()
3015 dev->shadow_regs[0x36] = 0x03; in sanei_lexmark_low_set_scan_regs()
3016 dev->shadow_regs[0x38] = 0x01; in sanei_lexmark_low_set_scan_regs()
3018 dev->shadow_regs[0x79] = 0x20; in sanei_lexmark_low_set_scan_regs()
3020 dev->shadow_regs[0x80] = 0x08; in sanei_lexmark_low_set_scan_regs()
3021 dev->shadow_regs[0x81] = 0x02; in sanei_lexmark_low_set_scan_regs()
3022 dev->shadow_regs[0x82] = 0x0d; in sanei_lexmark_low_set_scan_regs()
3024 dev->shadow_regs[0x85] = 0x20; in sanei_lexmark_low_set_scan_regs()
3025 dev->shadow_regs[0x86] = 0x1e; in sanei_lexmark_low_set_scan_regs()
3026 dev->shadow_regs[0x87] = 0x39; in sanei_lexmark_low_set_scan_regs()
3027 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
3029 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
3030 /* dev->shadow_regs[0x92] = 0x92; */ in sanei_lexmark_low_set_scan_regs()
3031 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
3035 dev->shadow_regs[0x34] = 0x04; in sanei_lexmark_low_set_scan_regs()
3036 dev->shadow_regs[0x36] = 0x05; in sanei_lexmark_low_set_scan_regs()
3037 dev->shadow_regs[0x38] = 0x04; in sanei_lexmark_low_set_scan_regs()
3039 dev->shadow_regs[0x80] = 0x01; in sanei_lexmark_low_set_scan_regs()
3040 dev->shadow_regs[0x81] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3041 dev->shadow_regs[0x82] = 0x0b; in sanei_lexmark_low_set_scan_regs()
3045 switch (dev->model.motor_type) in sanei_lexmark_low_set_scan_regs()
3048 dev->shadow_regs[0xc2] = 0x80; in sanei_lexmark_low_set_scan_regs()
3050 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_set_scan_regs()
3051 dev->shadow_regs[0xc5] = 0x0c; in sanei_lexmark_low_set_scan_regs()
3052 dev->shadow_regs[0xc6] = 0x0b; in sanei_lexmark_low_set_scan_regs()
3054 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_set_scan_regs()
3055 dev->shadow_regs[0xc9] = 0x39; in sanei_lexmark_low_set_scan_regs()
3056 dev->shadow_regs[0xca] = 0x01; in sanei_lexmark_low_set_scan_regs()
3059 dev->shadow_regs[0xe0] = 0x1b; in sanei_lexmark_low_set_scan_regs()
3060 dev->shadow_regs[0xe1] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3062 dev->shadow_regs[0xe2] = 0x4f; in sanei_lexmark_low_set_scan_regs()
3064 dev->shadow_regs[0xe3] = 0x01; in sanei_lexmark_low_set_scan_regs()
3066 dev->shadow_regs[0xe4] = 0xb3; in sanei_lexmark_low_set_scan_regs()
3068 dev->shadow_regs[0xe5] = 0x09; in sanei_lexmark_low_set_scan_regs()
3070 dev->shadow_regs[0xe6] = 0x0d; in sanei_lexmark_low_set_scan_regs()
3072 dev->shadow_regs[0xe7] = 0xe5; in sanei_lexmark_low_set_scan_regs()
3073 dev->shadow_regs[0xe8] = 0x02; in sanei_lexmark_low_set_scan_regs()
3075 dev->shadow_regs[0xe9] = 0x05; in sanei_lexmark_low_set_scan_regs()
3077 dev->shadow_regs[0xea] = 0xa0; in sanei_lexmark_low_set_scan_regs()
3078 dev->shadow_regs[0xeb] = 0x01; in sanei_lexmark_low_set_scan_regs()
3080 dev->shadow_regs[0xec] = 0x01; in sanei_lexmark_low_set_scan_regs()
3082 dev->shadow_regs[0xed] = 0x00; in sanei_lexmark_low_set_scan_regs()
3083 dev->shadow_regs[0xee] = 0x00; in sanei_lexmark_low_set_scan_regs()
3085 dev->shadow_regs[0xef] = 0x01; in sanei_lexmark_low_set_scan_regs()
3090 dev->shadow_regs[0xc5] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3092 dev->shadow_regs[0xe0] = 0x2b; in sanei_lexmark_low_set_scan_regs()
3093 dev->shadow_regs[0xe1] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3095 dev->shadow_regs[0xe2] = 0x7f; in sanei_lexmark_low_set_scan_regs()
3097 dev->shadow_regs[0xe3] = 0x01; in sanei_lexmark_low_set_scan_regs()
3099 dev->shadow_regs[0xe4] = 0xbb; in sanei_lexmark_low_set_scan_regs()
3100 dev->shadow_regs[0xe5] = 0x09; in sanei_lexmark_low_set_scan_regs()
3102 dev->shadow_regs[0xe6] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3104 dev->shadow_regs[0xe7] = 0x2b; in sanei_lexmark_low_set_scan_regs()
3105 dev->shadow_regs[0xe8] = 0x03; in sanei_lexmark_low_set_scan_regs()
3107 dev->shadow_regs[0xe9] = 0x05; in sanei_lexmark_low_set_scan_regs()
3109 dev->shadow_regs[0xea] = 0xa0; in sanei_lexmark_low_set_scan_regs()
3110 dev->shadow_regs[0xeb] = 0x01; in sanei_lexmark_low_set_scan_regs()
3112 dev->shadow_regs[0xec] = 0x01; in sanei_lexmark_low_set_scan_regs()
3114 dev->shadow_regs[0xef] = 0x01; in sanei_lexmark_low_set_scan_regs()
3119 dev->shadow_regs[0x2f] = 0x11; in sanei_lexmark_low_set_scan_regs()
3121 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_set_scan_regs()
3122 dev->shadow_regs[0x37] = 0x01; in sanei_lexmark_low_set_scan_regs()
3124 dev->shadow_regs[0xc3] = 0x83; in sanei_lexmark_low_set_scan_regs()
3128 switch (dev->model.sensor_type) in sanei_lexmark_low_set_scan_regs()
3132 dev->shadow_regs[0x34] = 0x01; in sanei_lexmark_low_set_scan_regs()
3133 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_set_scan_regs()
3134 dev->shadow_regs[0x36] = 0x02; in sanei_lexmark_low_set_scan_regs()
3135 dev->shadow_regs[0x37] = 0x02; in sanei_lexmark_low_set_scan_regs()
3136 dev->shadow_regs[0x38] = 0x03; in sanei_lexmark_low_set_scan_regs()
3137 dev->shadow_regs[0x39] = 0x0f; in sanei_lexmark_low_set_scan_regs()
3139 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_set_scan_regs()
3141 dev->shadow_regs[0x79] = 0x08; in sanei_lexmark_low_set_scan_regs()
3143 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
3144 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
3145 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
3146 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
3148 dev->shadow_regs[0x8c] = 0x02; in sanei_lexmark_low_set_scan_regs()
3149 dev->shadow_regs[0x8d] = 0x01; in sanei_lexmark_low_set_scan_regs()
3150 dev->shadow_regs[0x8e] = 0x60; in sanei_lexmark_low_set_scan_regs()
3151 dev->shadow_regs[0x8f] = 0x80; in sanei_lexmark_low_set_scan_regs()
3153 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
3154 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
3155 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
3160 dev->shadow_regs[0x34] = 0x02; in sanei_lexmark_low_set_scan_regs()
3161 dev->shadow_regs[0x35] = 0x02; in sanei_lexmark_low_set_scan_regs()
3162 dev->shadow_regs[0x36] = 0x04; in sanei_lexmark_low_set_scan_regs()
3163 dev->shadow_regs[0x37] = 0x04; in sanei_lexmark_low_set_scan_regs()
3164 dev->shadow_regs[0x38] = 0x06; in sanei_lexmark_low_set_scan_regs()
3166 dev->shadow_regs[0x85] = 0x20; in sanei_lexmark_low_set_scan_regs()
3167 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
3168 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
3169 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
3171 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
3172 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
3173 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
3176 dev->shadow_regs[0x34] = 0x01; in sanei_lexmark_low_set_scan_regs()
3177 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_set_scan_regs()
3178 dev->shadow_regs[0x36] = 0x02; in sanei_lexmark_low_set_scan_regs()
3179 dev->shadow_regs[0x37] = 0x02; in sanei_lexmark_low_set_scan_regs()
3180 dev->shadow_regs[0x38] = 0x03; /* these are half of B2 sensor */ in sanei_lexmark_low_set_scan_regs()
3182 dev->shadow_regs[0x85] = 0x20; in sanei_lexmark_low_set_scan_regs()
3183 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
3184 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
3185 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
3187 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
3188 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
3189 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
3190 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
3193 dev->shadow_regs[0x34] = 0x01; in sanei_lexmark_low_set_scan_regs()
3194 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_set_scan_regs()
3195 dev->shadow_regs[0x36] = 0x02; in sanei_lexmark_low_set_scan_regs()
3196 dev->shadow_regs[0x37] = 0x02; in sanei_lexmark_low_set_scan_regs()
3197 dev->shadow_regs[0x38] = 0x03; in sanei_lexmark_low_set_scan_regs()
3199 dev->shadow_regs[0x85] = 0x0d; in sanei_lexmark_low_set_scan_regs()
3200 dev->shadow_regs[0x86] = 0x14; in sanei_lexmark_low_set_scan_regs()
3201 dev->shadow_regs[0x87] = 0x06; in sanei_lexmark_low_set_scan_regs()
3202 dev->shadow_regs[0x88] = 0x45; in sanei_lexmark_low_set_scan_regs()
3204 dev->shadow_regs[0x91] = 0x60; in sanei_lexmark_low_set_scan_regs()
3205 dev->shadow_regs[0x92] = 0x8d; in sanei_lexmark_low_set_scan_regs()
3206 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3209 dev->shadow_regs[0x34] = 0x01; in sanei_lexmark_low_set_scan_regs()
3210 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_set_scan_regs()
3211 dev->shadow_regs[0x36] = 0x02; in sanei_lexmark_low_set_scan_regs()
3212 dev->shadow_regs[0x37] = 0x02; in sanei_lexmark_low_set_scan_regs()
3213 dev->shadow_regs[0x38] = 0x02; in sanei_lexmark_low_set_scan_regs()
3215 dev->shadow_regs[0x79] = 0x20; in sanei_lexmark_low_set_scan_regs()
3217 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
3218 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
3219 dev->shadow_regs[0x87] = 0xff; in sanei_lexmark_low_set_scan_regs()
3220 dev->shadow_regs[0x88] = 0x02; in sanei_lexmark_low_set_scan_regs()
3222 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
3225 dev->shadow_regs[0x34] = 0x01; in sanei_lexmark_low_set_scan_regs()
3226 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_set_scan_regs()
3227 dev->shadow_regs[0x36] = 0x02; in sanei_lexmark_low_set_scan_regs()
3228 dev->shadow_regs[0x37] = 0x02; in sanei_lexmark_low_set_scan_regs()
3229 dev->shadow_regs[0x38] = 0x02; in sanei_lexmark_low_set_scan_regs()
3231 dev->shadow_regs[0x79] = 0x20; in sanei_lexmark_low_set_scan_regs()
3233 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
3234 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
3235 dev->shadow_regs[0x87] = 0xff; in sanei_lexmark_low_set_scan_regs()
3236 dev->shadow_regs[0x88] = 0x02; in sanei_lexmark_low_set_scan_regs()
3238 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
3241 switch (dev->model.motor_type) in sanei_lexmark_low_set_scan_regs()
3245 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_set_scan_regs()
3246 dev->shadow_regs[0xc5] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3247 dev->shadow_regs[0xc6] = 0x0b; in sanei_lexmark_low_set_scan_regs()
3249 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_set_scan_regs()
3250 dev->shadow_regs[0xc9] = 0x39; in sanei_lexmark_low_set_scan_regs()
3251 dev->shadow_regs[0xca] = 0x01; in sanei_lexmark_low_set_scan_regs()
3254 dev->shadow_regs[0xe0] = 0x07; in sanei_lexmark_low_set_scan_regs()
3255 dev->shadow_regs[0xe1] = 0x18; in sanei_lexmark_low_set_scan_regs()
3257 dev->shadow_regs[0xe2] = 0xe7; in sanei_lexmark_low_set_scan_regs()
3259 dev->shadow_regs[0xe3] = 0x03; in sanei_lexmark_low_set_scan_regs()
3261 dev->shadow_regs[0xe4] = 0xe7; in sanei_lexmark_low_set_scan_regs()
3262 dev->shadow_regs[0xe5] = 0x14; in sanei_lexmark_low_set_scan_regs()
3264 dev->shadow_regs[0xe6] = 0x64; in sanei_lexmark_low_set_scan_regs()
3266 dev->shadow_regs[0xe7] = 0xcb; in sanei_lexmark_low_set_scan_regs()
3267 dev->shadow_regs[0xe8] = 0x08; in sanei_lexmark_low_set_scan_regs()
3269 dev->shadow_regs[0xe9] = 0x32; in sanei_lexmark_low_set_scan_regs()
3271 dev->shadow_regs[0xea] = 0xe3; in sanei_lexmark_low_set_scan_regs()
3272 dev->shadow_regs[0xeb] = 0x04; in sanei_lexmark_low_set_scan_regs()
3274 dev->shadow_regs[0xec] = 0x0c; in sanei_lexmark_low_set_scan_regs()
3276 dev->shadow_regs[0xed] = 0x00; in sanei_lexmark_low_set_scan_regs()
3277 dev->shadow_regs[0xee] = 0x00; in sanei_lexmark_low_set_scan_regs()
3279 dev->shadow_regs[0xef] = 0x08; in sanei_lexmark_low_set_scan_regs()
3284 dev->shadow_regs[0xc5] = 0x10; in sanei_lexmark_low_set_scan_regs()
3286 dev->shadow_regs[0xc6] = 0x09; in sanei_lexmark_low_set_scan_regs()
3288 dev->shadow_regs[0xc9] = 0x3b; in sanei_lexmark_low_set_scan_regs()
3289 dev->shadow_regs[0xca] = 0x01; in sanei_lexmark_low_set_scan_regs()
3291 dev->shadow_regs[0xe0] = 0x4d; in sanei_lexmark_low_set_scan_regs()
3292 dev->shadow_regs[0xe1] = 0x1c; in sanei_lexmark_low_set_scan_regs()
3294 dev->shadow_regs[0xe2] = 0x71; in sanei_lexmark_low_set_scan_regs()
3296 dev->shadow_regs[0xe3] = 0x02; in sanei_lexmark_low_set_scan_regs()
3298 dev->shadow_regs[0xe4] = 0x6d; in sanei_lexmark_low_set_scan_regs()
3299 dev->shadow_regs[0xe5] = 0x15; in sanei_lexmark_low_set_scan_regs()
3301 dev->shadow_regs[0xe6] = 0xdc; in sanei_lexmark_low_set_scan_regs()
3303 dev->shadow_regs[0xe7] = 0xad; in sanei_lexmark_low_set_scan_regs()
3304 dev->shadow_regs[0xe8] = 0x07; in sanei_lexmark_low_set_scan_regs()
3306 dev->shadow_regs[0xe9] = 0x1b; in sanei_lexmark_low_set_scan_regs()
3308 dev->shadow_regs[0xea] = 0xe1; in sanei_lexmark_low_set_scan_regs()
3309 dev->shadow_regs[0xeb] = 0x03; in sanei_lexmark_low_set_scan_regs()
3311 dev->shadow_regs[0xec] = 0x07; in sanei_lexmark_low_set_scan_regs()
3313 dev->shadow_regs[0xed] = 0xc2; in sanei_lexmark_low_set_scan_regs()
3314 dev->shadow_regs[0xee] = 0x02; in sanei_lexmark_low_set_scan_regs()
3316 dev->shadow_regs[0xef] = 0x03; in sanei_lexmark_low_set_scan_regs()
3321 dev->shadow_regs[0x2f] = 0x21; in sanei_lexmark_low_set_scan_regs()
3324 dev->shadow_regs[0x80] = 0x00; in sanei_lexmark_low_set_scan_regs()
3325 dev->shadow_regs[0x81] = 0x00; in sanei_lexmark_low_set_scan_regs()
3326 dev->shadow_regs[0x82] = 0x00; in sanei_lexmark_low_set_scan_regs()
3328 dev->shadow_regs[0xc3] = 0x81; in sanei_lexmark_low_set_scan_regs()
3333 dev->shadow_regs[0x39] = 0x0f; in sanei_lexmark_low_set_scan_regs()
3336 rts88xx_set_scan_frequency (dev->shadow_regs, 1); in sanei_lexmark_low_set_scan_regs()
3339 if (dev->model.sensor_type != X1200_SENSOR) in sanei_lexmark_low_set_scan_regs()
3340 dev->shadow_regs[0x79] = 0x08; in sanei_lexmark_low_set_scan_regs()
3352 switch (dev->model.sensor_type) in sanei_lexmark_low_set_scan_regs()
3355 dev->shadow_regs[0x34] = 0x08; in sanei_lexmark_low_set_scan_regs()
3356 dev->shadow_regs[0x36] = 0x06; in sanei_lexmark_low_set_scan_regs()
3357 dev->shadow_regs[0x38] = 0x05; in sanei_lexmark_low_set_scan_regs()
3358 dev->shadow_regs[0x39] = 0x07; in sanei_lexmark_low_set_scan_regs()
3361 dev->shadow_regs[0x79] = 0x08; in sanei_lexmark_low_set_scan_regs()
3363 dev->shadow_regs[0x80] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3364 dev->shadow_regs[0x81] = 0x0c; in sanei_lexmark_low_set_scan_regs()
3365 dev->shadow_regs[0x82] = 0x04; in sanei_lexmark_low_set_scan_regs()
3367 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
3368 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
3369 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
3370 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
3372 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
3373 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
3374 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
3377 dev->shadow_regs[0x34] = 0x0b; in sanei_lexmark_low_set_scan_regs()
3378 dev->shadow_regs[0x36] = 0x0b; in sanei_lexmark_low_set_scan_regs()
3379 dev->shadow_regs[0x38] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3381 dev->shadow_regs[0x80] = 0x05; in sanei_lexmark_low_set_scan_regs()
3382 dev->shadow_regs[0x81] = 0x05; in sanei_lexmark_low_set_scan_regs()
3383 dev->shadow_regs[0x82] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3385 dev->shadow_regs[0x85] = 0x83; in sanei_lexmark_low_set_scan_regs()
3386 dev->shadow_regs[0x86] = 0x7e; in sanei_lexmark_low_set_scan_regs()
3387 dev->shadow_regs[0x87] = 0xad; in sanei_lexmark_low_set_scan_regs()
3388 dev->shadow_regs[0x88] = 0x35; in sanei_lexmark_low_set_scan_regs()
3390 dev->shadow_regs[0x91] = 0xfe; in sanei_lexmark_low_set_scan_regs()
3391 dev->shadow_regs[0x92] = 0xdf; in sanei_lexmark_low_set_scan_regs()
3392 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3395 dev->shadow_regs[0x34] = 0x05; in sanei_lexmark_low_set_scan_regs()
3396 dev->shadow_regs[0x36] = 0x07; in sanei_lexmark_low_set_scan_regs()
3397 dev->shadow_regs[0x38] = 0x05; in sanei_lexmark_low_set_scan_regs()
3399 dev->shadow_regs[0x80] = 0x00; in sanei_lexmark_low_set_scan_regs()
3400 dev->shadow_regs[0x81] = 0x02; in sanei_lexmark_low_set_scan_regs()
3401 dev->shadow_regs[0x82] = 0x06; in sanei_lexmark_low_set_scan_regs()
3403 dev->shadow_regs[0x85] = 0x20; in sanei_lexmark_low_set_scan_regs()
3404 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
3405 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
3406 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
3408 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
3409 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
3410 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
3413 dev->shadow_regs[0x34] = 0x03; in sanei_lexmark_low_set_scan_regs()
3414 dev->shadow_regs[0x36] = 0x08; in sanei_lexmark_low_set_scan_regs()
3415 dev->shadow_regs[0x38] = 0x05; in sanei_lexmark_low_set_scan_regs()
3417 dev->shadow_regs[0x80] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3418 dev->shadow_regs[0x81] = 0x07; in sanei_lexmark_low_set_scan_regs()
3419 dev->shadow_regs[0x82] = 0x02; in sanei_lexmark_low_set_scan_regs()
3421 dev->shadow_regs[0x85] = 0x05; in sanei_lexmark_low_set_scan_regs()
3422 dev->shadow_regs[0x86] = 0x14; in sanei_lexmark_low_set_scan_regs()
3423 dev->shadow_regs[0x87] = 0x06; in sanei_lexmark_low_set_scan_regs()
3424 dev->shadow_regs[0x88] = 0x04; in sanei_lexmark_low_set_scan_regs()
3426 dev->shadow_regs[0x91] = 0xe0; in sanei_lexmark_low_set_scan_regs()
3427 dev->shadow_regs[0x92] = 0x85; in sanei_lexmark_low_set_scan_regs()
3428 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3431 dev->shadow_regs[0x34] = 0x04; in sanei_lexmark_low_set_scan_regs()
3432 dev->shadow_regs[0x36] = 0x05; in sanei_lexmark_low_set_scan_regs()
3433 dev->shadow_regs[0x38] = 0x02; in sanei_lexmark_low_set_scan_regs()
3435 dev->shadow_regs[0x40] = 0x90; in sanei_lexmark_low_set_scan_regs()
3436 dev->shadow_regs[0x50] = 0x20; */ in sanei_lexmark_low_set_scan_regs()
3438 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_set_scan_regs()
3439 dev->shadow_regs[0x50] = 0x00; in sanei_lexmark_low_set_scan_regs()
3441 dev->shadow_regs[0x79] = 0x20; in sanei_lexmark_low_set_scan_regs()
3443 dev->shadow_regs[0x80] = 0x00; in sanei_lexmark_low_set_scan_regs()
3444 dev->shadow_regs[0x81] = 0x07; in sanei_lexmark_low_set_scan_regs()
3445 dev->shadow_regs[0x82] = 0x0b; in sanei_lexmark_low_set_scan_regs()
3447 dev->shadow_regs[0x85] = 0x20; in sanei_lexmark_low_set_scan_regs()
3448 dev->shadow_regs[0x86] = 0x1e; in sanei_lexmark_low_set_scan_regs()
3449 dev->shadow_regs[0x87] = 0x39; in sanei_lexmark_low_set_scan_regs()
3450 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
3452 dev->shadow_regs[0x92] = 0x92; in sanei_lexmark_low_set_scan_regs()
3456 dev->shadow_regs[0x34] = 0x04; in sanei_lexmark_low_set_scan_regs()
3457 dev->shadow_regs[0x36] = 0x05; in sanei_lexmark_low_set_scan_regs()
3458 dev->shadow_regs[0x38] = 0x02; in sanei_lexmark_low_set_scan_regs()
3460 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_set_scan_regs()
3461 dev->shadow_regs[0x50] = 0x00; in sanei_lexmark_low_set_scan_regs()
3463 dev->shadow_regs[0x79] = 0x20; in sanei_lexmark_low_set_scan_regs()
3465 dev->shadow_regs[0x80] = 0x00; in sanei_lexmark_low_set_scan_regs()
3466 dev->shadow_regs[0x81] = 0x07; in sanei_lexmark_low_set_scan_regs()
3467 dev->shadow_regs[0x82] = 0x0b; in sanei_lexmark_low_set_scan_regs()
3469 dev->shadow_regs[0x85] = 0x20; in sanei_lexmark_low_set_scan_regs()
3470 dev->shadow_regs[0x86] = 0x1e; in sanei_lexmark_low_set_scan_regs()
3471 dev->shadow_regs[0x87] = 0x39; in sanei_lexmark_low_set_scan_regs()
3472 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
3474 dev->shadow_regs[0x92] = 0x92; in sanei_lexmark_low_set_scan_regs()
3477 switch (dev->model.motor_type) in sanei_lexmark_low_set_scan_regs()
3480 dev->shadow_regs[0xc2] = 0x80; in sanei_lexmark_low_set_scan_regs()
3482 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_set_scan_regs()
3484 dev->shadow_regs[0xc5] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3486 dev->shadow_regs[0xc6] = 0x0b; in sanei_lexmark_low_set_scan_regs()
3487 dev->shadow_regs[0xc7] = 0x00; in sanei_lexmark_low_set_scan_regs()
3488 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_set_scan_regs()
3489 dev->shadow_regs[0xc9] = 0x39; in sanei_lexmark_low_set_scan_regs()
3490 dev->shadow_regs[0xca] = 0x03; in sanei_lexmark_low_set_scan_regs()
3493 dev->shadow_regs[0xe0] = 0x41; in sanei_lexmark_low_set_scan_regs()
3494 dev->shadow_regs[0xe1] = 0x09; in sanei_lexmark_low_set_scan_regs()
3496 dev->shadow_regs[0xe2] = 0x89; in sanei_lexmark_low_set_scan_regs()
3498 dev->shadow_regs[0xe3] = 0x02; in sanei_lexmark_low_set_scan_regs()
3500 dev->shadow_regs[0xe4] = 0x0d; in sanei_lexmark_low_set_scan_regs()
3502 dev->shadow_regs[0xe5] = 0x09; in sanei_lexmark_low_set_scan_regs()
3504 dev->shadow_regs[0xe6] = 0x0d; in sanei_lexmark_low_set_scan_regs()
3506 dev->shadow_regs[0xe7] = 0xe8; in sanei_lexmark_low_set_scan_regs()
3507 dev->shadow_regs[0xe8] = 0x02; in sanei_lexmark_low_set_scan_regs()
3509 dev->shadow_regs[0xe9] = 0x05; in sanei_lexmark_low_set_scan_regs()
3511 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_set_scan_regs()
3512 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_set_scan_regs()
3514 dev->shadow_regs[0xec] = 0x01; in sanei_lexmark_low_set_scan_regs()
3516 dev->shadow_regs[0xed] = 0x00; in sanei_lexmark_low_set_scan_regs()
3517 dev->shadow_regs[0xee] = 0x00; in sanei_lexmark_low_set_scan_regs()
3519 dev->shadow_regs[0xef] = 0x01; in sanei_lexmark_low_set_scan_regs()
3524 dev->shadow_regs[0xc5] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3526 dev->shadow_regs[0xc9] = 0x3a; in sanei_lexmark_low_set_scan_regs()
3527 dev->shadow_regs[0xca] = 0x03; in sanei_lexmark_low_set_scan_regs()
3529 dev->shadow_regs[0xe0] = 0x61; in sanei_lexmark_low_set_scan_regs()
3530 dev->shadow_regs[0xe1] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3532 dev->shadow_regs[0xe2] = 0xed; in sanei_lexmark_low_set_scan_regs()
3534 dev->shadow_regs[0xe3] = 0x02; in sanei_lexmark_low_set_scan_regs()
3536 dev->shadow_regs[0xe4] = 0x29; in sanei_lexmark_low_set_scan_regs()
3537 dev->shadow_regs[0xe5] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3539 dev->shadow_regs[0xe6] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3541 dev->shadow_regs[0xe7] = 0x29; in sanei_lexmark_low_set_scan_regs()
3542 dev->shadow_regs[0xe8] = 0x03; in sanei_lexmark_low_set_scan_regs()
3544 dev->shadow_regs[0xe9] = 0x05; in sanei_lexmark_low_set_scan_regs()
3546 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_set_scan_regs()
3547 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_set_scan_regs()
3549 dev->shadow_regs[0xec] = 0x01; in sanei_lexmark_low_set_scan_regs()
3551 dev->shadow_regs[0xef] = 0x01; in sanei_lexmark_low_set_scan_regs()
3555 dev->shadow_regs[0x2f] = 0x11; in sanei_lexmark_low_set_scan_regs()
3557 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_set_scan_regs()
3558 dev->shadow_regs[0x37] = 0x01; in sanei_lexmark_low_set_scan_regs()
3560 dev->shadow_regs[0xc3] = 0x83; in sanei_lexmark_low_set_scan_regs()
3565 switch (dev->model.sensor_type) in sanei_lexmark_low_set_scan_regs()
3569 dev->shadow_regs[0x34] = 0x02; in sanei_lexmark_low_set_scan_regs()
3570 dev->shadow_regs[0x35] = 0x02; in sanei_lexmark_low_set_scan_regs()
3571 dev->shadow_regs[0x36] = 0x04; in sanei_lexmark_low_set_scan_regs()
3572 dev->shadow_regs[0x37] = 0x04; in sanei_lexmark_low_set_scan_regs()
3573 dev->shadow_regs[0x38] = 0x06; in sanei_lexmark_low_set_scan_regs()
3574 dev->shadow_regs[0x39] = 0x07; in sanei_lexmark_low_set_scan_regs()
3576 dev->shadow_regs[0x40] = 0x40; in sanei_lexmark_low_set_scan_regs()
3579 dev->shadow_regs[0x79] = 0x08; in sanei_lexmark_low_set_scan_regs()
3581 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
3582 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
3583 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
3584 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
3586 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
3587 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
3588 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
3591 dev->shadow_regs[0x34] = 0x04; in sanei_lexmark_low_set_scan_regs()
3592 dev->shadow_regs[0x35] = 0x04; in sanei_lexmark_low_set_scan_regs()
3593 dev->shadow_regs[0x36] = 0x07; in sanei_lexmark_low_set_scan_regs()
3594 dev->shadow_regs[0x37] = 0x07; in sanei_lexmark_low_set_scan_regs()
3595 dev->shadow_regs[0x38] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3598 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
3599 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
3600 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
3601 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
3603 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
3604 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
3605 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
3608 dev->shadow_regs[0x34] = 0x02; in sanei_lexmark_low_set_scan_regs()
3609 dev->shadow_regs[0x35] = 0x02; in sanei_lexmark_low_set_scan_regs()
3610 dev->shadow_regs[0x36] = 0x04; in sanei_lexmark_low_set_scan_regs()
3611 dev->shadow_regs[0x37] = 0x04; in sanei_lexmark_low_set_scan_regs()
3612 dev->shadow_regs[0x38] = 0x05; in sanei_lexmark_low_set_scan_regs()
3614 dev->shadow_regs[0x85] = 0x20; in sanei_lexmark_low_set_scan_regs()
3615 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
3616 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
3617 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
3619 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
3620 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
3621 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
3624 dev->shadow_regs[0x34] = 0x02; in sanei_lexmark_low_set_scan_regs()
3625 dev->shadow_regs[0x35] = 0x02; in sanei_lexmark_low_set_scan_regs()
3626 dev->shadow_regs[0x36] = 0x04; in sanei_lexmark_low_set_scan_regs()
3627 dev->shadow_regs[0x37] = 0x04; in sanei_lexmark_low_set_scan_regs()
3628 dev->shadow_regs[0x38] = 0x05; in sanei_lexmark_low_set_scan_regs()
3630 dev->shadow_regs[0x85] = 0x0d; in sanei_lexmark_low_set_scan_regs()
3631 dev->shadow_regs[0x86] = 0x14; in sanei_lexmark_low_set_scan_regs()
3632 dev->shadow_regs[0x87] = 0x06; in sanei_lexmark_low_set_scan_regs()
3633 dev->shadow_regs[0x88] = 0x45; in sanei_lexmark_low_set_scan_regs()
3635 dev->shadow_regs[0x91] = 0x60; in sanei_lexmark_low_set_scan_regs()
3636 dev->shadow_regs[0x92] = 0x8d; in sanei_lexmark_low_set_scan_regs()
3637 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3640 dev->shadow_regs[0x34] = 0x01; in sanei_lexmark_low_set_scan_regs()
3641 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_set_scan_regs()
3642 dev->shadow_regs[0x36] = 0x02; in sanei_lexmark_low_set_scan_regs()
3643 dev->shadow_regs[0x37] = 0x02; in sanei_lexmark_low_set_scan_regs()
3644 dev->shadow_regs[0x38] = 0x03; in sanei_lexmark_low_set_scan_regs()
3646 /* dev->shadow_regs[0x40] = 0x90; in sanei_lexmark_low_set_scan_regs()
3647 dev->shadow_regs[0x50] = 0x20; */ in sanei_lexmark_low_set_scan_regs()
3649 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_set_scan_regs()
3650 dev->shadow_regs[0x50] = 0x00; in sanei_lexmark_low_set_scan_regs()
3652 dev->shadow_regs[0x79] = 0x20; in sanei_lexmark_low_set_scan_regs()
3654 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
3655 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
3656 dev->shadow_regs[0x87] = 0xff; in sanei_lexmark_low_set_scan_regs()
3657 dev->shadow_regs[0x88] = 0x02; in sanei_lexmark_low_set_scan_regs()
3659 dev->shadow_regs[0x92] = 0x92; in sanei_lexmark_low_set_scan_regs()
3662 dev->shadow_regs[0x34] = 0x01; in sanei_lexmark_low_set_scan_regs()
3663 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_set_scan_regs()
3664 dev->shadow_regs[0x36] = 0x02; in sanei_lexmark_low_set_scan_regs()
3665 dev->shadow_regs[0x37] = 0x02; in sanei_lexmark_low_set_scan_regs()
3666 dev->shadow_regs[0x38] = 0x03; in sanei_lexmark_low_set_scan_regs()
3668 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_set_scan_regs()
3669 dev->shadow_regs[0x50] = 0x00; in sanei_lexmark_low_set_scan_regs()
3671 dev->shadow_regs[0x79] = 0x20; in sanei_lexmark_low_set_scan_regs()
3673 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
3674 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
3675 dev->shadow_regs[0x87] = 0xff; in sanei_lexmark_low_set_scan_regs()
3676 dev->shadow_regs[0x88] = 0x02; in sanei_lexmark_low_set_scan_regs()
3678 dev->shadow_regs[0x92] = 0x92; in sanei_lexmark_low_set_scan_regs()
3681 switch (dev->model.motor_type) in sanei_lexmark_low_set_scan_regs()
3685 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_set_scan_regs()
3686 dev->shadow_regs[0xc5] = 0x14; in sanei_lexmark_low_set_scan_regs()
3688 dev->shadow_regs[0xc6] = 0x0b; in sanei_lexmark_low_set_scan_regs()
3690 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_set_scan_regs()
3691 dev->shadow_regs[0xc9] = 0x39; in sanei_lexmark_low_set_scan_regs()
3692 dev->shadow_regs[0xca] = 0x01; in sanei_lexmark_low_set_scan_regs()
3695 dev->shadow_regs[0xe0] = 0x09; in sanei_lexmark_low_set_scan_regs()
3696 dev->shadow_regs[0xe1] = 0x18; in sanei_lexmark_low_set_scan_regs()
3698 dev->shadow_regs[0xe2] = 0xe9; in sanei_lexmark_low_set_scan_regs()
3700 dev->shadow_regs[0xe3] = 0x03; in sanei_lexmark_low_set_scan_regs()
3702 dev->shadow_regs[0xe4] = 0x79; in sanei_lexmark_low_set_scan_regs()
3704 dev->shadow_regs[0xe5] = 0x16; in sanei_lexmark_low_set_scan_regs()
3706 dev->shadow_regs[0xe6] = 0x64; in sanei_lexmark_low_set_scan_regs()
3708 dev->shadow_regs[0xe7] = 0xcd; in sanei_lexmark_low_set_scan_regs()
3709 dev->shadow_regs[0xe8] = 0x08; in sanei_lexmark_low_set_scan_regs()
3711 dev->shadow_regs[0xe9] = 0x32; in sanei_lexmark_low_set_scan_regs()
3713 dev->shadow_regs[0xea] = 0xe5; in sanei_lexmark_low_set_scan_regs()
3714 dev->shadow_regs[0xeb] = 0x04; in sanei_lexmark_low_set_scan_regs()
3716 dev->shadow_regs[0xec] = 0x0c; in sanei_lexmark_low_set_scan_regs()
3718 dev->shadow_regs[0xed] = 0x00; in sanei_lexmark_low_set_scan_regs()
3719 dev->shadow_regs[0xee] = 0x00; in sanei_lexmark_low_set_scan_regs()
3721 dev->shadow_regs[0xef] = 0x08; in sanei_lexmark_low_set_scan_regs()
3726 dev->shadow_regs[0xc5] = 0x16; in sanei_lexmark_low_set_scan_regs()
3728 dev->shadow_regs[0xc6] = 0x09; in sanei_lexmark_low_set_scan_regs()
3730 dev->shadow_regs[0xc9] = 0x3b; in sanei_lexmark_low_set_scan_regs()
3731 dev->shadow_regs[0xca] = 0x01; in sanei_lexmark_low_set_scan_regs()
3733 dev->shadow_regs[0xe0] = 0xdd; in sanei_lexmark_low_set_scan_regs()
3734 dev->shadow_regs[0xe1] = 0x18; in sanei_lexmark_low_set_scan_regs()
3736 dev->shadow_regs[0xe2] = 0x01; in sanei_lexmark_low_set_scan_regs()
3738 dev->shadow_regs[0xe3] = 0x03; in sanei_lexmark_low_set_scan_regs()
3740 dev->shadow_regs[0xe4] = 0x6d; in sanei_lexmark_low_set_scan_regs()
3741 dev->shadow_regs[0xe5] = 0x15; in sanei_lexmark_low_set_scan_regs()
3743 dev->shadow_regs[0xe6] = 0xdc; in sanei_lexmark_low_set_scan_regs()
3745 dev->shadow_regs[0xe7] = 0xad; in sanei_lexmark_low_set_scan_regs()
3746 dev->shadow_regs[0xe8] = 0x07; in sanei_lexmark_low_set_scan_regs()
3748 dev->shadow_regs[0xe9] = 0x1b; in sanei_lexmark_low_set_scan_regs()
3750 dev->shadow_regs[0xea] = 0xe1; in sanei_lexmark_low_set_scan_regs()
3751 dev->shadow_regs[0xeb] = 0x03; in sanei_lexmark_low_set_scan_regs()
3753 dev->shadow_regs[0xec] = 0x07; in sanei_lexmark_low_set_scan_regs()
3755 dev->shadow_regs[0xef] = 0x03; in sanei_lexmark_low_set_scan_regs()
3760 dev->shadow_regs[0x2f] = 0x21; in sanei_lexmark_low_set_scan_regs()
3762 dev->shadow_regs[0x39] = 0x07; in sanei_lexmark_low_set_scan_regs()
3764 dev->shadow_regs[0x80] = 0x00; in sanei_lexmark_low_set_scan_regs()
3765 dev->shadow_regs[0x81] = 0x00; in sanei_lexmark_low_set_scan_regs()
3766 dev->shadow_regs[0x82] = 0x00; in sanei_lexmark_low_set_scan_regs()
3769 dev->shadow_regs[0xc3] = 0x81; in sanei_lexmark_low_set_scan_regs()
3776 rts88xx_set_scan_frequency (dev->shadow_regs, 1); in sanei_lexmark_low_set_scan_regs()
3779 /* if (dev->model.sensor_type != X1200_SENSOR) in sanei_lexmark_low_set_scan_regs()
3780 dev->shadow_regs[0x79] = 0x20; */ in sanei_lexmark_low_set_scan_regs()
3792 switch (dev->model.sensor_type) in sanei_lexmark_low_set_scan_regs()
3795 dev->shadow_regs[0x34] = 0x08; in sanei_lexmark_low_set_scan_regs()
3796 dev->shadow_regs[0x36] = 0x06; in sanei_lexmark_low_set_scan_regs()
3797 dev->shadow_regs[0x38] = 0x05; in sanei_lexmark_low_set_scan_regs()
3798 dev->shadow_regs[0x39] = 0x07; in sanei_lexmark_low_set_scan_regs()
3800 dev->shadow_regs[0x80] = 0x08; in sanei_lexmark_low_set_scan_regs()
3801 dev->shadow_regs[0x81] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3802 dev->shadow_regs[0x82] = 0x03; in sanei_lexmark_low_set_scan_regs()
3804 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
3805 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
3806 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
3807 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
3809 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
3810 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
3811 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
3814 dev->shadow_regs[0x34] = 0x15; in sanei_lexmark_low_set_scan_regs()
3815 dev->shadow_regs[0x36] = 0x15; in sanei_lexmark_low_set_scan_regs()
3816 dev->shadow_regs[0x38] = 0x14; in sanei_lexmark_low_set_scan_regs()
3818 dev->shadow_regs[0x39] = 0x03; in sanei_lexmark_low_set_scan_regs()
3820 dev->shadow_regs[0x80] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3821 dev->shadow_regs[0x81] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3822 dev->shadow_regs[0x82] = 0x06; in sanei_lexmark_low_set_scan_regs()
3824 dev->shadow_regs[0x85] = 0x83; in sanei_lexmark_low_set_scan_regs()
3825 dev->shadow_regs[0x86] = 0x7e; in sanei_lexmark_low_set_scan_regs()
3826 dev->shadow_regs[0x87] = 0xad; in sanei_lexmark_low_set_scan_regs()
3827 dev->shadow_regs[0x88] = 0x35; in sanei_lexmark_low_set_scan_regs()
3829 dev->shadow_regs[0x91] = 0xfe; in sanei_lexmark_low_set_scan_regs()
3830 dev->shadow_regs[0x92] = 0xdf; in sanei_lexmark_low_set_scan_regs()
3831 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3834 dev->shadow_regs[0x34] = 0x08; in sanei_lexmark_low_set_scan_regs()
3835 dev->shadow_regs[0x36] = 0x0d; in sanei_lexmark_low_set_scan_regs()
3836 dev->shadow_regs[0x38] = 0x09; in sanei_lexmark_low_set_scan_regs()
3838 dev->shadow_regs[0x39] = 0x03; in sanei_lexmark_low_set_scan_regs()
3840 dev->shadow_regs[0x80] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3841 dev->shadow_regs[0x81] = 0x04; in sanei_lexmark_low_set_scan_regs()
3842 dev->shadow_regs[0x82] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3844 dev->shadow_regs[0x85] = 0x20; in sanei_lexmark_low_set_scan_regs()
3845 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
3846 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
3847 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
3849 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
3850 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
3851 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
3854 dev->shadow_regs[0x34] = 0x06; in sanei_lexmark_low_set_scan_regs()
3855 dev->shadow_regs[0x36] = 0x10; in sanei_lexmark_low_set_scan_regs()
3856 dev->shadow_regs[0x38] = 0x09; in sanei_lexmark_low_set_scan_regs()
3858 dev->shadow_regs[0x39] = 0x03; in sanei_lexmark_low_set_scan_regs()
3860 dev->shadow_regs[0x80] = 0x0c; in sanei_lexmark_low_set_scan_regs()
3861 dev->shadow_regs[0x81] = 0x02; in sanei_lexmark_low_set_scan_regs()
3862 dev->shadow_regs[0x82] = 0x04; in sanei_lexmark_low_set_scan_regs()
3864 dev->shadow_regs[0x85] = 0x05; in sanei_lexmark_low_set_scan_regs()
3865 dev->shadow_regs[0x86] = 0x14; in sanei_lexmark_low_set_scan_regs()
3866 dev->shadow_regs[0x87] = 0x06; in sanei_lexmark_low_set_scan_regs()
3867 dev->shadow_regs[0x88] = 0x04; in sanei_lexmark_low_set_scan_regs()
3869 dev->shadow_regs[0x91] = 0xe0; in sanei_lexmark_low_set_scan_regs()
3870 dev->shadow_regs[0x92] = 0x85; in sanei_lexmark_low_set_scan_regs()
3871 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3874 dev->shadow_regs[0x34] = 0x07; in sanei_lexmark_low_set_scan_regs()
3875 dev->shadow_regs[0x36] = 0x09; in sanei_lexmark_low_set_scan_regs()
3876 dev->shadow_regs[0x38] = 0x04; in sanei_lexmark_low_set_scan_regs()
3878 dev->shadow_regs[0x39] = 0x03; in sanei_lexmark_low_set_scan_regs()
3881 dev->shadow_regs[0x40] = 0x90; in sanei_lexmark_low_set_scan_regs()
3882 dev->shadow_regs[0x50] = 0x20; */ in sanei_lexmark_low_set_scan_regs()
3884 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_set_scan_regs()
3885 dev->shadow_regs[0x50] = 0x00; in sanei_lexmark_low_set_scan_regs()
3887 dev->shadow_regs[0x80] = 0x00; in sanei_lexmark_low_set_scan_regs()
3888 dev->shadow_regs[0x81] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3889 dev->shadow_regs[0x82] = 0x06; in sanei_lexmark_low_set_scan_regs()
3892 dev->shadow_regs[0x34] = 0x07; in sanei_lexmark_low_set_scan_regs()
3893 dev->shadow_regs[0x36] = 0x09; in sanei_lexmark_low_set_scan_regs()
3894 dev->shadow_regs[0x38] = 0x04; in sanei_lexmark_low_set_scan_regs()
3896 dev->shadow_regs[0x39] = 0x03; in sanei_lexmark_low_set_scan_regs()
3898 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_set_scan_regs()
3899 dev->shadow_regs[0x50] = 0x00; in sanei_lexmark_low_set_scan_regs()
3901 dev->shadow_regs[0x80] = 0x00; in sanei_lexmark_low_set_scan_regs()
3902 dev->shadow_regs[0x81] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3903 dev->shadow_regs[0x82] = 0x06; in sanei_lexmark_low_set_scan_regs()
3906 switch (dev->model.motor_type) in sanei_lexmark_low_set_scan_regs()
3910 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_set_scan_regs()
3911 dev->shadow_regs[0xc5] = 0x12; in sanei_lexmark_low_set_scan_regs()
3913 dev->shadow_regs[0xc6] = 0x09; in sanei_lexmark_low_set_scan_regs()
3915 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_set_scan_regs()
3916 dev->shadow_regs[0xc9] = 0x39; in sanei_lexmark_low_set_scan_regs()
3917 dev->shadow_regs[0xca] = 0x0f; in sanei_lexmark_low_set_scan_regs()
3920 dev->shadow_regs[0xe0] = 0x5d; in sanei_lexmark_low_set_scan_regs()
3921 dev->shadow_regs[0xe1] = 0x05; in sanei_lexmark_low_set_scan_regs()
3923 dev->shadow_regs[0xe2] = 0xed; in sanei_lexmark_low_set_scan_regs()
3925 dev->shadow_regs[0xe3] = 0x02; in sanei_lexmark_low_set_scan_regs()
3927 dev->shadow_regs[0xe4] = 0x29; in sanei_lexmark_low_set_scan_regs()
3928 dev->shadow_regs[0xe5] = 0x05; in sanei_lexmark_low_set_scan_regs()
3930 dev->shadow_regs[0xe6] = 0x0d; in sanei_lexmark_low_set_scan_regs()
3932 dev->shadow_regs[0xe7] = 0x00; in sanei_lexmark_low_set_scan_regs()
3933 dev->shadow_regs[0xe8] = 0x00; in sanei_lexmark_low_set_scan_regs()
3935 dev->shadow_regs[0xe9] = 0x05; in sanei_lexmark_low_set_scan_regs()
3937 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_set_scan_regs()
3938 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_set_scan_regs()
3940 dev->shadow_regs[0xec] = 0x01; in sanei_lexmark_low_set_scan_regs()
3942 dev->shadow_regs[0xed] = 0x00; in sanei_lexmark_low_set_scan_regs()
3943 dev->shadow_regs[0xee] = 0x00; in sanei_lexmark_low_set_scan_regs()
3945 dev->shadow_regs[0xef] = 0x01; in sanei_lexmark_low_set_scan_regs()
3950 dev->shadow_regs[0xc5] = 0x17; in sanei_lexmark_low_set_scan_regs()
3952 dev->shadow_regs[0xc6] = 0x09; in sanei_lexmark_low_set_scan_regs()
3954 dev->shadow_regs[0xc9] = 0x3a; in sanei_lexmark_low_set_scan_regs()
3955 dev->shadow_regs[0xca] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3957 dev->shadow_regs[0xe0] = 0x75; in sanei_lexmark_low_set_scan_regs()
3958 dev->shadow_regs[0xe1] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3960 dev->shadow_regs[0xe2] = 0xdd; in sanei_lexmark_low_set_scan_regs()
3962 dev->shadow_regs[0xe3] = 0x05; in sanei_lexmark_low_set_scan_regs()
3964 dev->shadow_regs[0xe4] = 0x59; in sanei_lexmark_low_set_scan_regs()
3965 dev->shadow_regs[0xe5] = 0x0a; in sanei_lexmark_low_set_scan_regs()
3967 dev->shadow_regs[0xe6] = 0x0e; in sanei_lexmark_low_set_scan_regs()
3969 dev->shadow_regs[0xe7] = 0x00; in sanei_lexmark_low_set_scan_regs()
3970 dev->shadow_regs[0xe8] = 0x00; in sanei_lexmark_low_set_scan_regs()
3972 dev->shadow_regs[0xe9] = 0x05; in sanei_lexmark_low_set_scan_regs()
3974 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_set_scan_regs()
3975 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_set_scan_regs()
3977 dev->shadow_regs[0xec] = 0x01; in sanei_lexmark_low_set_scan_regs()
3979 dev->shadow_regs[0xef] = 0x01; in sanei_lexmark_low_set_scan_regs()
3983 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_set_scan_regs()
3984 dev->shadow_regs[0x37] = 0x01; in sanei_lexmark_low_set_scan_regs()
3987 dev->shadow_regs[0x2f] = 0x11; in sanei_lexmark_low_set_scan_regs()
3990 dev->shadow_regs[0xc3] = 0x83; in sanei_lexmark_low_set_scan_regs()
3996 switch (dev->model.sensor_type) in sanei_lexmark_low_set_scan_regs()
3999 dev->shadow_regs[0x34] = 0x04; in sanei_lexmark_low_set_scan_regs()
4000 dev->shadow_regs[0x35] = 0x04; in sanei_lexmark_low_set_scan_regs()
4001 dev->shadow_regs[0x36] = 0x08; in sanei_lexmark_low_set_scan_regs()
4002 dev->shadow_regs[0x37] = 0x08; in sanei_lexmark_low_set_scan_regs()
4003 dev->shadow_regs[0x38] = 0x0c; in sanei_lexmark_low_set_scan_regs()
4005 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
4006 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
4007 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
4008 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
4010 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
4011 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
4012 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
4015 dev->shadow_regs[0x34] = 0x08; in sanei_lexmark_low_set_scan_regs()
4016 dev->shadow_regs[0x35] = 0x08; in sanei_lexmark_low_set_scan_regs()
4017 dev->shadow_regs[0x36] = 0x0f; in sanei_lexmark_low_set_scan_regs()
4018 dev->shadow_regs[0x37] = 0x0f; in sanei_lexmark_low_set_scan_regs()
4019 dev->shadow_regs[0x38] = 0x16; in sanei_lexmark_low_set_scan_regs()
4021 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
4022 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
4023 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
4024 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
4026 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
4027 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
4028 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
4031 dev->shadow_regs[0x34] = 0x04; in sanei_lexmark_low_set_scan_regs()
4032 dev->shadow_regs[0x35] = 0x04; in sanei_lexmark_low_set_scan_regs()
4033 dev->shadow_regs[0x36] = 0x07; in sanei_lexmark_low_set_scan_regs()
4034 dev->shadow_regs[0x37] = 0x07; in sanei_lexmark_low_set_scan_regs()
4035 dev->shadow_regs[0x38] = 0x0a; in sanei_lexmark_low_set_scan_regs()
4037 dev->shadow_regs[0x85] = 0x20; in sanei_lexmark_low_set_scan_regs()
4038 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
4039 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
4040 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
4042 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
4043 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
4044 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
4047 dev->shadow_regs[0x34] = 0x03; in sanei_lexmark_low_set_scan_regs()
4048 dev->shadow_regs[0x35] = 0x03; in sanei_lexmark_low_set_scan_regs()
4049 dev->shadow_regs[0x36] = 0x06; in sanei_lexmark_low_set_scan_regs()
4050 dev->shadow_regs[0x37] = 0x06; in sanei_lexmark_low_set_scan_regs()
4051 dev->shadow_regs[0x38] = 0x09; in sanei_lexmark_low_set_scan_regs()
4053 dev->shadow_regs[0x85] = 0x05; in sanei_lexmark_low_set_scan_regs()
4054 dev->shadow_regs[0x86] = 0x14; in sanei_lexmark_low_set_scan_regs()
4055 dev->shadow_regs[0x87] = 0x06; in sanei_lexmark_low_set_scan_regs()
4056 dev->shadow_regs[0x88] = 0x04; in sanei_lexmark_low_set_scan_regs()
4058 dev->shadow_regs[0x91] = 0xe0; in sanei_lexmark_low_set_scan_regs()
4059 dev->shadow_regs[0x92] = 0x85; in sanei_lexmark_low_set_scan_regs()
4060 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_set_scan_regs()
4063 dev->shadow_regs[0x34] = 0x02; in sanei_lexmark_low_set_scan_regs()
4064 dev->shadow_regs[0x35] = 0x02; in sanei_lexmark_low_set_scan_regs()
4065 dev->shadow_regs[0x36] = 0x04; in sanei_lexmark_low_set_scan_regs()
4066 dev->shadow_regs[0x37] = 0x04; in sanei_lexmark_low_set_scan_regs()
4067 dev->shadow_regs[0x38] = 0x06; in sanei_lexmark_low_set_scan_regs()
4070 dev->shadow_regs[0x34] = 0x02; in sanei_lexmark_low_set_scan_regs()
4071 dev->shadow_regs[0x35] = 0x02; in sanei_lexmark_low_set_scan_regs()
4072 dev->shadow_regs[0x36] = 0x04; in sanei_lexmark_low_set_scan_regs()
4073 dev->shadow_regs[0x37] = 0x04; in sanei_lexmark_low_set_scan_regs()
4074 dev->shadow_regs[0x38] = 0x06; in sanei_lexmark_low_set_scan_regs()
4077 switch (dev->model.motor_type) in sanei_lexmark_low_set_scan_regs()
4081 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_set_scan_regs()
4082 dev->shadow_regs[0xc5] = 0x1c; in sanei_lexmark_low_set_scan_regs()
4084 dev->shadow_regs[0xc6] = 0x0b; in sanei_lexmark_low_set_scan_regs()
4086 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_set_scan_regs()
4087 dev->shadow_regs[0xc9] = 0x39; in sanei_lexmark_low_set_scan_regs()
4088 dev->shadow_regs[0xca] = 0x05; in sanei_lexmark_low_set_scan_regs()
4091 dev->shadow_regs[0xe0] = 0x29; in sanei_lexmark_low_set_scan_regs()
4092 dev->shadow_regs[0xe1] = 0x17; in sanei_lexmark_low_set_scan_regs()
4094 dev->shadow_regs[0xe2] = 0x8f; in sanei_lexmark_low_set_scan_regs()
4096 dev->shadow_regs[0xe3] = 0x06; in sanei_lexmark_low_set_scan_regs()
4098 dev->shadow_regs[0xe4] = 0x61; in sanei_lexmark_low_set_scan_regs()
4100 dev->shadow_regs[0xe5] = 0x16; in sanei_lexmark_low_set_scan_regs()
4102 dev->shadow_regs[0xe6] = 0x64; in sanei_lexmark_low_set_scan_regs()
4104 dev->shadow_regs[0xe7] = 0xb5; in sanei_lexmark_low_set_scan_regs()
4105 dev->shadow_regs[0xe8] = 0x08; in sanei_lexmark_low_set_scan_regs()
4107 dev->shadow_regs[0xe9] = 0x32; in sanei_lexmark_low_set_scan_regs()
4109 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_set_scan_regs()
4110 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_set_scan_regs()
4112 dev->shadow_regs[0xec] = 0x0c; in sanei_lexmark_low_set_scan_regs()
4114 dev->shadow_regs[0xed] = 0x00; in sanei_lexmark_low_set_scan_regs()
4115 dev->shadow_regs[0xee] = 0x00; in sanei_lexmark_low_set_scan_regs()
4117 dev->shadow_regs[0xef] = 0x08; in sanei_lexmark_low_set_scan_regs()
4122 dev->shadow_regs[0xc5] = 0x19; in sanei_lexmark_low_set_scan_regs()
4124 dev->shadow_regs[0xc6] = 0x09; in sanei_lexmark_low_set_scan_regs()
4126 dev->shadow_regs[0xc9] = 0x3a; in sanei_lexmark_low_set_scan_regs()
4127 dev->shadow_regs[0xca] = 0x08; in sanei_lexmark_low_set_scan_regs()
4129 dev->shadow_regs[0xe0] = 0xe3; in sanei_lexmark_low_set_scan_regs()
4130 dev->shadow_regs[0xe1] = 0x18; in sanei_lexmark_low_set_scan_regs()
4132 dev->shadow_regs[0xe2] = 0x03; in sanei_lexmark_low_set_scan_regs()
4134 dev->shadow_regs[0xe3] = 0x06; in sanei_lexmark_low_set_scan_regs()
4136 dev->shadow_regs[0xe4] = 0x2b; in sanei_lexmark_low_set_scan_regs()
4137 dev->shadow_regs[0xe5] = 0x17; in sanei_lexmark_low_set_scan_regs()
4139 dev->shadow_regs[0xe6] = 0xdc; in sanei_lexmark_low_set_scan_regs()
4141 dev->shadow_regs[0xe7] = 0xb3; in sanei_lexmark_low_set_scan_regs()
4142 dev->shadow_regs[0xe8] = 0x07; in sanei_lexmark_low_set_scan_regs()
4144 dev->shadow_regs[0xe9] = 0x1b; in sanei_lexmark_low_set_scan_regs()
4146 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_set_scan_regs()
4147 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_set_scan_regs()
4149 dev->shadow_regs[0xec] = 0x07; in sanei_lexmark_low_set_scan_regs()
4151 dev->shadow_regs[0xef] = 0x03; in sanei_lexmark_low_set_scan_regs()
4155 dev->shadow_regs[0x2f] = 0x21; in sanei_lexmark_low_set_scan_regs()
4157 dev->shadow_regs[0x39] = 0x03; in sanei_lexmark_low_set_scan_regs()
4160 dev->shadow_regs[0x80] = 0x00; in sanei_lexmark_low_set_scan_regs()
4161 dev->shadow_regs[0x81] = 0x00; in sanei_lexmark_low_set_scan_regs()
4162 dev->shadow_regs[0x82] = 0x00; in sanei_lexmark_low_set_scan_regs()
4164 dev->shadow_regs[0xc3] = 0x81; in sanei_lexmark_low_set_scan_regs()
4170 rts88xx_set_scan_frequency (dev->shadow_regs, 1); in sanei_lexmark_low_set_scan_regs()
4172 dev->shadow_regs[0x79] = 0x20; in sanei_lexmark_low_set_scan_regs()
4185 if (dev->model.sensor_type == X74_SENSOR) in sanei_lexmark_low_set_scan_regs()
4188 switch (dev->model.sensor_type) in sanei_lexmark_low_set_scan_regs()
4191 dev->shadow_regs[0x34] = 0x10; in sanei_lexmark_low_set_scan_regs()
4192 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_set_scan_regs()
4193 dev->shadow_regs[0x36] = 0x0c; in sanei_lexmark_low_set_scan_regs()
4194 dev->shadow_regs[0x37] = 0x01; in sanei_lexmark_low_set_scan_regs()
4195 dev->shadow_regs[0x38] = 0x09; in sanei_lexmark_low_set_scan_regs()
4197 dev->shadow_regs[0x80] = 0x02; in sanei_lexmark_low_set_scan_regs()
4198 dev->shadow_regs[0x81] = 0x08; in sanei_lexmark_low_set_scan_regs()
4199 dev->shadow_regs[0x82] = 0x08; in sanei_lexmark_low_set_scan_regs()
4202 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
4203 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
4204 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
4205 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
4207 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
4208 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
4209 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
4212 /*dev->shadow_regs[0x34] = 0x08; in sanei_lexmark_low_set_scan_regs()
4213 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_set_scan_regs()
4214 dev->shadow_regs[0x36] = 0x06; in sanei_lexmark_low_set_scan_regs()
4215 dev->shadow_regs[0x37] = 0x01; in sanei_lexmark_low_set_scan_regs()
4216 dev->shadow_regs[0x38] = 0x05; in sanei_lexmark_low_set_scan_regs()
4219 dev->shadow_regs[0x80] = 0x09; in sanei_lexmark_low_set_scan_regs()
4220 dev->shadow_regs[0x81] = 0x0c; in sanei_lexmark_low_set_scan_regs()
4221 dev->shadow_regs[0x82] = 0x04; in sanei_lexmark_low_set_scan_regs()
4224 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
4225 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
4226 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
4227 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
4229 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
4230 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
4231 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
4237 dev->shadow_regs[0x34] = 0x15; in sanei_lexmark_low_set_scan_regs()
4238 dev->shadow_regs[0x36] = 0x15; in sanei_lexmark_low_set_scan_regs()
4239 dev->shadow_regs[0x38] = 0x14; in sanei_lexmark_low_set_scan_regs()
4241 dev->shadow_regs[0x80] = 0x02; in sanei_lexmark_low_set_scan_regs()
4242 dev->shadow_regs[0x81] = 0x02; in sanei_lexmark_low_set_scan_regs()
4243 dev->shadow_regs[0x82] = 0x08; in sanei_lexmark_low_set_scan_regs()
4245 dev->shadow_regs[0x85] = 0x83; in sanei_lexmark_low_set_scan_regs()
4246 dev->shadow_regs[0x86] = 0x7e; in sanei_lexmark_low_set_scan_regs()
4247 dev->shadow_regs[0x87] = 0xad; in sanei_lexmark_low_set_scan_regs()
4248 dev->shadow_regs[0x88] = 0x35; in sanei_lexmark_low_set_scan_regs()
4250 dev->shadow_regs[0x91] = 0xfe; in sanei_lexmark_low_set_scan_regs()
4251 dev->shadow_regs[0x92] = 0xdf; in sanei_lexmark_low_set_scan_regs()
4252 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_set_scan_regs()
4255 dev->shadow_regs[0x34] = 0x08; in sanei_lexmark_low_set_scan_regs()
4256 dev->shadow_regs[0x36] = 0x0d; in sanei_lexmark_low_set_scan_regs()
4257 dev->shadow_regs[0x38] = 0x09; in sanei_lexmark_low_set_scan_regs()
4259 dev->shadow_regs[0x80] = 0x0e; in sanei_lexmark_low_set_scan_regs()
4260 dev->shadow_regs[0x81] = 0x02; in sanei_lexmark_low_set_scan_regs()
4261 dev->shadow_regs[0x82] = 0x0a; in sanei_lexmark_low_set_scan_regs()
4263 dev->shadow_regs[0x85] = 0x20; in sanei_lexmark_low_set_scan_regs()
4264 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
4265 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
4266 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
4268 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
4269 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
4270 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
4273 dev->shadow_regs[0x34] = 0x06; in sanei_lexmark_low_set_scan_regs()
4274 dev->shadow_regs[0x36] = 0x0f; in sanei_lexmark_low_set_scan_regs()
4275 dev->shadow_regs[0x38] = 0x09; in sanei_lexmark_low_set_scan_regs()
4277 dev->shadow_regs[0x79] = 0x40; in sanei_lexmark_low_set_scan_regs()
4279 dev->shadow_regs[0x80] = 0x0e; in sanei_lexmark_low_set_scan_regs()
4280 dev->shadow_regs[0x81] = 0x0e; in sanei_lexmark_low_set_scan_regs()
4281 dev->shadow_regs[0x82] = 0x00; in sanei_lexmark_low_set_scan_regs()
4283 dev->shadow_regs[0x85] = 0x05; in sanei_lexmark_low_set_scan_regs()
4284 dev->shadow_regs[0x86] = 0x14; in sanei_lexmark_low_set_scan_regs()
4285 dev->shadow_regs[0x87] = 0x06; in sanei_lexmark_low_set_scan_regs()
4286 dev->shadow_regs[0x88] = 0x04; in sanei_lexmark_low_set_scan_regs()
4288 dev->shadow_regs[0x91] = 0x60; in sanei_lexmark_low_set_scan_regs()
4289 dev->shadow_regs[0x92] = 0x85; in sanei_lexmark_low_set_scan_regs()
4290 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_set_scan_regs()
4293 dev->shadow_regs[0x34] = 0x07; in sanei_lexmark_low_set_scan_regs()
4294 dev->shadow_regs[0x36] = 0x0a; in sanei_lexmark_low_set_scan_regs()
4295 dev->shadow_regs[0x38] = 0x04; in sanei_lexmark_low_set_scan_regs()
4298 dev->shadow_regs[0x40] = 0x90; in sanei_lexmark_low_set_scan_regs()
4299 dev->shadow_regs[0x50] = 0x20; */ in sanei_lexmark_low_set_scan_regs()
4302 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_set_scan_regs()
4303 dev->shadow_regs[0x50] = 0x00; in sanei_lexmark_low_set_scan_regs()
4305 dev->shadow_regs[0x80] = 0x02; in sanei_lexmark_low_set_scan_regs()
4306 dev->shadow_regs[0x81] = 0x00; in sanei_lexmark_low_set_scan_regs()
4307 dev->shadow_regs[0x82] = 0x06; in sanei_lexmark_low_set_scan_regs()
4310 dev->shadow_regs[0x34] = 0x0d; in sanei_lexmark_low_set_scan_regs()
4311 dev->shadow_regs[0x36] = 0x13; in sanei_lexmark_low_set_scan_regs()
4312 dev->shadow_regs[0x38] = 0x10; in sanei_lexmark_low_set_scan_regs()
4314 dev->shadow_regs[0x80] = 0x04; in sanei_lexmark_low_set_scan_regs()
4315 dev->shadow_regs[0x81] = 0x0e; in sanei_lexmark_low_set_scan_regs()
4316 dev->shadow_regs[0x82] = 0x08; in sanei_lexmark_low_set_scan_regs()
4318 dev->shadow_regs[0x85] = 0x02; in sanei_lexmark_low_set_scan_regs()
4319 dev->shadow_regs[0x86] = 0x3b; in sanei_lexmark_low_set_scan_regs()
4320 dev->shadow_regs[0x87] = 0x0f; in sanei_lexmark_low_set_scan_regs()
4321 dev->shadow_regs[0x88] = 0x24; in sanei_lexmark_low_set_scan_regs()
4323 dev->shadow_regs[0x91] = 0x19; in sanei_lexmark_low_set_scan_regs()
4324 dev->shadow_regs[0x92] = 0x30; in sanei_lexmark_low_set_scan_regs()
4325 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_set_scan_regs()
4326 dev->shadow_regs[0xc5] = 0x17; in sanei_lexmark_low_set_scan_regs()
4327 dev->shadow_regs[0xc6] = 0x09; in sanei_lexmark_low_set_scan_regs()
4328 dev->shadow_regs[0xca] = 0x0a; in sanei_lexmark_low_set_scan_regs()
4331 switch (dev->model.motor_type) in sanei_lexmark_low_set_scan_regs()
4335 dev->shadow_regs[0xc3] = 0x81; in sanei_lexmark_low_set_scan_regs()
4337 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_set_scan_regs()
4338 dev->shadow_regs[0xc5] = 0x21; in sanei_lexmark_low_set_scan_regs()
4340 dev->shadow_regs[0xc6] = 0x09; in sanei_lexmark_low_set_scan_regs()
4341 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_set_scan_regs()
4342 dev->shadow_regs[0xc9] = 0x39; in sanei_lexmark_low_set_scan_regs()
4343 dev->shadow_regs[0xca] = 0x20; in sanei_lexmark_low_set_scan_regs()
4345 dev->shadow_regs[0xe0] = 0x00; in sanei_lexmark_low_set_scan_regs()
4346 dev->shadow_regs[0xe1] = 0x00; in sanei_lexmark_low_set_scan_regs()
4348 dev->shadow_regs[0xe2] = 0xbf; in sanei_lexmark_low_set_scan_regs()
4350 dev->shadow_regs[0xe3] = 0x05; in sanei_lexmark_low_set_scan_regs()
4352 dev->shadow_regs[0xe4] = 0x00; in sanei_lexmark_low_set_scan_regs()
4353 dev->shadow_regs[0xe5] = 0x00; in sanei_lexmark_low_set_scan_regs()
4355 dev->shadow_regs[0xe6] = 0x0d; in sanei_lexmark_low_set_scan_regs()
4357 dev->shadow_regs[0xe7] = 0x00; in sanei_lexmark_low_set_scan_regs()
4358 dev->shadow_regs[0xe8] = 0x00; in sanei_lexmark_low_set_scan_regs()
4360 dev->shadow_regs[0xe9] = 0x05; in sanei_lexmark_low_set_scan_regs()
4362 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_set_scan_regs()
4363 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_set_scan_regs()
4365 dev->shadow_regs[0xec] = 0x01; in sanei_lexmark_low_set_scan_regs()
4367 dev->shadow_regs[0xed] = 0x00; in sanei_lexmark_low_set_scan_regs()
4368 dev->shadow_regs[0xee] = 0x00; in sanei_lexmark_low_set_scan_regs()
4370 dev->shadow_regs[0xef] = 0x01; in sanei_lexmark_low_set_scan_regs()
4375 dev->shadow_regs[0xc3] = 0x86; in sanei_lexmark_low_set_scan_regs()
4377 dev->shadow_regs[0xc5] = 0x27; in sanei_lexmark_low_set_scan_regs()
4379 dev->shadow_regs[0xc6] = 0x0c; in sanei_lexmark_low_set_scan_regs()
4381 dev->shadow_regs[0xc9] = 0x3a; in sanei_lexmark_low_set_scan_regs()
4382 dev->shadow_regs[0xca] = 0x1a; in sanei_lexmark_low_set_scan_regs()
4384 dev->shadow_regs[0xe0] = 0x57; in sanei_lexmark_low_set_scan_regs()
4385 dev->shadow_regs[0xe1] = 0x0a; in sanei_lexmark_low_set_scan_regs()
4387 dev->shadow_regs[0xe2] = 0xbf; in sanei_lexmark_low_set_scan_regs()
4389 dev->shadow_regs[0xe3] = 0x05; in sanei_lexmark_low_set_scan_regs()
4391 dev->shadow_regs[0xe4] = 0x3b; in sanei_lexmark_low_set_scan_regs()
4392 dev->shadow_regs[0xe5] = 0x0a; in sanei_lexmark_low_set_scan_regs()
4394 dev->shadow_regs[0xe6] = 0x0e; in sanei_lexmark_low_set_scan_regs()
4396 dev->shadow_regs[0xe7] = 0x00; in sanei_lexmark_low_set_scan_regs()
4397 dev->shadow_regs[0xe8] = 0x00; in sanei_lexmark_low_set_scan_regs()
4399 dev->shadow_regs[0xe9] = 0x05; in sanei_lexmark_low_set_scan_regs()
4401 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_set_scan_regs()
4402 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_set_scan_regs()
4404 dev->shadow_regs[0xec] = 0x01; in sanei_lexmark_low_set_scan_regs()
4406 dev->shadow_regs[0xef] = 0x01; in sanei_lexmark_low_set_scan_regs()
4410 dev->shadow_regs[0x2f] = 0x11; in sanei_lexmark_low_set_scan_regs()
4412 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_set_scan_regs()
4413 dev->shadow_regs[0x37] = 0x01; in sanei_lexmark_low_set_scan_regs()
4416 dev->shadow_regs[0x39] = 0x03; in sanei_lexmark_low_set_scan_regs()
4418 rts88xx_set_scan_frequency (dev->shadow_regs, 2); in sanei_lexmark_low_set_scan_regs()
4424 switch (dev->model.sensor_type) in sanei_lexmark_low_set_scan_regs()
4427 dev->shadow_regs[0x2c] = 0x04; in sanei_lexmark_low_set_scan_regs()
4428 dev->shadow_regs[0x2d] = 0x46; in sanei_lexmark_low_set_scan_regs()
4429 dev->shadow_regs[0x34] = 0x05; in sanei_lexmark_low_set_scan_regs()
4430 dev->shadow_regs[0x35] = 0x05; in sanei_lexmark_low_set_scan_regs()
4431 dev->shadow_regs[0x36] = 0x0b; in sanei_lexmark_low_set_scan_regs()
4432 dev->shadow_regs[0x37] = 0x0b; in sanei_lexmark_low_set_scan_regs()
4433 dev->shadow_regs[0x38] = 0x11; in sanei_lexmark_low_set_scan_regs()
4434 dev->shadow_regs[0x40] = 0x40; in sanei_lexmark_low_set_scan_regs()
4436 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
4437 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
4438 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
4439 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
4441 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
4442 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
4443 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
4446 dev->shadow_regs[0x34] = 0x11; in sanei_lexmark_low_set_scan_regs()
4447 dev->shadow_regs[0x35] = 0x11; in sanei_lexmark_low_set_scan_regs()
4448 dev->shadow_regs[0x36] = 0x21; in sanei_lexmark_low_set_scan_regs()
4449 dev->shadow_regs[0x37] = 0x21; in sanei_lexmark_low_set_scan_regs()
4450 dev->shadow_regs[0x38] = 0x31; in sanei_lexmark_low_set_scan_regs()
4452 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
4453 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
4454 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
4455 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
4457 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
4458 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
4459 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
4462 dev->shadow_regs[0x34] = 0x07; in sanei_lexmark_low_set_scan_regs()
4463 dev->shadow_regs[0x35] = 0x07; in sanei_lexmark_low_set_scan_regs()
4464 dev->shadow_regs[0x36] = 0x0d; in sanei_lexmark_low_set_scan_regs()
4465 dev->shadow_regs[0x37] = 0x0d; in sanei_lexmark_low_set_scan_regs()
4466 dev->shadow_regs[0x38] = 0x13; in sanei_lexmark_low_set_scan_regs()
4468 dev->shadow_regs[0x85] = 0x20; in sanei_lexmark_low_set_scan_regs()
4469 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
4470 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
4471 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
4473 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
4474 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
4475 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
4478 dev->shadow_regs[0x34] = 0x05; in sanei_lexmark_low_set_scan_regs()
4479 dev->shadow_regs[0x35] = 0x05; in sanei_lexmark_low_set_scan_regs()
4480 dev->shadow_regs[0x36] = 0x0b; in sanei_lexmark_low_set_scan_regs()
4481 dev->shadow_regs[0x37] = 0x0b; in sanei_lexmark_low_set_scan_regs()
4482 dev->shadow_regs[0x38] = 0x11; in sanei_lexmark_low_set_scan_regs()
4484 dev->shadow_regs[0x85] = 0x05; in sanei_lexmark_low_set_scan_regs()
4485 dev->shadow_regs[0x86] = 0x14; in sanei_lexmark_low_set_scan_regs()
4486 dev->shadow_regs[0x87] = 0x06; in sanei_lexmark_low_set_scan_regs()
4487 dev->shadow_regs[0x88] = 0x04; in sanei_lexmark_low_set_scan_regs()
4489 dev->shadow_regs[0x91] = 0xe0; in sanei_lexmark_low_set_scan_regs()
4490 dev->shadow_regs[0x92] = 0x85; in sanei_lexmark_low_set_scan_regs()
4491 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_set_scan_regs()
4494 dev->shadow_regs[0x34] = 0x03; in sanei_lexmark_low_set_scan_regs()
4495 dev->shadow_regs[0x35] = 0x03; in sanei_lexmark_low_set_scan_regs()
4496 dev->shadow_regs[0x36] = 0x07; in sanei_lexmark_low_set_scan_regs()
4497 dev->shadow_regs[0x37] = 0x07; in sanei_lexmark_low_set_scan_regs()
4498 dev->shadow_regs[0x38] = 0x0b; in sanei_lexmark_low_set_scan_regs()
4501 dev->shadow_regs[0x40] = 0x90; in sanei_lexmark_low_set_scan_regs()
4502 dev->shadow_regs[0x50] = 0x20; */ in sanei_lexmark_low_set_scan_regs()
4504 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_set_scan_regs()
4505 dev->shadow_regs[0x50] = 0x00; in sanei_lexmark_low_set_scan_regs()
4507 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
4508 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
4509 dev->shadow_regs[0x87] = 0xff; in sanei_lexmark_low_set_scan_regs()
4510 dev->shadow_regs[0x88] = 0x02; in sanei_lexmark_low_set_scan_regs()
4512 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
4516 dev->shadow_regs[0x34] = 0x03; in sanei_lexmark_low_set_scan_regs()
4517 dev->shadow_regs[0x35] = 0x03; in sanei_lexmark_low_set_scan_regs()
4518 dev->shadow_regs[0x36] = 0x07; in sanei_lexmark_low_set_scan_regs()
4519 dev->shadow_regs[0x37] = 0x07; in sanei_lexmark_low_set_scan_regs()
4520 dev->shadow_regs[0x38] = 0x0b; in sanei_lexmark_low_set_scan_regs()
4522 dev->shadow_regs[0x40] = 0x80; in sanei_lexmark_low_set_scan_regs()
4523 dev->shadow_regs[0x50] = 0x00; in sanei_lexmark_low_set_scan_regs()
4525 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
4526 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
4527 dev->shadow_regs[0x87] = 0xff; in sanei_lexmark_low_set_scan_regs()
4528 dev->shadow_regs[0x88] = 0x02; in sanei_lexmark_low_set_scan_regs()
4530 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
4533 switch (dev->model.motor_type) in sanei_lexmark_low_set_scan_regs()
4537 rts88xx_set_scan_frequency (dev->shadow_regs, 1); in sanei_lexmark_low_set_scan_regs()
4539 dev->shadow_regs[0xc4] = 0x20; in sanei_lexmark_low_set_scan_regs()
4540 dev->shadow_regs[0xc5] = 0x22; in sanei_lexmark_low_set_scan_regs()
4542 dev->shadow_regs[0xc6] = 0x0b; in sanei_lexmark_low_set_scan_regs()
4544 dev->shadow_regs[0xc8] = 0x04; in sanei_lexmark_low_set_scan_regs()
4545 dev->shadow_regs[0xc9] = 0x39; in sanei_lexmark_low_set_scan_regs()
4546 dev->shadow_regs[0xca] = 0x1f; in sanei_lexmark_low_set_scan_regs()
4549 dev->shadow_regs[0xe0] = 0x2f; in sanei_lexmark_low_set_scan_regs()
4550 dev->shadow_regs[0xe1] = 0x11; in sanei_lexmark_low_set_scan_regs()
4552 dev->shadow_regs[0xe2] = 0x9f; in sanei_lexmark_low_set_scan_regs()
4554 dev->shadow_regs[0xe3] = 0x0f; in sanei_lexmark_low_set_scan_regs()
4556 dev->shadow_regs[0xe4] = 0xcb; in sanei_lexmark_low_set_scan_regs()
4558 dev->shadow_regs[0xe5] = 0x10; in sanei_lexmark_low_set_scan_regs()
4560 dev->shadow_regs[0xe6] = 0x64; in sanei_lexmark_low_set_scan_regs()
4562 dev->shadow_regs[0xe7] = 0x00; in sanei_lexmark_low_set_scan_regs()
4563 dev->shadow_regs[0xe8] = 0x00; in sanei_lexmark_low_set_scan_regs()
4565 dev->shadow_regs[0xe9] = 0x32; in sanei_lexmark_low_set_scan_regs()
4567 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_set_scan_regs()
4568 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_set_scan_regs()
4570 dev->shadow_regs[0xec] = 0x0c; in sanei_lexmark_low_set_scan_regs()
4572 dev->shadow_regs[0xed] = 0x00; in sanei_lexmark_low_set_scan_regs()
4573 dev->shadow_regs[0xee] = 0x00; in sanei_lexmark_low_set_scan_regs()
4575 dev->shadow_regs[0xef] = 0x08; in sanei_lexmark_low_set_scan_regs()
4580 dev->shadow_regs[0x80] = 0x00; in sanei_lexmark_low_set_scan_regs()
4581 dev->shadow_regs[0x81] = 0x00; in sanei_lexmark_low_set_scan_regs()
4582 dev->shadow_regs[0x82] = 0x00; in sanei_lexmark_low_set_scan_regs()
4584 dev->shadow_regs[0xc5] = 0x22; in sanei_lexmark_low_set_scan_regs()
4586 dev->shadow_regs[0xc6] = 0x09; in sanei_lexmark_low_set_scan_regs()
4588 dev->shadow_regs[0xc9] = 0x3b; in sanei_lexmark_low_set_scan_regs()
4589 dev->shadow_regs[0xca] = 0x1f; in sanei_lexmark_low_set_scan_regs()
4591 dev->shadow_regs[0xe0] = 0xf7; in sanei_lexmark_low_set_scan_regs()
4592 dev->shadow_regs[0xe1] = 0x16; in sanei_lexmark_low_set_scan_regs()
4594 dev->shadow_regs[0xe2] = 0x87; in sanei_lexmark_low_set_scan_regs()
4596 dev->shadow_regs[0xe3] = 0x13; in sanei_lexmark_low_set_scan_regs()
4598 dev->shadow_regs[0xe4] = 0x1b; in sanei_lexmark_low_set_scan_regs()
4599 dev->shadow_regs[0xe5] = 0x16; in sanei_lexmark_low_set_scan_regs()
4601 dev->shadow_regs[0xe6] = 0xdc; in sanei_lexmark_low_set_scan_regs()
4603 dev->shadow_regs[0xe7] = 0x00; in sanei_lexmark_low_set_scan_regs()
4604 dev->shadow_regs[0xe8] = 0x00; in sanei_lexmark_low_set_scan_regs()
4606 dev->shadow_regs[0xe9] = 0x1b; in sanei_lexmark_low_set_scan_regs()
4608 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_set_scan_regs()
4609 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_set_scan_regs()
4611 dev->shadow_regs[0xec] = 0x07; in sanei_lexmark_low_set_scan_regs()
4613 dev->shadow_regs[0xef] = 0x03; in sanei_lexmark_low_set_scan_regs()
4618 dev->shadow_regs[0x2f] = 0x21; in sanei_lexmark_low_set_scan_regs()
4621 dev->shadow_regs[0x39] = 0x01; in sanei_lexmark_low_set_scan_regs()
4624 rts88xx_set_scan_frequency (dev->shadow_regs, 1); in sanei_lexmark_low_set_scan_regs()
4627 dev->shadow_regs[0xc3] = 0x81; in sanei_lexmark_low_set_scan_regs()
4631 dev->shadow_regs[0x79] = 0x40; in sanei_lexmark_low_set_scan_regs()
4640 if (dev->model.sensor_type == X74_SENSOR) in sanei_lexmark_low_set_scan_regs()
4646 dev->shadow_regs[0x2f] = 0x11; in sanei_lexmark_low_set_scan_regs()
4648 dev->shadow_regs[0x39] = 0x01; in sanei_lexmark_low_set_scan_regs()
4650 rts88xx_set_scan_frequency (dev->shadow_regs, 2); in sanei_lexmark_low_set_scan_regs()
4652 if (dev->model.sensor_type == X1100_B2_SENSOR) in sanei_lexmark_low_set_scan_regs()
4655 dev->shadow_regs[0x34] = 0x29; in sanei_lexmark_low_set_scan_regs()
4656 dev->shadow_regs[0x36] = 0x29; in sanei_lexmark_low_set_scan_regs()
4657 dev->shadow_regs[0x38] = 0x28; in sanei_lexmark_low_set_scan_regs()
4659 dev->shadow_regs[0x80] = 0x04; in sanei_lexmark_low_set_scan_regs()
4660 dev->shadow_regs[0x81] = 0x04; in sanei_lexmark_low_set_scan_regs()
4661 dev->shadow_regs[0x82] = 0x08; in sanei_lexmark_low_set_scan_regs()
4662 dev->shadow_regs[0x85] = 0x83; in sanei_lexmark_low_set_scan_regs()
4663 dev->shadow_regs[0x86] = 0x7e; in sanei_lexmark_low_set_scan_regs()
4664 dev->shadow_regs[0x87] = 0xad; in sanei_lexmark_low_set_scan_regs()
4665 dev->shadow_regs[0x88] = 0x35; in sanei_lexmark_low_set_scan_regs()
4666 dev->shadow_regs[0x91] = 0xfe; in sanei_lexmark_low_set_scan_regs()
4667 dev->shadow_regs[0x92] = 0xdf; in sanei_lexmark_low_set_scan_regs()
4671 dev->shadow_regs[0x34] = 0x0c; in sanei_lexmark_low_set_scan_regs()
4672 dev->shadow_regs[0x36] = 0x1e; in sanei_lexmark_low_set_scan_regs()
4673 dev->shadow_regs[0x38] = 0x10; in sanei_lexmark_low_set_scan_regs()
4675 dev->shadow_regs[0x80] = 0x0c; in sanei_lexmark_low_set_scan_regs()
4676 dev->shadow_regs[0x81] = 0x08; in sanei_lexmark_low_set_scan_regs()
4677 dev->shadow_regs[0x82] = 0x0c; in sanei_lexmark_low_set_scan_regs()
4679 dev->shadow_regs[0x85] = 0x05; in sanei_lexmark_low_set_scan_regs()
4680 dev->shadow_regs[0x86] = 0x14; in sanei_lexmark_low_set_scan_regs()
4681 dev->shadow_regs[0x87] = 0x06; in sanei_lexmark_low_set_scan_regs()
4682 dev->shadow_regs[0x88] = 0x04; in sanei_lexmark_low_set_scan_regs()
4684 dev->shadow_regs[0x91] = 0x60; in sanei_lexmark_low_set_scan_regs()
4685 dev->shadow_regs[0x92] = 0x85; in sanei_lexmark_low_set_scan_regs()
4688 dev->shadow_regs[0x35] = 0x01; in sanei_lexmark_low_set_scan_regs()
4689 dev->shadow_regs[0x37] = 0x01; in sanei_lexmark_low_set_scan_regs()
4691 dev->shadow_regs[0x39] = 0x01; in sanei_lexmark_low_set_scan_regs()
4692 dev->shadow_regs[0x93] = 0x0e; in sanei_lexmark_low_set_scan_regs()
4695 dev->shadow_regs[0xc3] = 0x86; in sanei_lexmark_low_set_scan_regs()
4697 dev->shadow_regs[0xc5] = 0x41; in sanei_lexmark_low_set_scan_regs()
4699 dev->shadow_regs[0xc6] = 0x0c; in sanei_lexmark_low_set_scan_regs()
4701 dev->shadow_regs[0xc9] = 0x3a; in sanei_lexmark_low_set_scan_regs()
4702 dev->shadow_regs[0xca] = 0x40; in sanei_lexmark_low_set_scan_regs()
4704 dev->shadow_regs[0xe0] = 0x00; in sanei_lexmark_low_set_scan_regs()
4705 dev->shadow_regs[0xe1] = 0x00; in sanei_lexmark_low_set_scan_regs()
4707 dev->shadow_regs[0xe2] = 0x85; in sanei_lexmark_low_set_scan_regs()
4709 dev->shadow_regs[0xe3] = 0x0b; in sanei_lexmark_low_set_scan_regs()
4711 dev->shadow_regs[0xe4] = 0x00; in sanei_lexmark_low_set_scan_regs()
4712 dev->shadow_regs[0xe5] = 0x00; in sanei_lexmark_low_set_scan_regs()
4714 dev->shadow_regs[0xe6] = 0x0e; in sanei_lexmark_low_set_scan_regs()
4716 dev->shadow_regs[0xe7] = 0x00; in sanei_lexmark_low_set_scan_regs()
4717 dev->shadow_regs[0xe8] = 0x00; in sanei_lexmark_low_set_scan_regs()
4719 dev->shadow_regs[0xe9] = 0x05; in sanei_lexmark_low_set_scan_regs()
4721 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_set_scan_regs()
4722 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_set_scan_regs()
4724 dev->shadow_regs[0xec] = 0x01; in sanei_lexmark_low_set_scan_regs()
4726 dev->shadow_regs[0xef] = 0x01; in sanei_lexmark_low_set_scan_regs()
4731 dev->shadow_regs[0x2f] = 0x21; in sanei_lexmark_low_set_scan_regs()
4733 dev->shadow_regs[0x34] = 0x22; in sanei_lexmark_low_set_scan_regs()
4734 dev->shadow_regs[0x35] = 0x22; in sanei_lexmark_low_set_scan_regs()
4735 dev->shadow_regs[0x36] = 0x42; in sanei_lexmark_low_set_scan_regs()
4736 dev->shadow_regs[0x37] = 0x42; in sanei_lexmark_low_set_scan_regs()
4737 dev->shadow_regs[0x38] = 0x62; in sanei_lexmark_low_set_scan_regs()
4739 dev->shadow_regs[0x39] = 0x01; in sanei_lexmark_low_set_scan_regs()
4741 rts88xx_set_scan_frequency (dev->shadow_regs, 0); in sanei_lexmark_low_set_scan_regs()
4744 dev->shadow_regs[0x80] = 0x00; in sanei_lexmark_low_set_scan_regs()
4745 dev->shadow_regs[0x81] = 0x00; in sanei_lexmark_low_set_scan_regs()
4746 dev->shadow_regs[0x82] = 0x00; in sanei_lexmark_low_set_scan_regs()
4747 dev->shadow_regs[0x85] = 0x00; in sanei_lexmark_low_set_scan_regs()
4748 dev->shadow_regs[0x86] = 0x00; in sanei_lexmark_low_set_scan_regs()
4749 dev->shadow_regs[0x87] = 0x00; in sanei_lexmark_low_set_scan_regs()
4750 dev->shadow_regs[0x88] = 0x00; in sanei_lexmark_low_set_scan_regs()
4751 dev->shadow_regs[0x91] = 0x00; in sanei_lexmark_low_set_scan_regs()
4752 dev->shadow_regs[0x92] = 0x00; in sanei_lexmark_low_set_scan_regs()
4753 dev->shadow_regs[0x93] = 0x06; in sanei_lexmark_low_set_scan_regs()
4755 dev->shadow_regs[0xc3] = 0x81; in sanei_lexmark_low_set_scan_regs()
4757 dev->shadow_regs[0xc5] = 0x41; in sanei_lexmark_low_set_scan_regs()
4759 dev->shadow_regs[0xc6] = 0x09; in sanei_lexmark_low_set_scan_regs()
4761 dev->shadow_regs[0xc9] = 0x3a; in sanei_lexmark_low_set_scan_regs()
4762 dev->shadow_regs[0xca] = 0x40; in sanei_lexmark_low_set_scan_regs()
4764 dev->shadow_regs[0xe0] = 0x00; in sanei_lexmark_low_set_scan_regs()
4765 dev->shadow_regs[0xe1] = 0x00; in sanei_lexmark_low_set_scan_regs()
4767 dev->shadow_regs[0xe2] = 0xc7; in sanei_lexmark_low_set_scan_regs()
4769 dev->shadow_regs[0xe3] = 0x29; in sanei_lexmark_low_set_scan_regs()
4771 dev->shadow_regs[0xe4] = 0x00; in sanei_lexmark_low_set_scan_regs()
4772 dev->shadow_regs[0xe5] = 0x00; in sanei_lexmark_low_set_scan_regs()
4774 dev->shadow_regs[0xe6] = 0xdc; in sanei_lexmark_low_set_scan_regs()
4776 dev->shadow_regs[0xe7] = 0x00; in sanei_lexmark_low_set_scan_regs()
4777 dev->shadow_regs[0xe8] = 0x00; in sanei_lexmark_low_set_scan_regs()
4779 dev->shadow_regs[0xe9] = 0x1b; in sanei_lexmark_low_set_scan_regs()
4781 dev->shadow_regs[0xea] = 0x00; in sanei_lexmark_low_set_scan_regs()
4782 dev->shadow_regs[0xeb] = 0x00; in sanei_lexmark_low_set_scan_regs()
4784 dev->shadow_regs[0xec] = 0x07; in sanei_lexmark_low_set_scan_regs()
4786 dev->shadow_regs[0xef] = 0x03; in sanei_lexmark_low_set_scan_regs()
4790 dev->shadow_regs[0x79] = 0x40; in sanei_lexmark_low_set_scan_regs()
4797 if (rts88xx_is_color (dev->shadow_regs)) in sanei_lexmark_low_set_scan_regs()
4799 rts88xx_set_offset (dev->shadow_regs, in sanei_lexmark_low_set_scan_regs()
4800 dev->offset.red, in sanei_lexmark_low_set_scan_regs()
4801 dev->offset.green, dev->offset.blue); in sanei_lexmark_low_set_scan_regs()
4802 rts88xx_set_gain (dev->shadow_regs, in sanei_lexmark_low_set_scan_regs()
4803 dev->gain.red, dev->gain.green, dev->gain.blue); in sanei_lexmark_low_set_scan_regs()
4807 rts88xx_set_offset (dev->shadow_regs, in sanei_lexmark_low_set_scan_regs()
4808 dev->offset.gray, in sanei_lexmark_low_set_scan_regs()
4809 dev->offset.gray, dev->offset.gray); in sanei_lexmark_low_set_scan_regs()
4810 rts88xx_set_gain (dev->shadow_regs, in sanei_lexmark_low_set_scan_regs()
4811 dev->gain.gray, dev->gain.gray, dev->gain.gray); in sanei_lexmark_low_set_scan_regs()
4819 sanei_lexmark_low_start_scan (Lexmark_Device * dev) in sanei_lexmark_low_start_scan() argument
4832 devnum = dev->devnum; in sanei_lexmark_low_start_scan()
4834 dev->transfer_buffer = NULL; /* No data xferred yet */ in sanei_lexmark_low_start_scan()
4862 dev->shadow_regs[0x32] = 0x00; in sanei_lexmark_low_start_scan()
4863 low_write_all_regs (devnum, dev->shadow_regs); in sanei_lexmark_low_start_scan()
4864 dev->shadow_regs[0x32] = 0x40; in sanei_lexmark_low_start_scan()
4865 low_write_all_regs (devnum, dev->shadow_regs); in sanei_lexmark_low_start_scan()
4868 rts88xx_commit (devnum, dev->shadow_regs[0x2c]); in sanei_lexmark_low_start_scan()
4871 dev->bytes_remaining = 0; in sanei_lexmark_low_start_scan()
4873 dev->bytes_in_buffer = 0; in sanei_lexmark_low_start_scan()
4874 dev->bytes_read = 0; in sanei_lexmark_low_start_scan()
4890 dev->bytes_remaining = dev->data_size; in sanei_lexmark_low_start_scan()
4892 read_buffer_init (dev, dev->params.bytes_per_line); in sanei_lexmark_low_start_scan()
4903 dev->bytes_remaining = 0; in sanei_lexmark_low_start_scan()
4914 Lexmark_Device * dev) in sanei_lexmark_low_read_scan_data() argument
4928 if (strcmp (dev->val[OPT_MODE].s, SANE_VALUE_SCAN_MODE_COLOR) == 0) in sanei_lexmark_low_read_scan_data()
4934 if (strcmp (dev->val[OPT_MODE].s, SANE_VALUE_SCAN_MODE_GRAY) == 0) in sanei_lexmark_low_read_scan_data()
4939 if (dev->transfer_buffer == NULL) in sanei_lexmark_low_read_scan_data()
4941 if (dev->bytes_remaining > 0) in sanei_lexmark_low_read_scan_data()
4943 if (dev->bytes_remaining > MAX_XFER_SIZE) in sanei_lexmark_low_read_scan_data()
4946 xfer_request = dev->bytes_remaining; in sanei_lexmark_low_read_scan_data()
4952 status = low_poll_data (dev->devnum); in sanei_lexmark_low_read_scan_data()
4961 dev->transfer_buffer = (SANE_Byte *) malloc (MAX_XFER_SIZE); in sanei_lexmark_low_read_scan_data()
4962 if (dev->transfer_buffer == NULL) in sanei_lexmark_low_read_scan_data()
4968 low_usb_bulk_write (dev->devnum, command1_block, &cmd_size); in sanei_lexmark_low_read_scan_data()
4972 low_usb_bulk_read (dev->devnum, dev->transfer_buffer, &cmd_size); in sanei_lexmark_low_read_scan_data()
4975 k = dev->bytes_read % dev->read_buffer->linesize; in sanei_lexmark_low_read_scan_data()
4978 val = dev->transfer_buffer[i]; in sanei_lexmark_low_read_scan_data()
4979 val = (int) ((float) val * dev->shading_coeff[k] + 0.5); in sanei_lexmark_low_read_scan_data()
4982 dev->transfer_buffer[i] = val; in sanei_lexmark_low_read_scan_data()
4984 if ((size_t) k == dev->read_buffer->linesize) in sanei_lexmark_low_read_scan_data()
4989 dev->bytes_read += cmd_size; in sanei_lexmark_low_read_scan_data()
4990 dev->bytes_remaining -= cmd_size; in sanei_lexmark_low_read_scan_data()
4991 dev->bytes_in_buffer = cmd_size; in sanei_lexmark_low_read_scan_data()
4992 dev->read_pointer = dev->transfer_buffer; in sanei_lexmark_low_read_scan_data()
4995 DBG (2, " bytes_remaining: %lu\n", (u_long) dev->bytes_remaining); in sanei_lexmark_low_read_scan_data()
4996 DBG (2, " bytes_in_buffer: %lu\n", (u_long) dev->bytes_in_buffer); in sanei_lexmark_low_read_scan_data()
4997 DBG (2, " read_pointer: %p\n", (void *) dev->read_pointer); in sanei_lexmark_low_read_scan_data()
5002 DBG (5, " write ptr: %p\n", (void *) dev->read_buffer->writeptr); in sanei_lexmark_low_read_scan_data()
5003 DBG (5, " read ptr: %p\n", (void *) dev->read_buffer->readptr); in sanei_lexmark_low_read_scan_data()
5004 DBG (5, " max write ptr: %p\n", (void *) dev->read_buffer->max_writeptr); in sanei_lexmark_low_read_scan_data()
5005 DBG (5, " buffer size: %lu\n", (u_long) dev->read_buffer->size); in sanei_lexmark_low_read_scan_data()
5006 DBG (5, " line size: %lu\n", (u_long) dev->read_buffer->linesize); in sanei_lexmark_low_read_scan_data()
5007 DBG (5, " empty: %d\n", dev->read_buffer->empty); in sanei_lexmark_low_read_scan_data()
5008 DBG (5, " line no: %d\n", dev->read_buffer->image_line_no); in sanei_lexmark_low_read_scan_data()
5012 if (read_buffer_bytes_available (dev->read_buffer) >= dev->bytes_in_buffer) in sanei_lexmark_low_read_scan_data()
5015 while (dev->bytes_in_buffer) in sanei_lexmark_low_read_scan_data()
5022 read_buffer_add_byte (dev->read_buffer, in sanei_lexmark_low_read_scan_data()
5023 dev->read_pointer + 1); in sanei_lexmark_low_read_scan_data()
5025 read_buffer_add_byte (dev->read_buffer, in sanei_lexmark_low_read_scan_data()
5026 dev->read_pointer - 1); in sanei_lexmark_low_read_scan_data()
5033 read_buffer_add_byte_gray (dev->read_buffer, in sanei_lexmark_low_read_scan_data()
5034 dev->read_pointer + 1); in sanei_lexmark_low_read_scan_data()
5036 read_buffer_add_byte_gray (dev->read_buffer, in sanei_lexmark_low_read_scan_data()
5037 dev->read_pointer - 1); in sanei_lexmark_low_read_scan_data()
5044 read_buffer_add_bit_lineart (dev->read_buffer, in sanei_lexmark_low_read_scan_data()
5045 dev->read_pointer + 1, in sanei_lexmark_low_read_scan_data()
5046 dev->threshold); in sanei_lexmark_low_read_scan_data()
5048 read_buffer_add_bit_lineart (dev->read_buffer, in sanei_lexmark_low_read_scan_data()
5049 dev->read_pointer - 1, in sanei_lexmark_low_read_scan_data()
5050 dev->threshold); in sanei_lexmark_low_read_scan_data()
5053 dev->read_pointer = dev->read_pointer + sizeof (SANE_Byte); in sanei_lexmark_low_read_scan_data()
5054 dev->bytes_in_buffer--; in sanei_lexmark_low_read_scan_data()
5057 free (dev->transfer_buffer); in sanei_lexmark_low_read_scan_data()
5058 dev->transfer_buffer = NULL; in sanei_lexmark_low_read_scan_data()
5062 DBG (5, " write ptr: %p\n", (void *) dev->read_buffer->writeptr); in sanei_lexmark_low_read_scan_data()
5063 DBG (5, " read ptr: %p\n", (void *) dev->read_buffer->readptr); in sanei_lexmark_low_read_scan_data()
5064 DBG (5, " max write ptr: %p\n", (void *) dev->read_buffer->max_writeptr); in sanei_lexmark_low_read_scan_data()
5065 DBG (5, " buffer size: %lu\n", (u_long) dev->read_buffer->size); in sanei_lexmark_low_read_scan_data()
5066 DBG (5, " line size: %lu\n", (u_long) dev->read_buffer->linesize); in sanei_lexmark_low_read_scan_data()
5067 DBG (5, " empty: %d\n", dev->read_buffer->empty); in sanei_lexmark_low_read_scan_data()
5068 DBG (5, " line no: %d\n", dev->read_buffer->image_line_no); in sanei_lexmark_low_read_scan_data()
5071 bytes_read = read_buffer_get_bytes (dev->read_buffer, data, size); in sanei_lexmark_low_read_scan_data()
5075 DBG (2, " bytes_remaining: %lu\n", (u_long) dev->bytes_remaining); in sanei_lexmark_low_read_scan_data()
5076 DBG (2, " bytes_in_buffer: %lu\n", (u_long) dev->bytes_in_buffer); in sanei_lexmark_low_read_scan_data()
5077 DBG (2, " read_pointer: %p\n", (void *) dev->read_buffer->readptr); in sanei_lexmark_low_read_scan_data()
5081 if ((dev->bytes_remaining == 0) && read_buffer_is_empty (dev->read_buffer)) in sanei_lexmark_low_read_scan_data()
5083 if (!dev->eof) in sanei_lexmark_low_read_scan_data()
5087 dev->eof = SANE_TRUE; in sanei_lexmark_low_read_scan_data()
5088 low_rewind (dev, dev->shadow_regs); in sanei_lexmark_low_read_scan_data()
5101 low_rewind (Lexmark_Device * dev, SANE_Byte * regs) in low_rewind() argument
5113 scale = 600 / dev->val[OPT_RESOLUTION].w; in low_rewind()
5114 new_location = ((dev->val[OPT_BR_Y].w / scale) * scale) * 2; in low_rewind()
5122 if (dev->model.sensor_type == X74_SENSOR) in low_rewind()
5127 DBG (2, "low_rewind: %d=>new_location=%d\n", dev->val[OPT_BR_Y].w, in low_rewind()
5131 low_clr_c6 (dev->devnum); in low_rewind()
5132 low_cancel (dev->devnum); in low_rewind()
5147 switch (dev->model.motor_type) in low_rewind()
5193 low_start_scan (dev->devnum, regs); in low_rewind()
5199 read_buffer_init (Lexmark_Device * dev, int bytesperline) in read_buffer_init() argument
5205 dev->read_buffer = (Read_Buffer *) malloc (sizeof (Read_Buffer)); in read_buffer_init()
5206 if (dev->read_buffer == NULL) in read_buffer_init()
5208 dev->read_buffer->linesize = bytesperline; in read_buffer_init()
5209 dev->read_buffer->gray_offset = 0; in read_buffer_init()
5210 dev->read_buffer->max_gray_offset = bytesperline - 1; in read_buffer_init()
5211 dev->read_buffer->region = RED; in read_buffer_init()
5212 dev->read_buffer->red_offset = 0; in read_buffer_init()
5213 dev->read_buffer->green_offset = 1; in read_buffer_init()
5214 dev->read_buffer->blue_offset = 2; in read_buffer_init()
5215 dev->read_buffer->max_red_offset = bytesperline - 3; in read_buffer_init()
5216 dev->read_buffer->max_green_offset = bytesperline - 2; in read_buffer_init()
5217 dev->read_buffer->max_blue_offset = bytesperline - 1; in read_buffer_init()
5219 dev->read_buffer->size = bytesperline * no_lines_in_buffer; in read_buffer_init()
5220 dev->read_buffer->data = (SANE_Byte *) malloc (dev->read_buffer->size); in read_buffer_init()
5221 if (dev->read_buffer->data == NULL) in read_buffer_init()
5223 dev->read_buffer->readptr = dev->read_buffer->data; in read_buffer_init()
5224 dev->read_buffer->writeptr = dev->read_buffer->data; in read_buffer_init()
5225 dev->read_buffer->max_writeptr = dev->read_buffer->data + in read_buffer_init()
5227 dev->read_buffer->empty = SANE_TRUE; in read_buffer_init()
5228 dev->read_buffer->image_line_no = 0; in read_buffer_init()
5229 dev->read_buffer->bit_counter = 0; in read_buffer_init()
5230 dev->read_buffer->max_lineart_offset = dev->params.pixels_per_line - 1; in read_buffer_init()
5523 sanei_lexmark_low_offset_calibration (Lexmark_Device * dev) in sanei_lexmark_low_offset_calibration() argument
5543 regs[i] = dev->shadow_regs[i]; in sanei_lexmark_low_offset_calibration()
5549 (dev->sensor->offset_endx - dev->sensor->offset_startx) / regs[0x7a]; in sanei_lexmark_low_offset_calibration()
5572 while (((i > 0) && (average > dev->sensor->offset_threshold)) in sanei_lexmark_low_offset_calibration()
5588 low_simple_scan (dev, regs, dev->sensor->offset_startx, pixels, in sanei_lexmark_low_offset_calibration()
5615 low_simple_scan (dev, regs, dev->sensor->offset_startx, pixels, yoffset, in sanei_lexmark_low_offset_calibration()
5635 dev->offset.red = ro - ra; in sanei_lexmark_low_offset_calibration()
5638 dev->offset.green = go - ga; in sanei_lexmark_low_offset_calibration()
5639 dev->offset.gray = go - ga; in sanei_lexmark_low_offset_calibration()
5642 dev->offset.blue = bo - ba; in sanei_lexmark_low_offset_calibration()
5646 dev->offset.red = dev->sensor->offset_fallback; in sanei_lexmark_low_offset_calibration()
5647 dev->offset.green = dev->sensor->offset_fallback; in sanei_lexmark_low_offset_calibration()
5648 dev->offset.blue = dev->sensor->offset_fallback; in sanei_lexmark_low_offset_calibration()
5652 dev->offset.red, dev->offset.green, dev->offset.blue); in sanei_lexmark_low_offset_calibration()
5665 sanei_lexmark_low_gain_calibration (Lexmark_Device * dev) in sanei_lexmark_low_gain_calibration() argument
5683 regs[i] = dev->shadow_regs[i]; in sanei_lexmark_low_gain_calibration()
5704 status = low_cancel (dev->devnum); in sanei_lexmark_low_gain_calibration()
5710 && ((ra < dev->sensor->red_gain_target) in sanei_lexmark_low_gain_calibration()
5711 || (ga < dev->sensor->green_gain_target) in sanei_lexmark_low_gain_calibration()
5712 || (ba < dev->sensor->blue_gain_target))) in sanei_lexmark_low_gain_calibration()
5714 && (ga < dev->sensor->gray_gain_target))) && (i < 25)) in sanei_lexmark_low_gain_calibration()
5716 status = low_simple_scan (dev, regs, sx, pixels, yoffset, lines, &data); in sanei_lexmark_low_gain_calibration()
5731 if (ra < dev->sensor->red_gain_target) in sanei_lexmark_low_gain_calibration()
5733 if (ga < dev->sensor->green_gain_target in sanei_lexmark_low_gain_calibration()
5734 || (dev->sensor->gray_gain_target && !rts88xx_is_color (regs))) in sanei_lexmark_low_gain_calibration()
5736 if (ba < dev->sensor->blue_gain_target) in sanei_lexmark_low_gain_calibration()
5741 dev->gain.red = red; in sanei_lexmark_low_gain_calibration()
5742 dev->gain.green = green; in sanei_lexmark_low_gain_calibration()
5743 dev->gain.blue = blue; in sanei_lexmark_low_gain_calibration()
5744 dev->gain.gray = green; in sanei_lexmark_low_gain_calibration()
5747 dev->gain.red, dev->gain.green, dev->gain.blue); in sanei_lexmark_low_gain_calibration()
5761 sanei_lexmark_low_shading_calibration (Lexmark_Device * dev) in sanei_lexmark_low_shading_calibration() argument
5780 regs[i] = dev->shadow_regs[i]; in sanei_lexmark_low_shading_calibration()
5810 if (dev->shading_coeff != NULL) in sanei_lexmark_low_shading_calibration()
5811 free (dev->shading_coeff); in sanei_lexmark_low_shading_calibration()
5812 dev->shading_coeff = (float *) malloc (bpl * sizeof (float)); in sanei_lexmark_low_shading_calibration()
5813 if (dev->shading_coeff == NULL) in sanei_lexmark_low_shading_calibration()
5826 status = low_simple_scan (dev, regs, sx, pixels, lineoffset, lines, &data); in sanei_lexmark_low_shading_calibration()
5887 rtarget = dev->sensor->red_shading_target; in sanei_lexmark_low_shading_calibration()
5888 gtarget = dev->sensor->green_shading_target; in sanei_lexmark_low_shading_calibration()
5889 btarget = dev->sensor->blue_shading_target; in sanei_lexmark_low_shading_calibration()
5894 if (rts88xx_is_color (dev->shadow_regs)) in sanei_lexmark_low_shading_calibration()
5897 dev->shading_coeff[i] = 0; in sanei_lexmark_low_shading_calibration()
5899 dev->shading_coeff[i] += data[i + j * bpl]; in sanei_lexmark_low_shading_calibration()
5900 dev->shading_coeff[i] = in sanei_lexmark_low_shading_calibration()
5901 (rtarget / (dev->shading_coeff[i] / (lines - yoffset))); in sanei_lexmark_low_shading_calibration()
5904 dev->shading_coeff[i + pixels] = 0; in sanei_lexmark_low_shading_calibration()
5906 dev->shading_coeff[i + pixels] += data[i + j * bpl + pixels]; in sanei_lexmark_low_shading_calibration()
5907 dev->shading_coeff[i + pixels] = in sanei_lexmark_low_shading_calibration()
5908 ((gtarget / dev->shading_coeff[i + pixels]) * (lines - yoffset)); in sanei_lexmark_low_shading_calibration()
5911 dev->shading_coeff[i + 2 * pixels] = 0; in sanei_lexmark_low_shading_calibration()
5913 dev->shading_coeff[i + 2 * pixels] += in sanei_lexmark_low_shading_calibration()
5915 dev->shading_coeff[i + 2 * pixels] = in sanei_lexmark_low_shading_calibration()
5916 ((btarget / dev->shading_coeff[i + 2 * pixels]) * in sanei_lexmark_low_shading_calibration()
5921 dev->shading_coeff[i] = 0; in sanei_lexmark_low_shading_calibration()
5924 dev->shading_coeff[i] += data[i + j * bpl]; in sanei_lexmark_low_shading_calibration()
5926 dev->shading_coeff[i] = in sanei_lexmark_low_shading_calibration()
5927 (rtarget / dev->shading_coeff[i]) * (lines - yoffset); in sanei_lexmark_low_shading_calibration()
5936 if (dev->model.sensor_type == X74_SENSOR) in sanei_lexmark_low_shading_calibration()
5940 status = low_simple_scan (dev, regs, sx, pixels, 1, lines, &data); in sanei_lexmark_low_shading_calibration()
5962 sanei_lexmark_low_calibration (Lexmark_Device * dev) in sanei_lexmark_low_calibration() argument
5967 status = sanei_lexmark_low_offset_calibration (dev); in sanei_lexmark_low_calibration()
5972 if (rts88xx_is_color (dev->shadow_regs)) in sanei_lexmark_low_calibration()
5974 rts88xx_set_offset (dev->shadow_regs, in sanei_lexmark_low_calibration()
5975 dev->offset.red, in sanei_lexmark_low_calibration()
5976 dev->offset.green, dev->offset.blue); in sanei_lexmark_low_calibration()
5980 rts88xx_set_offset (dev->shadow_regs, in sanei_lexmark_low_calibration()
5981 dev->offset.gray, in sanei_lexmark_low_calibration()
5982 dev->offset.gray, dev->offset.gray); in sanei_lexmark_low_calibration()
5986 if (dev->val[OPT_MANUAL_GAIN].w == SANE_TRUE) in sanei_lexmark_low_calibration()
5988 if (rts88xx_is_color (dev->shadow_regs)) in sanei_lexmark_low_calibration()
5990 dev->gain.red = dev->val[OPT_RED_GAIN].w; in sanei_lexmark_low_calibration()
5991 dev->gain.green = dev->val[OPT_GREEN_GAIN].w; in sanei_lexmark_low_calibration()
5992 dev->gain.blue = dev->val[OPT_BLUE_GAIN].w; in sanei_lexmark_low_calibration()
5995 dev->gain.gray = dev->val[OPT_GRAY_GAIN].w; in sanei_lexmark_low_calibration()
5999 status = sanei_lexmark_low_gain_calibration (dev); in sanei_lexmark_low_calibration()
6006 if (rts88xx_is_color (dev->shadow_regs)) in sanei_lexmark_low_calibration()
6008 rts88xx_set_gain (dev->shadow_regs, dev->gain.red, dev->gain.green, in sanei_lexmark_low_calibration()
6009 dev->gain.blue); in sanei_lexmark_low_calibration()
6013 rts88xx_set_gain (dev->shadow_regs, dev->gain.gray, dev->gain.gray, in sanei_lexmark_low_calibration()
6014 dev->gain.gray); in sanei_lexmark_low_calibration()
6017 status = sanei_lexmark_low_shading_calibration (dev); in sanei_lexmark_low_calibration()
6028 sanei_lexmark_low_assign_sensor (Lexmark_Device * dev) in sanei_lexmark_low_assign_sensor() argument
6035 && sensor_list[dn].id != dev->model.sensor_type) in sanei_lexmark_low_assign_sensor()
6041 dev->model.sensor_type); in sanei_lexmark_low_assign_sensor()
6044 dev->sensor = &(sensor_list[dn]); in sanei_lexmark_low_assign_sensor()
6046 dev->model.sensor_type); in sanei_lexmark_low_assign_sensor()
6053 sanei_lexmark_low_assign_model (Lexmark_Device * dev, in sanei_lexmark_low_assign_model() argument
6096 dev->sane.name = strdup (devname); in sanei_lexmark_low_assign_model()
6097 dev->sane.vendor = model_list[dn].vendor; in sanei_lexmark_low_assign_model()
6098 dev->sane.model = model_list[dn].model; in sanei_lexmark_low_assign_model()
6099 dev->model = model_list[dn]; in sanei_lexmark_low_assign_model()
6100 dev->sane.type = "flatbed scanner"; in sanei_lexmark_low_assign_model()
6102 DBG (3, "sanei_lexmark_low_assign_model: assigned %s\n", dev->model.model); in sanei_lexmark_low_assign_model()
6106 return sanei_lexmark_low_assign_sensor (dev); in sanei_lexmark_low_assign_model()