Jean Delvare
5e5a996d83
Delete redundant declarations.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4780 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 20:19:35 +00:00
Jean Delvare
551500530f
Fix header comment.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4779 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 20:12:52 +00:00
Jean Delvare
5dec68540f
Warning fix.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4778 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 20:10:00 +00:00
Jean Delvare
ff8230310b
Stop mentioning the alias trick for i2c-dev, it no longer works and it
...
doesn't have anything to do with sensors anyway.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4777 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 16:45:19 +00:00
Jean Delvare
65b9d4dd92
Move sensors_feature_get_type() from access.c to sysfs.c, it's only called
...
from this file. This lets the compiler do additional optimizations.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4776 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 16:14:53 +00:00
Jean Delvare
c8de951071
Strip trailing whitespace.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4775 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 16:09:38 +00:00
Jean Delvare
8b30917c16
Don't print an error message when libsensors returns a feature
...
we don't know. Just ignore that feature.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4774 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 15:56:28 +00:00
Jean Delvare
1d05faf18b
More cleanups: drop legacy references, sections for drivers not
...
yet ported to Linux 2.6, etc.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4773 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 15:52:56 +00:00
Jean Delvare
d577b6eaae
Convert the default configuration file to use the new smybol names.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4772 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 15:00:40 +00:00
Jean Delvare
39f93afc8a
Print the conversion notice at the top of the converted file, not on
...
stdout.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4771 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 14:32:31 +00:00
Jean Delvare
f27710deb7
sensors-conf-convert: New, script to convert old configuration files
...
to use the new symbol names.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4770 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 14:28:19 +00:00
Jean Delvare
61686376df
Add support for temperature offset files, which are part of the
...
standard sysfs interface. I don't think it makes much sense to
display the offset values as part of the output of "sensors" (it
would even probably confuse people) but having support for these
in libsensors makes it possible to adjust the offsets in
sensors.conf, which is convenient.
This closes ticket #2248 .
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4769 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 12:31:12 +00:00
Jean Delvare
6b3803c386
Fix memory leaks in the configuration file parser when a label, set,
...
compute or ignore statement is found before the first chip statement.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4768 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 12:30:39 +00:00
Jean Delvare
6c4ea89ab9
Renumber SENSORS_FEATURE_VID from 0x300 to 0x1000. If we ever need
...
to add more "standard" feature types such as current or power,
we want to give them numbers that immediately follow the fan, voltage
and temperature features, so that the code is as simple as possible.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4767 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 12:29:20 +00:00
Jean Delvare
29bea1e843
Add support for the standard beep_enable attribute ( #2248 ).
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4766 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 12:28:31 +00:00
Jean Delvare
3c53f5fa85
Increase MAX_SENSORS_PER_TYPE from 16 to 20: the ADM1026 can have up
...
to 17 voltage inputs, and bmcsensors used to support up to 20 voltage
values.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4765 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:31:25 +00:00
Jean Delvare
5c121e2b74
Another minor optimization to sensors_read_dynamic_chip():
...
* We don't need a temporary structure for the feature being
currently processed. Instead we can work on the large sparse
array directly.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4764 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:29:36 +00:00
Jean Delvare
75bd19ec34
Minor optimizations in sensors_read_dynamic_chip():
...
* We don't need to compute the mapping during the first pass: this
field is overwritten when renumbering the features anyway.
* Only main features have features mapping to them.
* Only subfeatures have mappings, so we can stop the scan at the next
main feature.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4763 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:26:26 +00:00
Jean Delvare
b836fc0b53
Now that we can deduce the scaling factor required for each feature
...
from its type, there's no need to store this scaling factor. We can
instead compute it at runtime. This saves some memory (about 10 kB
in my real-world test), and the runtime overhead is totally
negligible.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4762 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:21:19 +00:00
Jean Delvare
ed480f2edd
Optimize the memory consumption in sensors_read_dynamic_chip(). The
...
idea is to have separate indexing for subfeatures with a compute
mapping and for subfeatures without it. They still follow each
other in the big table but this avoids wasting memory due to the
numbering gap between them.
This cuts the amount of memory (temporarily) allocated by
sensors_read_dynamic_chip() almost by half, and also speeds it up
a little as it now takes less iterations to walk the sparse array.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4761 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:20:35 +00:00
Jean Delvare
23f4274010
Store the feature list length separately instead of null-terminating
...
the list. This make it possible to check for out-of-bound indexes
without walking the entire list, so that direct look-ups are safer.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4760 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:19:42 +00:00
Jean Delvare
7975800ac1
Renumber the features linearly, so that feature number N is at
...
position N in the array. This allows for O(1) look-ups, as opposed
to O(N) before. This makes sensors_lookup_feature_nr() 2.4 times
faster in my real-world tests, resulting in a 6% performance boost
on average in the runtime part of "sensors".
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4759 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:19:09 +00:00
Jean Delvare
20c98f41b7
The compute mapping value is either SENSORS_NO_MAPPING or the same
...
feature number as the logical mapping. This means that the compute
mapping can be turned into a simple boolean flag. Doing so makes
struct sensors_feature_data smaller, which saves some memory (about
17 kB in my tests.)
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4758 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:17:22 +00:00
Jean Delvare
87efbc06c5
Rename sensors_feature_data.mode to flags, as we plan to use it to
...
store non-mode flags soon.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4757 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:13:15 +00:00
Jean Delvare
079ba26574
Drop sensors_strip_of_spaces. There's no rationale for stripping
...
trailing spaces of bus names and nothing else.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4756 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:07:14 +00:00
Jean Delvare
3d15175ecd
Add max6680-* entry.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4755 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-05 08:06:03 +00:00
Jean Delvare
0e357dfea6
Fix a broken comment.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4754 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-04 21:25:34 +00:00
Jean Delvare
af454994ea
Fix the smsc47m192 temperature faults. The standard name for these
...
files changed recently. Fallback to the old name for compatibility.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4753 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-04 16:51:54 +00:00
Jean Delvare
11bf5ced65
Fix adm1026 critical temperature limits for Linux 2.6.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4752 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-04 16:04:19 +00:00
Jean Delvare
a7a75c729d
Fix the magnitude of temperature offsets in Linux 2.6.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4751 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-04 15:59:33 +00:00
Jean Delvare
196cf59489
Minor fixes to the feature name conversion list.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4750 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-04 15:48:44 +00:00
Jean Delvare
5c58595785
libsensors: Fix maxilife support for Linux 2.6.
...
The driver doesn't exist yet, but at least now the library is ready.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4749 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-04 15:15:16 +00:00
Jean Delvare
44517574f9
Stop abusing the lm78 sysctl symbols in sis5595_features.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4748 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-04 15:01:26 +00:00
Jean Delvare
72559e55f1
libsensors: Fix adm1024 support for Linux 2.6.
...
The driver doesn't exist yet, but at least now the library is ready.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4747 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-04 14:38:30 +00:00
Jean Delvare
729c95b27d
The adm9240 temperature features need no specific translation rules,
...
the generic rules will work just fine.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4746 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-04 14:04:52 +00:00
Jean Delvare
eb62f8fa7b
Fix lm93 VID support for Linux 2.6.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4745 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-04 13:57:33 +00:00
Jean Delvare
2a822a2d96
Start numbering the features at 0, not 1. There's nothing wrong with
...
having a feature number 0, and this makes the code slightly simpler.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4744 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-02 11:15:27 +00:00
Jean Delvare
75859ca9dc
Use the feature type rather than the feature name to figure out whether
...
we need to add "_input" to get the correct sysfs file name. This is
much faster. This is still a ugly hack I'd like to get rid of, but at
least now the slowdown is acceptable.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4743 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-02 11:09:16 +00:00
Jean Delvare
4b012c9f63
Drop useless return.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4742 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-02 10:55:03 +00:00
Jean Delvare
c519ede6f8
Fix bmcsensors support for Linux 2.6.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4741 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-01 08:26:13 +00:00
Jean Delvare
3c602aa03a
Remove broken ATI SB700 SMBus PCI ID. The SB700 SMBus actually uses the same
...
PCI device ID as the SB600 SMBus.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4740 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-01 08:23:21 +00:00
Jean Delvare
82197ef51e
Fix ATI SB700 SMBus support, add SB800 support (backport from Linux 2.6,
...
original patch by Shane Huang).
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4739 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-01 08:19:13 +00:00
Jean Delvare
f96dc0266f
Fix kernel version detection ( #2187 ).
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4738 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-01 08:09:49 +00:00
Jean Delvare
27200afa1d
Reorder functions so that forward declarations are no longer needed.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4737 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-31 15:09:26 +00:00
Jean Delvare
a82c6b0476
Mass reindent, coding style and whitespace cleanups.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4736 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-31 14:42:20 +00:00
Jean Delvare
02dc2e6679
Add support for the Intel Tolapai SMBus controller. Patch from Jason Gaston.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4735 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-31 14:09:32 +00:00
Jean Delvare
e4ecbc9a90
Add support for the Intel Tolapai SMBus controller. Patch from Jason Gaston.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4734 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-31 14:07:15 +00:00
Jean Delvare
c00e21cf38
Reorder the members of the structures sensors_feature_data and
...
sensors_bus_id. This prevents wasting space with padding on 64-bit
systems, saving some memory (128 bytes for sensors_bus_id, nothing
yet for sensors_feature_data but it will come later).
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4733 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-30 21:23:22 +00:00
Jean Delvare
b491ba49d4
Make SENSORS_FEATURE_MAX_SUB_FEATURES private (and rename it to
...
MAX_SUB_FEATURES in the process.) This value could change in the
future so it's not safe to make it part of the libsensors API.
And it isn't needed either, applications shouldn't need to use
this value.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4732 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-30 21:21:15 +00:00
Jean Delvare
ed2b9171ec
Allocate the large sparse feature table in sensors_read_dynamic_chip()
...
dynamically. Having large amounts of data on the stack is generally not
recommended.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4731 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-30 21:10:41 +00:00