mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-03 13:38:25 +00:00
Finished renaming of detect.pl
* Either Phil had not done a 'cvs update', or I forgot a 'cvs commit'; anyway, the last changes to detect.pl have been ported to sensors-detect. * Added a rule to the Makefile fragment to install it in $(SBINDIR). * Added SBINDIR to the main Makefile. * Deleted detect.pl git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@323 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
9649496dc0
commit
96ac13566f
3 files changed
+12
-6
No files matched your search
@@ -70,11 +70,14 @@ ETCDIR := /etc
|
||||
LIBDIR := $(PREFIX)/lib
|
||||
|
||||
# You should not need to change this. It is the directory into which the
|
||||
# executable program files will be installed.
|
||||
# executable program files will be installed. BINDIR for programs that are
|
||||
# also useful for normal users, SBINDIR for programs that can only be run
|
||||
# by the superuser.
|
||||
# Note that not all programs in this package are really installed;
|
||||
# some are just examples. You can always install them by hand, of
|
||||
# course.
|
||||
BINDIR := $(PREFIX)/bin
|
||||
SBINDIR := $(PREFIX)/sbin
|
||||
|
||||
# You should not need to change this. It is the basic directory into which
|
||||
# include files will be installed. The actual directory will be
|
||||
|
||||
@@ -24,6 +24,7 @@ MODULE_DIR := prog/detect
|
||||
# defined value verbatim into the command-list of rules...
|
||||
PROGDETECTTARGETS := $(MODULE_DIR)/i2cdetect
|
||||
PROGDETECTSOURCES := $(MODULE_DIR)/i2cdetect.c
|
||||
PROGDETECTSBININSTALL := $(MODULE_DIR)/sensors-detect
|
||||
|
||||
# Include all dependency files. We use '.rd' to indicate this will create
|
||||
# executables.
|
||||
@@ -32,6 +33,11 @@ INCLUDEFILES += $(PROGDETECTSOURCES:.c=.rd)
|
||||
all-prog-detect: $(PROGDETECTTARGETS)
|
||||
all :: all-prog-detect
|
||||
|
||||
install-prog-detect: all-prog-detect
|
||||
mkdir -p $(SBINDIR)
|
||||
$(INSTALL) -o root -g root -m 755 $(PROGDETECTSBININSTALL) $(SBINDIR)
|
||||
install :: install-prog-detect
|
||||
|
||||
clean-prog-detect:
|
||||
$(RM) $(PROGDETECTSOURCES:.c=.rd) $(PROGDETECTSOURCES:.c=.ro) \
|
||||
$(PROGDETECTTARGETS)
|
||||
|
||||
@@ -158,9 +158,6 @@ use subs qw(lm78_detect lm78_isa_detect lm78_alias_detect lm75_detect
|
||||
driver => "w83781d",
|
||||
i2c_addrs => [0x00..0x7f],
|
||||
i2c_detect => sub { w83781d_detect 1, @_},
|
||||
isa_addrs => [0x290],
|
||||
isa_detect => sub { w83781d_isa_detect 1, @_ },
|
||||
alias_detect => sub { w83781d_alias_detect 1, @_ },
|
||||
} ,
|
||||
{
|
||||
name => "Winbond W83783S",
|
||||
@@ -1149,8 +1146,8 @@ sub w83781d_detect
|
||||
return unless (($reg1 & 0x80) == 0x00 and $reg2 == 0xa3) or
|
||||
(($reg1 & 0x80) == 0x80 and $reg2 == 0x5c);
|
||||
return unless ($reg1 & 0x07) == 0x00;
|
||||
$reg1 = i2c_smbus_read_byte_data($file,0x58);
|
||||
return if $chip == 0 and ($reg1 & 0xfe) != 0x10;
|
||||
$reg1 = i2c_smbus_read_byte_data($file,0x58) &0xfe;
|
||||
return if $chip == 0 and $reg1 != 0x10;
|
||||
return if $chip == 1 and $reg1 != 0x30;
|
||||
return if $chip == 2 and $reg1 != 0x40;
|
||||
$reg1 = i2c_smbus_read_byte_data($file,0x4a);
|
||||
|
||||
Reference in new issue
Block a user