Jean Delvare
de4eca1ff7
Fix a broken comment.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4684 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-18 06:58:33 +00:00
Jean Delvare
a692aed705
Fix a broken comment.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4683 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-18 06:56:06 +00:00
Jean Delvare
4695755d89
Drop unneeded frees.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4682 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-17 21:11:57 +00:00
Jean Delvare
557feb2696
Fix error message when a chip is specified on the command line
...
with no prefix and that chip isn't found.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4681 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-17 11:36:01 +00:00
Jean Delvare
e814a5931b
Fix error message when a chip is specified on the command line
...
with no prefix and that chip isn't found.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4680 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-17 11:30:25 +00:00
Jean Delvare
8901084a95
Typo and white space cleanps.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4679 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-16 17:49:50 +00:00
Jean Delvare
da7fbf5b70
Reindent and cleanup.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4678 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-16 16:18:18 +00:00
Jean Delvare
f430b0991a
Chip types can no longer contain dashes. This makes it possible to
...
rewrite sensors_parse_chip_name() with a simpler algorithm. The new
code is smaller by about one third, and twice as fast on average
(5 times as fast in the most frequent case "foo-*".)
This closes ticket #2221 .
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4677 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-16 10:06:35 +00:00
Jean Delvare
edb42b3c16
Add a new function to libsensors doing the opposite of
...
sensors_parse_chip_name(). sensors_snprintf_chip_name() converts
a chip name from its internal representation to a human readable
string. So far, each user program had to reimplement this function.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4676 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-16 10:04:57 +00:00
Jean Delvare
493d9b27f5
Use strtoul() instead of parsing integers on our own.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4675 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-16 09:58:44 +00:00
Jean Delvare
e9fccf7d01
Don't handle the isa bus in sensors_parse_i2cbus_name(). We really
...
don't need to, as there is a single ISA bus, there's no need for
substituting anything.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4674 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-16 09:57:56 +00:00
Jean Delvare
8896ba3b1f
Rename sensors_chip_name.busname to path, as this is what we are using
...
it for by now.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4673 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-16 09:56:07 +00:00
Jean Delvare
b52225ffc0
Drop support for "dummy" bus type. The kernel no longer supports
...
such fake i2c buses, so neither should we. Instead, non-i2c buses are
handled explicitly.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4672 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-16 09:54:53 +00:00
Jean Delvare
6bf63e0f7a
License fix.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4670 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-15 08:23:38 +00:00
Jean Delvare
62007a3eaf
License fix.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4669 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-15 08:23:15 +00:00
Jean Delvare
3b25c8dc22
Pass structures by reference in sensors and sensord, again for a
...
small performance gain and better consistency with the new
libsensors API.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4668 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-13 20:19:44 +00:00
Jean Delvare
d9ec11a6c7
Pass the structures by reference inside libsensors. Again a small
...
performance gain, and this makes the internal code consistent with the
public functions.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4667 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-13 20:16:42 +00:00
Jean Delvare
3bab00fff9
Change the libsensors API so that all structures are passed by
...
reference. This is more efficient that way.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4666 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-13 20:16:03 +00:00
Hans de Goede
69757bcc20
Add FSC Heimdall, Poseidon II detection, change Poseidon I label from just plain Poseidon to Poseidon I
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4665 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-13 20:11:02 +00:00
Hans de Goede
3dd7d2d9a5
Add FSC Heimdall, Poseidon II detection, change Poseidon I label from just plain Poseidon to Poseidon I
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4664 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-13 20:08:14 +00:00
Jean Delvare
6a49d8c88a
Discard legacy comment.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4663 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-12 19:54:40 +00:00
Jean Delvare
a7ce0efcda
Discard legacy comment.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4662 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-12 19:54:00 +00:00
Jean Delvare
625e4944c5
Add detection of the Winbond W83L786NR/NG/R/G and W83L771W/G chips.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4661 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-12 19:41:33 +00:00
Jean Delvare
a4d0b4681a
Add detection of the Winbond W83L786NR/NG/R/G and W83L771W/G chips.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4660 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-12 19:39:43 +00:00
Jean Delvare
aa52221779
Add a missing register read in fscher. Original patch from Hans de Goede,
...
backported from Linux 2.6.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4659 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-12 17:03:09 +00:00
Jean Delvare
1b69a84283
Fix an array overrun in lm93. Original patch by Hans J. Koch, backported
...
from Linux 2.6.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4658 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-12 16:55:35 +00:00
Jean Delvare
bd31c1ece8
List the upcoming adt7470 driver.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4657 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-12 16:32:47 +00:00
Jean Delvare
a98987dcc6
List the upcoming adt7470 driver.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4656 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-12 16:31:43 +00:00
Jean Delvare
fbdb5dba87
The libsensors test suite doesn't use iconv.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4655 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-12 15:44:35 +00:00
Jean Delvare
bd3913c04f
Fix thmc50 analog output symbol.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4654 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-12 13:39:01 +00:00
Jean Delvare
cfc5fda3c5
Fix support for the Linux 2.6 thmc50 driver. Patch from Krzysztof Helt.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4653 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-12 13:33:50 +00:00
Jean Delvare
1d059ab3e0
Delete dead code.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4652 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-11 17:22:20 +00:00
Jean Delvare
3a59a49011
Add missing new line at end of log messages. Indirectly reported
...
by Joe Perches.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4651 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-11 07:30:31 +00:00
Jean Delvare
e689752228
Don't probe i2c-isa as if it were a regular i2c bus. This bug was
...
introduced when getting rid of the i2cdetect dependency. I had
forgotten that i2c-isa was not listed in class i2c-dev but was
still listed in class i2c-adapter.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4650 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-10 17:33:43 +00:00
Jean Delvare
8ade2b33fc
Don't probe i2c-isa as if it were a regular i2c bus. This bug was
...
introduced when getting rid of the i2cdetect dependency. I had
forgotten that i2c-isa was not listed in class i2c-dev but was
still listed in class i2c-adapter.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4649 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-10 16:45:21 +00:00
Jean Delvare
1b51800541
Delete sensors_do_all_sets(). I couldn't find any application using it,
...
and sensors_do_chip_sets() can be used instead if really needed.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4648 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-09 08:43:40 +00:00
Jean Delvare
5fb9a1689f
Don't export sensors_chip_name_has_wildcards(). I don't know of any
...
application using it, and I can't think of any use case for it outside
of libsensors. I'm not even sure if the inside calls are all legitimate.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4647 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-08-09 08:39:41 +00:00
Jean Delvare
eaec35491e
Now that sensors_get_ignored() is an internal function, we can change
...
its prototype to suit our needs better.
* Pass the chip name by address.
* Pass the feature directly rather than its number.
* Switch to a sane convention for the returned value.
* Don't check for errors that can't happen.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4646 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-24 08:22:03 +00:00
Jean Delvare
9896986247
We no longer need sensors_get_label_and_valid(), as it does hardly
...
more than sensors_get_label(). This allows for some cleanups.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4645 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-24 08:21:23 +00:00
Jean Delvare
e9c8c5fb06
Let libsensors handle ignore statements by itself, rather than
...
delegating the task to the user applications.
For now, I am calling sensors_get_ignored() in
sensors_get_all_features(), because this is the least intrusive way.
This is in no way optimal though, it would be better to not add
ignored features to the feature list in the first place. However,
doing so would require that the configuration file is read before
sysfs is scanned for features, which isn't currently the case. So
this improvement is left for later.
Note that this patch adds a small cost in terms of performance. This
is because we now honor ignore statements on all features (main ones
and subfeatures) while in practice "sensors" was only checking for
main features. It would be trivial to stop checking for subfeatures,
but it seems to me that supporting ignore on subfeatures is a good
move, as the user may actually want to ignore a specific subfeature.
Individual alarms come to mind. This will also be handy to debug the
generic print code in "sensors".
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4644 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-24 08:20:53 +00:00
Jean Delvare
6505fef0fd
The way we build the feature lists guarantees that subfeatures always
...
immediately follow their main feature. This makes it possible to simplify
sensors_get_all_features() quite a bit. We no longer need to maintain
separate pointers for the last main feature and the last subfeature,
we can simply walk the list linearly.
Note that I am still not entirely happy with this API. It was obviously
designed for debugging purposes (sensors -u) and without performance
concernes nor interface cleanliness in mind. I believe that we want to
tag main features and subfeatures as such, and let the application ask
specifically for the list of main features, and for each feature, for
its list of subfeatures (i.e. two functions instead of one.)
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4643 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-24 08:19:59 +00:00
Jean Delvare
a62ee5bac2
Speed up sensors_get_ignored() a bit. We can return as soon as an ignore
...
statement is found to match, even if it isn't an exact match.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4642 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-22 12:51:57 +00:00
Jean Delvare
72ffb67a83
Typo.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4641 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-22 12:45:59 +00:00
Jean Delvare
db2c145d9d
Speed up sensors_get_ignored() a bit. We can return as soon as an ignore
...
statement is found to match, even if it isn't an exact match.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4640 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-22 12:45:43 +00:00
Jean Delvare
462e7d81df
Unify error reporting messages. Fix a memory leak in error path.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4639 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-22 12:25:15 +00:00
Jean Delvare
4c88142226
No need to explicitly discard subclients. With the hwmon class, they won't
...
even be found. For earlier kernels, they will be discarded anyway because
they expose zero feature.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4638 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-22 10:13:19 +00:00
Jean Delvare
98110858fe
Discard devices with zero feature.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4637 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-21 09:28:12 +00:00
Jean Delvare
f302998cd2
Fix a memory leak in sensors_read_one_sysfs_chip() when an error occurs.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4636 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-21 08:44:31 +00:00
Jean Delvare
5611ffe6d1
Fix a memory leak in sensors_read_one_sysfs_chip() when an error occurs.
...
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4635 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-21 08:40:26 +00:00
Jean Delvare
7429bc0191
Fix the writing of the temperature interrupt configuration.
...
The old code was working only by accident. Backport from Linux 2.6.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4634 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-21 08:36:54 +00:00