Changeset 5421
- Timestamp:
- 11/24/08 17:51:00 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect
r5420 r5421 534 534 driver => "lm78", 535 535 i2c_addrs => [0x28..0x2f], 536 i2c_detect => sub { lm78_detect( 0, @_); },536 i2c_detect => sub { lm78_detect(@_, 0); }, 537 537 isa_addrs => [0x290], 538 538 isa_detect => sub { lm78_isa_detect(@_, 0); }, … … 543 543 driver => "lm78", 544 544 i2c_addrs => [0x28..0x2f], 545 i2c_detect => sub { lm78_detect( 2, @_); },545 i2c_detect => sub { lm78_detect(@_, 2); }, 546 546 isa_addrs => [0x290], 547 547 isa_detect => sub { lm78_isa_detect(@_, 2); }, … … 552 552 driver => "lm75", 553 553 i2c_addrs => [0x48..0x4f], 554 i2c_detect => sub { lm75_detect( 0, @_); },554 i2c_detect => sub { lm75_detect(@_, 0); }, 555 555 }, 556 556 { … … 558 558 driver => "lm75", 559 559 i2c_addrs => [0x48..0x4f], 560 i2c_detect => sub { lm75_detect( 1, @_); },560 i2c_detect => sub { lm75_detect(@_, 1); }, 561 561 }, 562 562 { … … 576 576 driver => "lm85", 577 577 i2c_addrs => [0x2c..0x2e], 578 i2c_detect => sub { lm85_detect( 0, @_); },578 i2c_detect => sub { lm85_detect(@_, 0); }, 579 579 }, 580 580 { … … 582 582 driver => "lm85", 583 583 i2c_addrs => [0x2c..0x2e], 584 i2c_detect => sub { lm85_detect( 1, @_); },584 i2c_detect => sub { lm85_detect(@_, 1); }, 585 585 }, 586 586 { … … 588 588 driver => "lm85", 589 589 i2c_addrs => [0x2c..0x2e], 590 i2c_detect => sub { lm85_detect( 2, @_); },590 i2c_detect => sub { lm85_detect(@_, 2); }, 591 591 }, 592 592 { … … 594 594 driver => "lm85", 595 595 i2c_addrs => [0x2c..0x2e], 596 i2c_detect => sub { lm85_detect( 3, @_); },596 i2c_detect => sub { lm85_detect(@_, 3); }, 597 597 }, 598 598 { … … 600 600 driver => "lm85", 601 601 i2c_addrs => [0x2c..0x2e], 602 i2c_detect => sub { lm85_detect( 4, @_); },602 i2c_detect => sub { lm85_detect(@_, 4); }, 603 603 }, 604 604 { … … 606 606 driver => "lm85", 607 607 i2c_addrs => [0x2c..0x2e], 608 i2c_detect => sub { lm85_detect( 5, @_); },608 i2c_detect => sub { lm85_detect(@_, 5); }, 609 609 }, 610 610 { … … 612 612 driver => "lm85", 613 613 i2c_addrs => [0x2c..0x2e], 614 i2c_detect => sub { lm85_detect( 6, @_); },614 i2c_detect => sub { lm85_detect(@_, 6); }, 615 615 }, 616 616 { … … 618 618 driver => "adt7462", 619 619 i2c_addrs => [0x5c, 0x58], 620 i2c_detect => sub { adt7467_detect( 2, @_); },620 i2c_detect => sub { adt7467_detect(@_, 2); }, 621 621 }, 622 622 { … … 624 624 driver => "to-be-written", 625 625 i2c_addrs => [0x4c], 626 i2c_detect => sub { adt7467_detect( 3, @_); },626 i2c_detect => sub { adt7467_detect(@_, 3); }, 627 627 }, 628 628 { … … 630 630 driver => "to-be-written", 631 631 i2c_addrs => [0x2e], 632 i2c_detect => sub { adt7467_detect( 0, @_); },632 i2c_detect => sub { adt7467_detect(@_, 0); }, 633 633 }, 634 634 { … … 636 636 driver => "adt7470", 637 637 i2c_addrs => [0x2c, 0x2e, 0x2f], 638 i2c_detect => sub { adt7467_detect( 4, @_); },638 i2c_detect => sub { adt7467_detect(@_, 4); }, 639 639 }, 640 640 { … … 642 642 driver => "adt7473", 643 643 i2c_addrs => [0x2e], 644 i2c_detect => sub { adt7473_detect( 0, @_); },644 i2c_detect => sub { adt7473_detect(@_, 0); }, 645 645 }, 646 646 { … … 648 648 driver => "to-be-written", 649 649 i2c_addrs => [0x2e], 650 i2c_detect => sub { adt7473_detect( 1, @_); },650 i2c_detect => sub { adt7473_detect(@_, 1); }, 651 651 }, 652 652 { … … 654 654 driver => "to-be-written", 655 655 i2c_addrs => [0x2c..0x2e], 656 i2c_detect => sub { adt7467_detect( 1, @_); },656 i2c_detect => sub { adt7467_detect(@_, 1); }, 657 657 }, 658 658 { … … 666 666 driver => "to-be-written", 667 667 i2c_addrs => [0x58], 668 i2c_detect => sub { andigilog_detect( 0, @_); },668 i2c_detect => sub { andigilog_detect(@_, 0); }, 669 669 }, 670 670 { … … 672 672 driver => "to-be-written", 673 673 i2c_addrs => [0x2c, 0x2d, 0x2e], 674 i2c_detect => sub { andigilog_detect( 1, @_); },674 i2c_detect => sub { andigilog_detect(@_, 1); }, 675 675 }, 676 676 { … … 678 678 driver => "to-be-written", 679 679 i2c_addrs => [0x2c, 0x2d, 0x2e], 680 i2c_detect => sub { andigilog_detect( 2, @_); },680 i2c_detect => sub { andigilog_detect(@_, 2); }, 681 681 }, 682 682 { … … 684 684 driver => "lm87", 685 685 i2c_addrs => [0x2c..0x2e], 686 i2c_detect => sub { lm87_detect( 0, @_); },686 i2c_detect => sub { lm87_detect(@_, 0); }, 687 687 }, 688 688 { … … 690 690 driver => "lm87", 691 691 i2c_addrs => [0x2c..0x2e], 692 i2c_detect => sub { lm87_detect( 1, @_); },692 i2c_detect => sub { lm87_detect(@_, 1); }, 693 693 }, 694 694 { … … 701 701 name => "Winbond W83781D", 702 702 driver => "w83781d", 703 i2c_detect => sub { w83781d_detect( 0, @_); },703 i2c_detect => sub { w83781d_detect(@_, 0); }, 704 704 i2c_addrs => [0x28..0x2f], 705 705 isa_addrs => [0x290], … … 711 711 driver => "w83781d", 712 712 i2c_addrs => [0x28..0x2f], 713 i2c_detect => sub { w83781d_detect( 1, @_); },713 i2c_detect => sub { w83781d_detect(@_, 1); }, 714 714 isa_addrs => [0x290], 715 715 isa_detect => sub { w83781d_isa_detect(@_, 1); }, … … 720 720 driver => "w83781d", 721 721 i2c_addrs => [0x2d], 722 i2c_detect => sub { w83781d_detect( 2, @_); },722 i2c_detect => sub { w83781d_detect(@_, 2); }, 723 723 }, 724 724 { … … 726 726 driver => "w83791d", 727 727 i2c_addrs => [0x2c..0x2f], 728 i2c_detect => sub { w83781d_detect( 7, @_); },728 i2c_detect => sub { w83781d_detect(@_, 7); }, 729 729 }, 730 730 { … … 732 732 driver => "w83792d", 733 733 i2c_addrs => [0x2c..0x2f], 734 i2c_detect => sub { w83781d_detect( 8, @_); },734 i2c_detect => sub { w83781d_detect(@_, 8); }, 735 735 }, 736 736 { … … 750 750 driver => "use-isa-instead", 751 751 i2c_addrs => [0x28..0x2f], 752 i2c_detect => sub { w83781d_detect( 3, @_); },752 i2c_detect => sub { w83781d_detect(@_, 3); }, 753 753 }, 754 754 { … … 756 756 driver => "use-isa-instead", 757 757 i2c_addrs => [0x28..0x2f], 758 i2c_detect => sub { w83781d_detect( 9, @_); },758 i2c_detect => sub { w83781d_detect(@_, 9); }, 759 759 }, 760 760 { … … 762 762 driver => "use-isa-instead", 763 763 i2c_addrs => [0x28..0x2f], 764 i2c_detect => sub { w83781d_detect( 10, @_); },764 i2c_detect => sub { w83781d_detect(@_, 10); }, 765 765 }, 766 766 { … … 768 768 driver => "w83781d", 769 769 i2c_addrs => [0x28..0x2f], 770 i2c_detect => sub { w83781d_detect( 4, @_); },770 i2c_detect => sub { w83781d_detect(@_, 4); }, 771 771 }, 772 772 { … … 774 774 driver => "w83781d", 775 775 i2c_addrs => [0x28..0x2f], 776 i2c_detect => sub { w83781d_detect( 5, @_); },776 i2c_detect => sub { w83781d_detect(@_, 5); }, 777 777 }, 778 778 { … … 780 780 driver => "asb100", 781 781 i2c_addrs => [0x28..0x2f], 782 i2c_detect => sub { w83781d_detect( 6, @_); },782 i2c_detect => sub { w83781d_detect(@_, 6); }, 783 783 }, 784 784 { … … 786 786 driver => "to-be-written", 787 787 i2c_addrs => [0x77], 788 i2c_detect => sub { mozart_detect( 0, @_); },788 i2c_detect => sub { mozart_detect(@_, 0); }, 789 789 }, 790 790 { … … 792 792 driver => "to-be-written", 793 793 i2c_addrs => [0x77], 794 i2c_detect => sub { mozart_detect( 1, @_); },794 i2c_detect => sub { mozart_detect(@_, 1); }, 795 795 }, 796 796 { … … 798 798 driver => "to-be-written", 799 799 i2c_addrs => [0x77], 800 i2c_detect => sub { mozart_detect( 2, @_); },800 i2c_detect => sub { mozart_detect(@_, 2); }, 801 801 }, 802 802 { … … 804 804 driver => "to-be-written", 805 805 i2c_addrs => [0x2d], 806 i2c_detect => sub { w83l784r_detect( 0, @_); },806 i2c_detect => sub { w83l784r_detect(@_, 0); }, 807 807 }, 808 808 { … … 810 810 driver => "to-be-written", 811 811 i2c_addrs => [0x2d], 812 i2c_detect => sub { w83l784r_detect( 1, @_); },812 i2c_detect => sub { w83l784r_detect(@_, 1); }, 813 813 }, 814 814 { … … 816 816 driver => "w83l786ng", 817 817 i2c_addrs => [0x2e, 0x2f], 818 i2c_detect => sub { w83l784r_detect( 2, @_); },818 i2c_detect => sub { w83l784r_detect(@_, 2); }, 819 819 }, 820 820 { … … 828 828 driver => "gl518sm", 829 829 i2c_addrs => [0x2c, 0x2d], 830 i2c_detect => sub { gl518sm_detect( 0, @_); },830 i2c_detect => sub { gl518sm_detect(@_, 0); }, 831 831 }, 832 832 { … … 834 834 driver => "gl518sm", 835 835 i2c_addrs => [0x2c, 0x2d], 836 i2c_detect => sub { gl518sm_detect( 1, @_); },836 i2c_detect => sub { gl518sm_detect(@_, 1); }, 837 837 }, 838 838 { … … 852 852 driver => "adm9240", 853 853 i2c_addrs => [0x2c..0x2f], 854 i2c_detect => sub { adm9240_detect( 0, @_); },854 i2c_detect => sub { adm9240_detect(@_, 0); }, 855 855 }, 856 856 { … … 864 864 driver => "adm9240", 865 865 i2c_addrs => [0x2c..0x2f], 866 i2c_detect => sub { adm9240_detect( 1, @_); },866 i2c_detect => sub { adm9240_detect(@_, 1); }, 867 867 }, 868 868 { … … 870 870 driver => "adm9240", 871 871 i2c_addrs => [0x2c..0x2f], 872 i2c_detect => sub { adm9240_detect( 2, @_); },872 i2c_detect => sub { adm9240_detect(@_, 2); }, 873 873 }, 874 874 { … … 882 882 driver => "adm1025", 883 883 i2c_addrs => [0x2c..0x2e], 884 i2c_detect => sub { adm1025_detect( 0, @_); },884 i2c_detect => sub { adm1025_detect(@_, 0); }, 885 885 }, 886 886 { … … 888 888 driver => "adm1025", 889 889 i2c_addrs => [0x2c..0x2d], 890 i2c_detect => sub { adm1025_detect( 1, @_); },890 i2c_detect => sub { adm1025_detect(@_, 1); }, 891 891 }, 892 892 { … … 894 894 driver => "adm1021", 895 895 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 896 i2c_detect => sub { adm1021_detect( 0, @_); },896 i2c_detect => sub { adm1021_detect(@_, 0); }, 897 897 }, 898 898 { … … 900 900 driver => "adm1021", 901 901 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 902 i2c_detect => sub { adm1021_detect( 1, @_); },902 i2c_detect => sub { adm1021_detect(@_, 1); }, 903 903 }, 904 904 { … … 906 906 driver => "adm1021", 907 907 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 908 i2c_detect => sub { adm1021_detect( 2, @_); },908 i2c_detect => sub { adm1021_detect(@_, 2); }, 909 909 }, 910 910 { … … 912 912 driver => "adm1021", 913 913 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 914 i2c_detect => sub { adm1021_detect( 3, @_); },914 i2c_detect => sub { adm1021_detect(@_, 3); }, 915 915 }, 916 916 { … … 918 918 driver => "max1668", 919 919 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 920 i2c_detect => sub { max1668_detect( 0, @_); },920 i2c_detect => sub { max1668_detect(@_, 0); }, 921 921 }, 922 922 { … … 924 924 driver => "max1668", 925 925 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 926 i2c_detect => sub { max1668_detect( 1, @_); },926 i2c_detect => sub { max1668_detect(@_, 1); }, 927 927 }, 928 928 { … … 930 930 driver => "max1668", 931 931 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 932 i2c_detect => sub { max1668_detect( 2, @_); },932 i2c_detect => sub { max1668_detect(@_, 2); }, 933 933 }, 934 934 { … … 948 948 driver => "adm1021", 949 949 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 950 i2c_detect => sub { adm1021_detect( 4, @_); },950 i2c_detect => sub { adm1021_detect(@_, 4); }, 951 951 }, 952 952 { … … 954 954 driver => "adm1021", 955 955 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 956 i2c_detect => sub { adm1021_detect( 5, @_); },956 i2c_detect => sub { adm1021_detect(@_, 5); }, 957 957 }, 958 958 { … … 960 960 driver => "adm1021", 961 961 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 962 i2c_detect => sub { adm1021_detect( 6, @_); },962 i2c_detect => sub { adm1021_detect(@_, 6); }, 963 963 }, 964 964 { … … 966 966 driver => "adm1021", 967 967 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 968 i2c_detect => sub { adm1021_detect( 7, @_); },968 i2c_detect => sub { adm1021_detect(@_, 7); }, 969 969 }, 970 970 { … … 972 972 driver => "max1619", 973 973 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 974 i2c_detect => sub { max1619_detect( 1, @_); },974 i2c_detect => sub { max1619_detect(@_, 1); }, 975 975 }, 976 976 { … … 978 978 driver => "max1619", 979 979 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 980 i2c_detect => sub { max1619_detect( 0, @_); },980 i2c_detect => sub { max1619_detect(@_, 0); }, 981 981 }, 982 982 { … … 990 990 driver => "lm90", 991 991 i2c_addrs => [0x4c], 992 i2c_detect => sub { lm90_detect( 0, @_); },992 i2c_detect => sub { lm90_detect(@_, 0); }, 993 993 }, 994 994 { … … 996 996 driver => "lm90", 997 997 i2c_addrs => [0x4c..0x4d], 998 i2c_detect => sub { lm90_detect( 1, @_); },998 i2c_detect => sub { lm90_detect(@_, 1); }, 999 999 }, 1000 1000 { … … 1002 1002 driver => "lm90", 1003 1003 i2c_addrs => [0x4c], 1004 i2c_detect => sub { lm90_detect( 2, @_); },1004 i2c_detect => sub { lm90_detect(@_, 2); }, 1005 1005 }, 1006 1006 { … … 1008 1008 driver => "lm90", 1009 1009 i2c_addrs => [0x4c..0x4d], 1010 i2c_detect => sub { lm90_detect( 3, @_); },1010 i2c_detect => sub { lm90_detect(@_, 3); }, 1011 1011 }, 1012 1012 { … … 1014 1014 driver => "to-be-written", # probably lm90 1015 1015 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 1016 i2c_detect => sub { lm90_detect( 4, @_); },1016 i2c_detect => sub { lm90_detect(@_, 4); }, 1017 1017 }, 1018 1018 { … … 1032 1032 driver => "lm90", 1033 1033 i2c_addrs => [0x4d], 1034 i2c_detect => sub { lm90_detect( 6, @_); },1034 i2c_detect => sub { lm90_detect(@_, 6); }, 1035 1035 }, 1036 1036 { … … 1038 1038 driver => "lm90", 1039 1039 i2c_addrs => [0x4e], 1040 i2c_detect => sub { lm90_detect( 6, @_); },1040 i2c_detect => sub { lm90_detect(@_, 6); }, 1041 1041 }, 1042 1042 { … … 1044 1044 driver => "lm90", 1045 1045 i2c_addrs => [0x4c], 1046 i2c_detect => sub { lm90_detect( 6, @_); },1046 i2c_detect => sub { lm90_detect(@_, 6); }, 1047 1047 }, 1048 1048 { … … 1050 1050 driver => "lm90", 1051 1051 i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 1052 i2c_detect => sub { lm90_detect( 7, @_); },1052 i2c_detect => sub { lm90_detect(@_, 7); }, 1053 1053 }, 1054 1054 { … … 1056 1056 driver => "lm90", 1057 1057 i2c_addrs => [0x4c], 1058 i2c_detect => sub { lm90_detect( 8, @_); },1058 i2c_detect => sub { lm90_detect(@_, 8); }, 1059 1059 }, 1060 1060 { … … 1062 1062 driver => "tmp401", 1063 1063 i2c_addrs => [0x4c], 1064 i2c_detect => sub { lm90_detect( 9, @_); },1064 i2c_detect => sub { lm90_detect(@_, 9); }, 1065 1065 }, 1066 1066 { … … 1068 1068 driver => "to-be-written", 1069 1069 i2c_addrs => [0x4c..0x4e], 1070 i2c_detect => sub { lm90_detect( 10, @_); },1070 i2c_detect => sub { lm90_detect(@_, 10); }, 1071 1071 }, 1072 1072 { … … 1080 1080 driver => "lm63", 1081 1081 i2c_addrs => [0x4c], 1082 i2c_detect => sub { lm63_detect( 1, @_); },1082 i2c_detect => sub { lm63_detect(@_, 1); }, 1083 1083 }, 1084 1084 { … … 1086 1086 driver => "to-be-written", # lm63 1087 1087 i2c_addrs => [0x18, 0x4e], 1088 i2c_detect => sub { lm63_detect( 3, @_); },1088 i2c_detect => sub { lm63_detect(@_, 3); }, 1089 1089 }, 1090 1090 { … … 1092 1092 driver => "lm63", # Not yet 1093 1093 i2c_addrs => [0x4c], 1094 i2c_detect => sub { lm63_detect( 2, @_); },1094 i2c_detect => sub { lm63_detect(@_, 2); }, 1095 1095 }, 1096 1096 { … … 1098 1098 driver => "lm92", 1099 1099 i2c_addrs => [0x48..0x4b], 1100 i2c_detect => sub { lm92_detect( 0, @_); },1100 i2c_detect => sub { lm92_detect(@_, 0); }, 1101 1101 }, 1102 1102 { … … 1104 1104 driver => "lm92", 1105 1105 i2c_addrs => [0x48..0x4b], 1106 i2c_detect => sub { lm92_detect( 1, @_); },1106 i2c_detect => sub { lm92_detect(@_, 1); }, 1107 1107 }, 1108 1108 { … … 1112 1112 # don't want to probe these addresses, it's 1113 1113 # dangerous. 1114 i2c_detect => sub { lm92_detect( 2, @_); },1114 i2c_detect => sub { lm92_detect(@_, 2); }, 1115 1115 }, 1116 1116 { … … 1118 1118 driver => "lm90", 1119 1119 i2c_addrs => [0x4c..0x4d], 1120 i2c_detect => sub { lm90_detect( 5, @_); },1120 i2c_detect => sub { lm90_detect(@_, 5); }, 1121 1121 }, 1122 1122 { … … 1136 1136 driver => "adm1031", 1137 1137 i2c_addrs => [0x2c..0x2e], 1138 i2c_detect => sub { adm1031_detect( 0, @_); },1138 i2c_detect => sub { adm1031_detect(@_, 0); }, 1139 1139 }, 1140 1140 { … … 1142 1142 driver => "adm1031", 1143 1143 i2c_addrs => [0x2c..0x2e], 1144 i2c_detect => sub { adm1031_detect( 1, @_); },1144 i2c_detect => sub { adm1031_detect(@_, 1); }, 1145 1145 }, 1146 1146 { … … 1148 1148 driver => "to-be-written", 1149 1149 i2c_addrs => [0x50..0x53], 1150 i2c_detect => sub { adm1034_detect( 0, @_); },1150 i2c_detect => sub { adm1034_detect(@_, 0); }, 1151 1151 }, 1152 1152 { … … 1154 1154 driver => "to-be-written", 1155 1155 i2c_addrs => [0x50..0x53], 1156 i2c_detect => sub { adm1034_detect( 1, @_); },1156 i2c_detect => sub { adm1034_detect(@_, 1); }, 1157 1157 }, 1158 1158 { … … 1160 1160 driver => "thmc50", 1161 1161 i2c_addrs => [0x2c..0x2e], 1162 i2c_detect => sub { adm1022_detect( 0, @_); },1162 i2c_detect => sub { adm1022_detect(@_, 0); }, 1163 1163 }, 1164 1164 { … … 1166 1166 driver => "thmc50", 1167 1167 i2c_addrs => [0x2c..0x2e], 1168 i2c_detect => sub { adm1022_detect( 1, @_); },1168 i2c_detect => sub { adm1022_detect(@_, 1); }, 1169 1169 }, 1170 1170 { … … 1172 1172 driver => "thmc50", 1173 1173 i2c_addrs => [0x2e], 1174 i2c_detect => sub { adm1022_detect( 2, @_); },1174 i2c_detect => sub { adm1022_detect(@_, 2); }, 1175 1175 }, 1176 1176 { … … 1178 1178 driver => "to-be-written", # thmc50 1179 1179 i2c_addrs => [0x2e], # At least (no datasheet) 1180 i2c_detect => sub { adm1022_detect( 3, @_); },1180 i2c_detect => sub { adm1022_detect(@_, 3); }, 1181 1181 }, 1182 1182 { … … 1217 1217 driver => sub { kernel_version_at_least(2, 6, 24) ? "fschmd" : "fscpos" }, 1218 1218 i2c_addrs => [0x73], 1219 i2c_detect => sub { fsc_detect( 0, @_); },1219 i2c_detect => sub { fsc_detect(@_, 0); }, 1220 1220 }, 1221 1221 { … … 1223 1223 driver => "to-be-written", 1224 1224 i2c_addrs => [0x73], 1225 i2c_detect => sub { fsc_detect( 1, @_); },1225 i2c_detect => sub { fsc_detect(@_, 1); }, 1226 1226 }, 1227 1227 { … … 1229 1229 driver => "fschmd", 1230 1230 i2c_addrs => [0x73], 1231 i2c_detect => sub { fsc_detect( 2, @_); },1231 i2c_detect => sub { fsc_detect(@_, 2); }, 1232 1232 }, 1233 1233 { … … 1235 1235 driver => sub { kernel_version_at_least(2, 6, 24) ? "fschmd" : "fscher" }, 1236 1236 i2c_addrs => [0x73], 1237 i2c_detect => sub { fsc_detect( 3, @_); },1237 i2c_detect => sub { fsc_detect(@_, 3); }, 1238 1238 }, 1239 1239 { … … 1241 1241 driver => "fschmd", 1242 1242 i2c_addrs => [0x73], 1243 i2c_detect => sub { fsc_detect( 4, @_); },1243 i2c_detect => sub { fsc_detect(@_, 4); }, 1244 1244 }, 1245 1245 { … … 1247 1247 driver => "fschmd", 1248 1248 i2c_addrs => [0x73], 1249 i2c_detect => sub { fsc_detect( 5, @_); },1249 i2c_detect => sub { fsc_detect(@_, 5); }, 1250 1250 }, 1251 1251 { … … 1265 1265 driver => "dme1737", 1266 1266 i2c_addrs => [0x2c..0x2e], 1267 i2c_detect => sub { dme1737_detect( 1, @_); },1267 i2c_detect => sub { dme1737_detect(@_, 1); }, 1268 1268 }, 1269 1269 { … … 1271 1271 driver => "dme1737", 1272 1272 i2c_addrs => [0x2c..0x2e], 1273 i2c_detect => sub { dme1737_detect( 2, @_); },1273 i2c_detect => sub { dme1737_detect(@_, 2); }, 1274 1274 }, 1275 1275 { … … 1277 1277 driver => "not-a-sensor", 1278 1278 i2c_addrs => [0x4e], # 0x37 not probed 1279 i2c_detect => sub { fintek_detect( 1, @_); },1279 i2c_detect => sub { fintek_detect(@_, 1); }, 1280 1280 }, 1281 1281 { … … 1283 1283 driver => "to-be-written", 1284 1284 i2c_addrs => [0x4e], # 0x37 not probed 1285 i2c_detect => sub { fintek_detect( 2, @_); },1285 i2c_detect => sub { fintek_detect(@_, 2); }, 1286 1286 }, 1287 1287 { … … 1289 1289 driver => "f75375s", 1290 1290 i2c_addrs => [0x2d..0x2e], 1291 i2c_detect => sub { fintek_detect( 3, @_); },1291 i2c_detect => sub { fintek_detect(@_, 3); }, 1292 1292 }, 1293 1293 { … … 1295 1295 driver => "f75375s", 1296 1296 i2c_addrs => [0x2d..0x2e], 1297 i2c_detect => sub { fintek_detect( 4, @_); },1297 i2c_detect => sub { fintek_detect(@_, 4); }, 1298 1298 }, 1299 1299 { … … 1301 1301 driver => "to-be-written", 1302 1302 i2c_addrs => [0x2d..0x2e], 1303 i2c_detect => sub { fintek_detect( 5, @_); },1303 i2c_detect => sub { fintek_detect(@_, 5); }, 1304 1304 }, 1305 1305 { … … 1307 1307 driver => "to-be-written", 1308 1308 i2c_addrs => [0x4c], 1309 i2c_detect => sub { fintek_detect( 6, @_); },1309 i2c_detect => sub { fintek_detect(@_, 6); }, 1310 1310 }, 1311 1311 { … … 1313 1313 driver => "to-be-written", 1314 1314 i2c_addrs => [0x4d], 1315 i2c_detect => sub { fintek_detect( 6, @_); },1315 i2c_detect => sub { fintek_detect(@_, 6); }, 1316 1316 }, 1317 1317 { … … 1319 1319 driver => "to-be-written", 1320 1320 i2c_addrs => [0x2f], 1321 i2c_detect => sub { fintek_detect( 7, @_); },1321 i2c_detect => sub { fintek_detect(@_, 7); }, 1322 1322 }, 1323 1323 { … … 3372 3372 # function was called is never returned. 3373 3373 3374 3375 # $_[0]: A reference to the file descriptor to access this chip.3374 # All I2C detection functions below take at least 2 parameters: 3375 # $_[0]: Reference to the file descriptor to access the chip 3376 3376 # $_[1]: Address 3377 # Returns: undef if not detected, (3) if detected. 3377 # Some of these functions which can detect more than one type of device, 3378 # take a third parameter: 3379 # $_[2]: Chip to detect 3380 3378 3381 # Registers used: 0x58 3379 3382 sub mtp008_detect … … 3384 3387 } 3385 3388 3386 # $_[0]: Chip to detect (0 = LM78, 2 = LM79) 3387 # $_[1]: A reference to the file descriptor to access this chip. 3388 # $_[2]: Address 3389 # Returns: undef if not detected, (6) if detected. 3389 # Chip to detect: 0 = LM78, 2 = LM79 3390 3390 # Registers used: 3391 3391 # 0x40: Configuration … … 3394 3394 sub lm78_detect 3395 3395 { 3396 my ($file, $addr, $chip) = @_; 3396 3397 my $reg; 3397 my ($chip, $file, $addr) = @_;3398 3398 return unless i2c_smbus_read_byte_data($file, 0x48) == $addr; 3399 3399 return unless (i2c_smbus_read_byte_data($file, 0x40) & 0x80) == 0x00; … … 3409 3409 } 3410 3410 3411 # $_[0]: Chip to detect (0 = LM75, 1 = DS75) 3412 # $_[1]: A reference to the file descriptor to access this chip. 3413 # $_[2]: Address (unused) 3414 # Returns: undef if not detected, 3 or 6 if detected; 3415 # 6 means that the temperatures make sense; 3416 # 3 means that the temperatures look strange; 3411 # Chip to detect: 0 = LM75, 1 = DS75 3417 3412 # Registers used: 3418 3413 # 0x00: Temperature … … 3435 3430 sub lm75_detect 3436 3431 { 3432 my ($file, $addr, $chip) = @_; 3437 3433 my $i; 3438 my ($chip, $file, $addr) = @_;3439 3434 my $cur = i2c_smbus_read_byte_data($file, 0x00); 3440 3435 my $conf = i2c_smbus_read_byte_data($file, 0x01); … … 3472 3467 } 3473 3468 3474 # $_[0]: A reference to the file descriptor to access this chip.3475 # $_[1]: Address3476 # Returns: undef if not detected, 3 or 6 if detected;3477 # 6 means that the temperatures make sense;3478 # 3 means that the temperatures look strange;3479 3469 # Registers used: 3480 3470 # 0x00: Temperature … … 3497 3487 sub lm77_detect 3498 3488 { 3489 my ($file, $addr) = @_; 3499 3490 my $i; 3500 my ($file, $addr) = @_;3501 3491 my $cur = i2c_smbus_read_byte_data($file, 0x00); 3502 3492 my $conf = i2c_smbus_read_byte_data($file, 0x01); … … 3556 3546 } 3557 3547 3558 # $_[0]: Chip to detect (0 = LM92, 1 = LM76, 2 = MAX6633/MAX6634/MAX6635) 3559 # $_[1]: A reference to the file descriptor to access this chip. 3560 # $_[2]: Address 3561 # Returns: undef if not detected, 2 or 4 if detected; 3548 # Chip to detect: 0 = LM92, 1 = LM76, 2 = MAX6633/MAX6634/MAX6635 3562 3549 # Registers used: 3563 3550 # 0x01: Configuration (National Semiconductor only) … … 3576 3563 sub lm92_detect 3577 3564 { 3578 my ($ chip, $file, $addr) = @_;3565 my ($file, $addr, $chip) = @_; 3579 3566 3580 3567 my $conf = i2c_smbus_read_byte_data($file, 0x01); … … 3621 3608 } 3622 3609 3623 # $_[0]: A reference to the file descriptor to access this chip.3624 # $_[1]: Address3625 # Returns: undef if not detected, 3 if detected3626 3610 # Registers used: 3627 3611 # 0xAA: Temperature … … 3665 3649 } 3666 3650 3667 # $_[0]: A reference to the file descriptor to access this chip.3668 # $_[1]: Address3669 # Returns: undef if not detected, 1 to 3 if detected.3670 3651 # Registers used: 3671 3652 # 0x00: Configuration register … … 3685 3666 sub lm80_detect 3686 3667 { 3668 my ($file, $addr) = @_; 3687 3669 my ($i, $reg); 3688 my ($file, $addr) = @_;3689 3670 3690 3671 return if (i2c_smbus_read_byte_data($file, 0x00) & 0x80) != 0; … … 3725 3706 } 3726 3707 3727 # $_[0]: A reference to the file descriptor to access this chip.3728 # $_[1]: Address3729 # Returns: undef if not detected, 4 to 8 if detected.3730 3708 # Registers used: 3731 3709 # 0x02: Status 1 … … 3763 3741 } 3764 3742 3765 # $_[0]: Chip to detect 3766 # (0 = LM90, 1 = LM89/LM99, 2 = LM86, 3 = ADM1032, 4 = MAX6654/MAX6690, 3767 # 5 = ADT7461, 6 = MAX6646/MAX6647/MAX6648/MAX6649/MAX6692, 3768 # 7 = MAX6680/MAX6681, 8 = W83L771W/G, 9 = TMP401, 10 = TMP411) 3769 # $_[1]: A reference to the file descriptor to access this chip. 3770 # $_[2]: Address 3771 # Returns: undef if not detected, 6 or 8 if detected. 3743 # Chip to detect: 0 = LM90, 1 = LM89/LM99, 2 = LM86, 3 = ADM1032, 3744 # 4 = MAX6654/MAX6690, 5 = ADT7461, 3745 # 6 = MAX6646/MAX6647/MAX6648/MAX6649/MAX6692, 3746 # 7 = MAX6680/MAX6681, 8 = W83L771W/G, 9 = TMP401, 10 = TMP411 3772 3747 # Registers used: 3773 3748 # 0x03: Configuration … … 3777 3752 sub lm90_detect 3778 3753 { 3779 my ($ chip, $file, $addr) = @_;3754 my ($file, $addr, $chip) = @_; 3780 3755 my $mid = i2c_smbus_read_byte_data($file, 0xfe); 3781 3756 my $cid = i2c_smbus_read_byte_data($file, 0xff); … … 3864 3839 } 3865 3840 3866 # $_[0]: A reference to the file descriptor to access this chip.3867 # $_[1]: Address3868 # Returns: undef if not detected, 5 if detected.3869 3841 # Registers used: 3870 3842 # 0x03: Configuration (no low nibble) … … 3896 3868 } 3897 3869 3898 # $_[0]: A reference to the file descriptor to access this chip.3899 # $_[1]: Address3900 # Returns: undef if not detected, 6 if detected.3901 3870 # Registers used: 3902 3871 # 0x03: Configuration … … 3917 3886 } 3918 3887 3919 # $_[0]: A reference to the file descriptor to access this chip.3920 # $_[1]: Address3921 # Returns: undef if not detected, 6 if detected.3922 3888 # Registers used: 3923 3889 # 0x03: Configuration 1 … … 3941 3907 } 3942 3908 3943 # $_[0]: Chip to detect 3944 # (1 = LM63, 2 = F75363SG, 3 = LM64) 3945 # $_[1]: A reference to the file descriptor to access this chip. 3946 # $_[2]: Address (unused) 3947 # Returns: undef if not detected, 6 if detected. 3909 # Chip to detect: 1 = LM63, 2 = F75363SG, 3 = LM64 3948 3910 # Registers used: 3949 3911 # 0xfe: Manufacturer ID … … 3953 3915 sub lm63_detect 3954 3916 { 3955 my ($ chip, $file, $addr) = @_;3917 my ($file, $addr, $chip) = @_; 3956 3918 3957 3919 my $mid = i2c_smbus_read_byte_data($file, 0xfe); … … 3980 3942 } 3981 3943 3982 # $_[0]: A reference to the file descriptor to access this chip.3983 # $_[1]: Address (unused)3984 # Returns: undef if not detected, 6 if detected.3985 3944 # Registers used: 3986 3945 # 0x02, 0x03: Fan support … … 4012 3971 } 4013 3972 4014 # $_[0]: Chip to detect 4015 # (0 = ADM1030, 1=ADM1031) 4016 # $_[1]: A reference to the file descriptor to access this chip. 4017 # $_[2]: Address 4018 # Returns: undef if not detected, 3 to 7 (ADM1031) or 9 (ADM1030) 4019 # if detected. 3973 # Chip to detect: 0 = ADM1030, 1 = ADM1031 4020 3974 # Registers used: 4021 3975 # 0x01: Config 2 … … 4028 3982 sub adm1031_detect 4029 3983 { 4030 my ($ chip, $file, $addr) = @_;3984 my ($file, $addr, $chip) = @_; 4031 3985 my $mid = i2c_smbus_read_byte_data($file, 0x3e); 4032 3986 my $cid = i2c_smbus_read_byte_data($file, 0x3d); … … 4063 4017 } 4064 4018 4065 # $_[0]: Chip to detect 4066 # (0 = ADM1033, 1 = ADM1034) 4067 # $_[1]: A reference to the file descriptor to access this chip. 4068 # $_[2]: Address (unused) 4069 # Returns: undef if not detected, 4 or 6 if detected. 4019 # Chip to detect: 0 = ADM1033, 1 = ADM1034 4070 4020 # Registers used: 4071 4021 # 0x3d: Chip ID … … 4074 4024 sub adm1034_detect 4075 4025 { 4076 my ($ chip, $file, $addr) = @_;4026 my ($file, $addr, $chip) = @_; 4077 4027 my $mid = i2c_smbus_read_byte_data($file, 0x3e); 4078 4028 my $cid = i2c_smbus_read_byte_data($file, 0x3d); … … 4096 4046 } 4097 4047 4098 # $_[0]: Chip to detect 4099 # (0 = ADT7467/ADT7468, 1 = ADT7476, 2 = ADT7462, 3 = ADT7466, 4100 # 4 = ADT7470) 4101 # $_[1]: A reference to the file descriptor to access this chip. 4102 # $_[2]: Address 4103 # Returns: undef if not detected, 5 or 7 if detected. 4048 # Chip to detect: 0 = ADT7467/ADT7468, 1 = ADT7476, 2 = ADT7462, 3 = ADT7466, 4049 # 4 = ADT7470 4104 4050 # Registers used: 4105 4051 # 0x3d: Chip ID … … 4108 4054 sub adt7467_detect 4109 4055 { 4110 my ($ chip, $file, $addr) = @_;4056 my ($file, $addr, $chip) = @_; 4111 4057 my $mid = i2c_smbus_read_byte_data($file, 0x3e); 4112 4058 my $cid = i2c_smbus_read_byte_data($file, 0x3d); … … 4151 4097 } 4152 4098 4153 # $_[0]: Chip to detect 4154 # (0 = ADT7473, 1 = ADT7475) 4155 # $_[1]: A reference to the file descriptor to access this chip. 4156 # $_[2]: Address (unused) 4157 # Returns: undef if not detected, 5 if detected. 4099 # Chip to detect: 0 = ADT7473, 1 = ADT7475 4158 4100 # Registers used: 4159 4101 # 0x3d: Chip ID … … 4161 4103 sub adt7473_detect 4162 4104 { 4163 my ($ chip, $file, $addr) = @_;4105 my ($file, $addr, $chip) = @_; 4164 4106 my $mid = i2c_smbus_read_byte_data($file, 0x3e); 4165 4107 my $cid = i2c_smbus_read_byte_data($file, 0x3d); … … 4178 4120 } 4179 4121 4180 # $_[0]: Chip to detect 4181 # (0 = aSC7512, 1 = aSC7611, 2 = aSC7621) 4182 # $_[1]: A reference to the file descriptor to access this chip. 4183 # $_[2]: Address (unused) 4184 # Returns: undef if not detected, 1 if detected. 4122 # Chip to detect: 0 = aSC7512, 1 = aSC7611, 2 = aSC7621 4185 4123 # Registers used: 4186 4124 # 0x3e: Manufacturer ID (0x61) 4187 4125 # 0x3f: Version 4188 4189 4126 sub andigilog_detect 4190 4127 { 4191 my ($ chip, $file, $addr) = @_;4128 my ($file, $addr, $chip) = @_; 4192 4129 my $mid = i2c_smbus_read_byte_data($file, 0x3e); 4193 4130 my $cid = i2c_smbus_read_byte_data($file, 0x3f); … … 4213 4150 } 4214 4151 4215 # $_[0]: A reference to the file descriptor to access this chip.4216 # $_[1]: Address (unused)4217 # Returns: undef if not detected, 1 if detected.4218 4152 # Registers used: 4219 4153 # 0xfe: Manufacturer ID … … 4233 4167 } 4234 4168 4235 # $_[0]: Chip to detect 4236 # (0 = LM85, 1 = LM96000, 2 = ADM1027, 3 = ADT7463, 4237 # 4 = EMC6D100/101, 5 = EMC6D102, 6 = EMC6D103) 4238 # $_[1]: A reference to the file descriptor to access this chip. 4239 # #_[2]: Base address. 4240 # Returns: undef if not detected, (7) or (8) if detected. 4169 # Chip to detect: 0 = LM85, 1 = LM96000, 2 = ADM1027, 3 = ADT7463, 4170 # 4 = EMC6D100/101, 5 = EMC6D102, 6 = EMC6D103 4241 4171 # Registers used: 0x3e == Vendor register. 4242 4172 # 0x3d == Device ID register (Analog Devices only). 4243 4173 # 0x3f == Version/Stepping register. 4244 # Constants used: 0x01 == National Semiconductor Vendor Id.4245 # 0x41 == Analog Devices Vendor Id.4246 # 0x5c == SMSC Vendor Id.4247 4174 sub lm85_detect 4248 4175 { 4249 my ($ chip, $file, $addr) = @_;4176 my ($file, $addr, $chip) = @_; 4250 4177 my $vendor = i2c_smbus_read_byte_data($file, 0x3e); 4251 4178 my $verstep = i2c_smbus_read_byte_data($file, 0x3f); … … 4286 4213 } 4287 4214 4288 # $_[0]: Chip to detect (0 = LM87, 1 = ADM1024) 4289 # $_[1]: A reference to the file descriptor to access this chip. 4290 # $_[2]: Address 4291 # Returns: undef if not detected, (7) if detected. 4215 # Chip to detect: 0 = LM87, 1 = ADM1024 4292 4216 # Registers used: 4293 4217 # 0x3e: Company ID … … 4296 4220 sub lm87_detect 4297 4221 { 4298 my ($ chip, $file, $addr) = @_;4222 my ($file, $addr, $chip) = @_; 4299 4223 my $cid = i2c_smbus_read_byte_data($file, 0x3e); 4300 4224 my $rev = i2c_smbus_read_byte_data($file, 0x3f); … … 4315 4239 } 4316 4240 4317 # $_[0]: Chip to detect (0 = W83781D, 1 = W83782D, 2 = W83783S, 4318 # 3 = W83627HF, 4 = AS99127F (rev.1), 4319 # 5 = AS99127F (rev.2), 6 = ASB100, 7 = W83791D, 4320 # 8 = W83792D, 9 = W83627EHF, 10 = W83627DHG) 4321 # $_[1]: A reference to the file descriptor to access this chip. 4322 # $_[2]: Address 4323 # Returns: undef if not detected, (8, addr1, addr2) if detected, but only 4324 # if the LM75 chip emulation is enabled. 4241 # Chip to detect: 0 = W83781D, 1 = W83782D, 2 = W83783S, 3 = W83627HF, 4242 # 4 = AS99127F (rev.1), 5 = AS99127F (rev.2), 6 = ASB100, 4243 # 7 = W83791D, 8 = W83792D, 9 = W83627EHF, 10 = W83627DHG 4325 4244 # Registers used: 4326 4245 # 0x48: Full I2C Address … … 4330 4249 # 0x58: Device ID (only when in bank 0) 4331 4250 # Note: Fails if the W8378xD is not in bank 0! 4332 # Note: Detection overrules a previous LM78 detection4333 4251 # Note: Asus chips do not have their I2C address at register 0x48? 4334 4252 # AS99127F rev.1 and ASB100 have 0x00, confirmation wanted for … … 4336 4254 sub w83781d_detect 4337 4255 { 4256 my ($file, $addr, $chip) = @_; 4338 4257 my ($reg1, $reg2, @res); 4339 my ($chip, $file, $addr) = @_;4340 4258 4341 4259 return unless (i2c_smbus_read_byte_data($file, 0x48) == $addr) … … 4379 4297 } 4380 4298 4381 # $_[0]: A reference to the file descriptor to access this chip.4382 # $_[1]: Address4383 # Returns: undef if not detected4384 # 6 if detected and bank different from 04385 # (8, addr1, addr2) if detected, bank is 0 and LM75 chip emulation4386 # is enabled4387 4299 # Registers used: 4388 4300 # 0x0b: Full I2C Address … … 4393 4305 sub w83793_detect 4394 4306 { 4307 my ($file, $addr) = @_; 4395 4308 my ($bank, $reg, @res); 4396 my ($file, $addr) = @_;4397 4309 4398 4310 $bank = i2c_smbus_read_byte_data($file, 0x00); … … 4417 4329 } 4418 4330 4419 # $_[0]: A reference to the file descriptor to access this chip.4420 # $_[1]: Address4421 # Returns: undef if not detected, 3 if detected4422 4331 # Registers used: 4423 4332 # 0x48: Full I2C Address … … 4448 4357 } 4449 4358 4450 # $_[0]: Chip to detect (0 = ASM58, 1 = AS2K129R, 2 = ???) 4451 # $_[1]: A reference to the file descriptor to access this chip 4452 # $_[2]: Address (unused) 4453 # Returns: undef if not detected, 5 if detected 4359 # Chip to detect: 0 = ASM58, 1 = AS2K129R, 2 = ??? 4454 4360 # Registers used: 4455 4361 # 0x4e: Vendor ID high byte … … 4460 4366 sub mozart_detect 4461 4367 { 4368 my ($file, $addr, $chip) = @_; 4462 4369 my ($vid, $dev); 4463 my ($chip, $file, $addr) = @_;4464 4370 4465 4371 $vid = (i2c_smbus_read_byte_data($file, 0x4e) << 8) … … 4474 4380 } 4475 4381 4476 # $_[0]: Chip to detect (0 = Revision 0x00, 1 = Revision 0x80) 4477 # $_[1]: A reference to the file descriptor to access this chip. 4478 # $_[2]: Address 4479 # Returns: undef if not detected, (6) if detected. 4382 # Chip to detect: 0 = Revision 0x00, 1 = Revision 0x80 4480 4383 # Registers used: 4481 4384 # 0x00: Device ID … … 4485 4388 sub gl518sm_detect 4486 4389 { 4390 my ($file, $addr, $chip) = @_; 4487 4391 my $reg; 4488 my ($chip, $file, $addr) = @_;4489 4392 return unless i2c_smbus_read_byte_data($file, 0x00) == 0x80; 4490 4393 return unless (i2c_smbus_read_byte_data($file, 0x03) & 0x80) == 0x00; … … 4495 4398 } 4496 4399 4497 # $_[0]: A reference to the file descriptor to access this chip.4498 # $_[1]: Address4499 # Returns: undef if not detected, (5) if detected.4500 4400 # Registers used: 4501 4401 # 0x00: Device ID … … 4513 4413 } 4514 4414 4515 # $_[0]: A reference to the file descriptor to access this chip.4516 # $_[1]: Address4517 # Returns: undef if not detected, (5) if detected.4518 4415 # Registers used: 4519 4416 # 0x00: Device ID … … 4526 4423 } 4527 4424 4528 # $_[0]: Chip to detect (0 = ADM9240, 1 = DS1780, 2 = LM81) 4529 # $_[1]: A reference to the file descriptor to access this chip. 4530 # $_[2]: Address 4531 # Returns: undef if not detected, (7) if detected. 4425 # Chip to detect: 0 = ADM9240, 1 = DS1780, 2 = LM81 4532 4426 # Registers used: 4533 4427 # 0x3e: Company ID 4534 4428 # 0x40: Configuration 4535 4429 # 0x48: Full I2C Address 4536 # Note: Detection overrules a previous LM78 detection4537 4430 sub adm9240_detect 4538 4431 { 4432 my ($file, $addr, $chip) = @_; 4539 4433 my $reg; 4540 my ($chip, $file, $addr) = @_;4541 4434 $reg = i2c_smbus_read_byte_data($file, 0x3e); 4542 4435 return unless ($chip == 0 and $reg == 0x23) or … … 4549 4442 } 4550 4443 4551 # $_[0]: Chip to detect (0 = ADM1022, 1 = THMC50, 2 = ADM1028, 4552 # 3 = THMC51) 4553 # $_[1]: A reference to the file descriptor to access this chip. 4554 # $_[2]: Address 4555 # Returns: undef if not detected, (8) if detected. 4444 # Chip to detect: 0 = ADM1022, 1 = THMC50, 2 = ADM1028, 3 = THMC51 4556 4445 # Registers used: 4557 4446 # 0x3e: Company ID 4558 4447 # 0x3f: Revision 4559 4448 # 0x40: Configuration 4560 # Note: Detection overrules a previous LM78 or ADM9240 detection4561 4449 sub adm1022_detect 4562 4450 { 4451 my ($file, $addr, $chip) = @_; 4563 4452 my $reg; 4564 my ($chip, $file, $addr) = @_;4565 4453 $reg = i2c_smbus_read_byte_data($file, 0x3e); 4566 4454 return unless ($chip == 0 and $reg == 0x41) or … … 4579 4467 } 4580 4468 4581 # $_[0]: Chip to detect (0 = ADM1025, 1 = NE1619) 4582 # $_[1]: A reference to the file descriptor to access this chip. 4583 # $_[2]: Address 4584 # Returns: undef if not detected, (8) if detected. 4469 # Chip to detect: 0 = ADM1025, 1 = NE1619 4585 4470 # Registers used: 4586 4471 # 0x3e: Company ID … … 4589 4474 # 0x41: Status 1 4590 4475 # 0x42: Status 2 4591 # Note: Detection overrules a previous LM78 or ADM9240 detection4592 4476 sub adm1025_detect 4593 4477 { 4478 my ($file, $addr, $chip) = @_; 4594 4479 my $reg; 4595 my ($chip, $file, $addr) = @_;4596 4480 4597 4481 $reg = i2c_smbus_read_byte_data($file, 0x3e); … … 4607 4491 } 4608 4492 4609 # $_[0]: A reference to the file descriptor to access this chip.4610 # $_[1]: Address4611 # Returns: undef if not detected, (8) if detected.4612 4493 # Registers used: 4613 4494 # 0x16: Company ID … … 4615 4496 sub adm1026_detect 4616 4497 { 4498 my ($file, $addr) = @_; 4617 4499 my $reg; 4618 my ($file, $addr) = @_;4619 4500 $reg = i2c_smbus_read_byte_data($file, 0x16); 4620 4501 return unless ($reg == 0x41); … … 4623 4504 } 4624 4505 4625 # $_[0]: Chip to detect 4626 # (0 = ADM1021, 1 = ADM1021A/ADM1023, 2 = MAX1617, 3 = MAX1617A, 4 = THMC10, 4627 # 5 = LM84, 6 = GL523, 7 = MC1066) 4628 # $_[1]: A reference to the file descriptor to access this chip. 4629 # $_[2]: Address 4630 # Returns: undef if not detected, 3 if simply detected, 5 if detected and 4631 # manufacturer ID matches, 7 if detected and manufacturer ID and 4632 # revision match 4506 # Chip to detect: 0 = ADM1021, 1 = ADM1021A/ADM1023, 2 = MAX1617, 3 = MAX1617A, 4507 # 4 = THMC10, 5 = LM84, 6 = GL523, 7 = MC1066 4633 4508 # Registers used: 4634 4509 # 0x04: Company ID (LM84 only) … … 4643 4518 sub adm1021_detect 4644 4519 { 4645 my ($ chip, $file, $addr) = @_;4520 my ($file, $addr, $chip) = @_; 4646 4521 my $man_id = i2c_smbus_read_byte_data($file, 0xfe); 4647 4522 my $rev = i2c_smbus_read_byte_data($file, 0xff); … … 4705 4580 } 4706 4581 4707 # $_[0]: Chip to detect 4708 # (0 = MAX1668, 1 = MAX1805, 2 = MAX1989) 4709 # $_[1]: A reference to the file descriptor to access this chip. 4710 # We may assume an i2c_set_slave_addr was already done. 4711 # $_[2]: Address 4712 # Returns: undef if not detected, 7 if detected 4582 # Chip to detect: 0 = MAX1668, 1 = MAX1805, 2 = MAX1989 4713 4583 # Registers used: 4714 4584 # 0xfe: Company ID … … 4716 4586 sub max1668_detect 4717 4587 { 4718 my ($ chip, $file, $addr) = @_;4588 my ($file, $addr, $chip) = @_; 4719 4589 my $man_id = i2c_smbus_read_byte_data($file, 0xfe); 4720 4590 my $dev_id = i2c_smbus_read_byte_data($file, 0xff); … … 4728 4598 } 4729 4599 4730 # $_[0]: Chip to detect 4731 # (0 = MAX1619, 1 = MAX1618) 4732 # $_[1]: A reference to the file descriptor to access this chip. 4733 # $_[2]: Address 4734 # Returns: undef if not detected, 7 if detected 4600 # Chip to detect: 0 = MAX1619, 1 = MAX1618 4735 4601 # Registers used: 4736 4602 # 0xfe: Company ID … … 4741 4607 sub max1619_detect 4742 4608 { 4743 my ($ chip, $file, $addr) = @_;4609 my ($file, $addr, $chip) = @_; 4744 4610 my $man_id = i2c_smbus_read_byte_data($file, 0xfe); 4745 4611 my $dev_id = i2c_smbus_read_byte_data($file, 0xff); … … 4765 4631 } 4766 4632 4767 # $_[0]: A reference to the file descriptor to access this chip.4768 # $_[1]: Address (unused)4769 # Returns: undef if not detected, 6 if detected.4770 4633 # Registers used: 4771 4634 # 0x28: User ID 4772 4635 # 0x29: User ID2 4773 # 0x2A: Version ID4774 4775 4636 sub ite_overclock_detect 4776 4637 { … … 4785 4646 } 4786 4647 4787 # $_[0]: A reference to the file descriptor to access this chip.4788 # $_[1]: Address4789 # Returns: undef if not detected, 7 or 8 if detected (tops LM78).4790 4648 # Registers used: 4791 4649 # 0x00: Configuration … … 4795 4653 sub it8712_i2c_detect 4796 4654 { 4655 my ($file, $addr) = @_; 4797 4656 my $reg; 4798 my ($file, $addr) = @_;4799 4657 return unless i2c_smbus_read_byte_data($file, 0x48) == $addr; 4800 4658 return unless (i2c_smbus_read_byte_data($file, 0x00) & 0x90) == 0x10; … … 4804 4662 } 4805 4663 4806 # $_[0]: A reference to the file descriptor to access this chip4807 # $_[1]: Address4808 # Returns: 8 for a memory eeprom4809 4664 # Registers used: 4810 4665 # 0-63: SPD Data and Checksum … … 4826 4681 } 4827 4682 4828 # $_[0]: A reference to the file descriptor to access this chip.4829 # $_[1]: Address4830 # Returns: undef if not detected, 8 if detected.4831 4683 # Registers used: 4832 4684 # 0x00..0x07: DDC signature … … 4848 4700 } 4849 4701 4850 # $_[0]: Chip to detect (0 = Poseidon I, 1 = Poseidon II, 2 = Scylla, 4851 # 3 = Hermes, 4 = Heimdal, 5 = Heracles) 4852 # $_[1]: A reference to the file descriptor to access this chip. 4853 # $_[2]: Address 4854 # Returns: undef if not detected, (8) if detected. 4702 # Chip to detect: 0 = Poseidon I, 1 = Poseidon II, 2 = Scylla, 4703 # 3 = Hermes, 4 = Heimdal, 5 = Heracles 4855 4704 # Registers used: 4856 4705 # 0x00-0x02: Identification (3 capital ASCII letters) 4857 4706 sub fsc_detect 4858 4707 { 4859 my ($ chip, $file, $addr) = @_;4708 my ($file, $addr, $chip) = @_; 4860 4709 my $id; 4861 4710 … … 4874 4723 } 4875 4724 4876 # $_[0]: A reference to the file descriptor to access this chip.4877 # $_[1]: Address (unused)4878 # Returns: undef if not detected, 5 if detected.4879 4725 # Registers used: 4880 4726 # 0x3E: Manufacturer ID … … 4882 4728 sub lm93_detect 4883 4729 { 4884 my $file = shift;4730 my ($file, $addr) = @_; 4885 4731 return unless i2c_smbus_read_byte_data($file, 0x3E) == 0x01 4886 4732 and i2c_smbus_read_byte_data($file, 0x3F) == 0x73; … … 4888 4734 } 4889 4735 4890 # $_[0]: A reference to the file descriptor to access this chip.4891 # $_[1]: Address4892 # Returns: undef if not detected, (7) if detected.4893 4736 # Registers used: 4894 4737 # 0x3F: Revision ID … … 4917 4760 } 4918 4761 4919 # $_[0]: A reference to the file descriptor to access this chip.4920 # $_[1]: Address4921 # Returns: undef if not detected, 5 or 6 if detected.4922 4762 # Registers used: 4923 4763 # 0x3E: Manufacturer ID … … 4935 4775 } 4936 4776 4937 # $_[0]: Chip to detect 4938 # (1 = DME1737, 2 = SCH5027) 4939 # $_[1]: A reference to the file descriptor to access this chip. 4940 # $_[2]: Address 4941 # Returns: undef if not detected, 5 or 6 if detected. 4777 # Chip to detect: 1 = DME1737, 2 = SCH5027 4942 4778 # Registers used: 4943 4779 # 0x3E: Manufacturer ID … … 4948 4784 sub dme1737_detect 4949 4785 { 4950 my ($ chip, $file, $addr) = @_;4786 my ($file, $addr, $chip) = @_; 4951 4787 my $vendor = i2c_smbus_read_byte_data($file, 0x3E); 4952 4788 my $verstep = i2c_smbus_read_byte_data($file, 0x3F); … … 4966 4802 } 4967 4803 4968 # $_[0]: Chip to detect 4969 # (1 = F75111R/RG/N, 2 = F75121R/F75122R/RG, 3 = F75373S/SG, 4970 # 4 = F75375S/SP, 5 = F75387SG/RG, 6 = F75383M/S/F75384M/S, 4971 # 7 = custom power control IC) 4972 # $_[1]: A reference to the file descriptor to access this chip. 4973 # $_[2]: Address (unused) 4974 # Returns: undef if not detected, 7 if detected. 4804 # Chip to detect: 1 = F75111R/RG/N, 2 = F75121R/F75122R/RG, 3 = F75373S/SG, 4805 # 4 = F75375S/SP, 5 = F75387SG/RG, 6 = F75383M/S/F75384M/S, 4806 # 7 = custom power control IC 4975 4807 # Registers used: 4976 4808 # 0x5A-0x5B: Chip ID … … 4978 4810 sub fintek_detect 4979 4811 { 4980 my ($ chip, $file, $addr) = @_;4812 my ($file, $addr, $chip) = @_; 4981 4813 my $chipid = (i2c_smbus_read_byte_data($file, 0x5A) << 8) 4982 4814 | i2c_smbus_read_byte_data($file, 0x5B); … … 5009 4841 # The address (0x0b) is specified by the SMBus standard so it's likely 5010 4842 # that this really is a smart battery. 5011 # $_[0]: A reference to the file descriptor to access this chip.5012 # $_[1]: Address5013 # Returns: 55014 4843 sub smartbatt_detect 5015 4844 { … … 5028 4857 } 5029 4858 5030 # $_[0]: Chip to detect (0 = W83L784R/AR/G, 1 = W83L785R/G, 5031 # 2 = W83L786NR/NG/R/G) 5032 # $_[1]: A reference to the file descriptor to access this chip. 5033 # $_[2]: Address 5034 # Returns: undef if not detected, 6 or 8 if detected 4859 # Chip to detect: 0 = W83L784R/AR/G, 1 = W83L785R/G, 2 = W83L786NR/NG/R/G 5035 4860 # Registers used: 5036 4861 # 0x40: Configuration … … 5042 4867 sub w83l784r_detect 5043 4868 { 4869 my ($file, $addr, $chip) = @_; 5044 4870 my ($reg, @res); 5045 my ($chip, $file, $addr) = @_;5046 4871 5047 4872 return unless (i2c_smbus_read_byte_data($file, 0x40) & 0x80) == 0x00; … … 5065 4890 } 5066 4891 5067 # $_[0]: A reference to the file descriptor to access this chip.5068 # $_[1]: Address5069 # Returns: undef if not detected, 8 if detected5070 4892 # Registers used: 5071 4893 # 0x4C-4E: Mfr and Chip ID … … 5079 4901 } 5080 4902 5081 # $_[0]: A reference to the file descriptor to access this chip.5082 # $_[1]: Address5083 # Returns: undef if not detected, 3 if detected.5084 #5085 4903 # The max6650 has no device ID register. However, a few registers have 5086 4904 # spare bits, which are documented as being always zero on read. We read … … 5111 4929 } 5112 4930 5113 # $_[0]: A reference to the file descriptor to access this chip.5114 # $_[1]: Address.5115 #5116 # Returns: undef if not detected, 6 if detected.5117 4931 sub max6655_detect 5118 4932 { … … 5132 4946 } 5133 4947 5134 # $_[0]: A reference to the file descriptor to access this chip.5135 # $_[1]: Address5136 #5137 4948 # This isn't very good detection. 5138 4949 # Verify the i2c address, and the stepping ID (which is 0xb0 on 5139 4950 # my chip but could be different for others... 5140 #5141 4951 sub vt1211_i2c_detect 5142 4952 {
