| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
SPI bus statements in the configuration file are not yet supported, as
SPI buses don't have a name attribute yet, it's not possible to identify
them and thus no substitution is possible.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4689 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
|
|
|
| |
i2c-centric. Make it more neutral so that we can cleanly support
additional bus types such as SPI or One-Wire.
This second part updates sensors_bus to use sensors_bus_id. Thanks
to Mark M. Hoffman for showing me how the configuration file
parser could be modified to support that change.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4687 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
|
|
| |
i2c-centric. Make it more neutral so that we can cleanly support
additional bus types such as SPI or One-Wire.
This first part introduces sensors_bus_id, and updates
sensors_chip_name to use it.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4686 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4637 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
| |
* We no longer support any single type, so no need to handle this case.
* We can start looking for "_" at offset 3 rather than the beginning
of the string (the shortest valid prefix is "in0", 3 characters.)
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4631 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
adjust it to fit our needs better:
* Call sensors_feature_get_type() before allocating memory for the
feature name. The allocation will be reverted for all sysfs files
which are not valid libsensors attributes, and there can be a lot
of these. So this saves a few memory allocations. But this means
that we want to pass a simple string to sensors_feature_get_type()
rather than a struct sensors_feature_data. This also means that
sensors_feature_get_type() gets the raw attribute name ("_input"
not stripped.)
* Get the channel number from sensors_feature_get_type() too. We
get it for free from sscanf(), so it's more efficient to return it
than to parse it again in sensors_read_dynamic_chip().
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4630 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
| |
to something more in line with what they do.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4553 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
| |
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4550 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
| |
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4545 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
| |
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4544 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
| |
2.6.9, the right VID conversion formula is selected automatically
depending on the CPU model, so the user shouldn't have to care.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4543 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
| |
As a side effect, this fixes a memory leak (the regex engine data was never
freed.)
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4538 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
| |
The VID value is in cpu*_vid, not vid.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4520 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
| |
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4519 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
| |
the real name and magnitude now.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4513 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
|
|
|
| |
and sensors_chip_features_list arrays tend to track the same information.
So it's much more simple, and more efficient, to have a single array. I
decided to keep sensors_proc_chips, because it already has memory management
helpers. One nice side effect is that the arbitrary limit to the number of
supported chips is now gone. Another one is that some of the memory leaks
were fixed.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4510 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
| |
sensors_chip_features_list[]. Using only the prefix (as was done before)
makes it impossible to properly support multiple chips with the same prefix
but a different feature set.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4508 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
| |
as well use this member directly for slightly more simple code.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4474 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
| |
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4465 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
| |
SENSORS_FEATURE_TEMP_LOW, they don't correspond to anything in the
standard sysfs interface.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4427 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
|
| |
* Fix the handling of temperature hysteresis. Hysteresis is not a
temperature limit by itself, but a property of temperature limit.
* Handle per-limit temperature alarms.
With these fixes, the ADM1032 is properly supported by the new code.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4423 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
identify sysfs entries. Reasons for this rewrite / bugs fixed:
-Don't give features like alarms / sensor type / fault flag a
compute mapping only a normal mapping
-Don't generate features for sysfs entries like uvent, modalias, etc.
instead only generate features for features known by
sensors_feature_get_type()
-Sort the list of found features logically instead of sorted in alphabet order
of the sysfs entry. So now it starts with all in entries, then all fan and
then all temp. Just like the order of most entries in lib/chips.c. Also
this means that it now contains in0 - in10 in that order and not in0, in10,
in1 - in9
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4368 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
abituguru seems to work well with the new dynamic chip support and generic
chip printroutines. note: the abituguru code should be completly removed in
the future.
-comment k8temp entry in lib/chips.c and prog/sensors/main.c, as the
k8temp seems to work well with the new dynamic chip support and generic
chip printroutines. note: the k8temp code should be completly removed in
the future.
-make the match for the subtype exact instead of a strncmp, otherwise
an alarm_enable flag gets classified as an alarm, leading to all sensors who
have their alarm enabled getting an alarm reported, as the alarm_enabled gets
read as alarm.
-and do the same for the _input match to check if this is a main or subfeature
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4367 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
| |
Schlarmann, as the version I committed wasn't the latest version
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4366 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
| |
routines which showed up while testing with the abituguru driver
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4364 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
| |
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4360 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
memory as part of another structure. This rather large patch fixes that by
making the smaller piece an explicit member of the larger.
I brought this patch into sync with the latest SVN, and tested it by comparing
objects files from the tree pre- and post- patch.
The remaining 99% of the credit goes to Bob Schlärmann <bob2@dsv.nl> for
creating the original patch... thanks Bob!
* Bob Schlärmann <bob2@dsv.nl> [2006-12-24 18:29:39 +0100]:
> The following patch changes all of the lib/chips.c entries and any function
> that uses sensors_chip_feature. Most of the conversion was done through a
> perl script, so if you don't agree with the syntax it'll be easy to change.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4287 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
| |
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4266 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
| |
This closes ticket #2157.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4264 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
|
| |
I2C algorithms no longer have names in Linux 2.6, and anyway they are
implementation details user-space doesn't care about. No third party
application is known to have ever used this particular feature of
libsensors. "sensord" and "sensors" no longer do.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4208 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
| |
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4098 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
|
|
| |
First ran .../scripts/Lindent from Linux 2.6.x, then fixed up some
things that were particularly ugly. Verified the final result by
rebuilding and running 'objdump -d' on the before and after; there
were no differences.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4073 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
| |
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3113 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds the files lib/sysfs.h and lib/sysfs.c, beginning with a rewrite
of the sysfs detection code (using libsyfs). In the process, I replaced two
poorly named globals with better names, and moved them to sysfs.c. The sysfs
detection now happens very early during library init, rather than later.
The long term plan is for the two global variables to disappear anyway, as
everything to do with sysfs should get moved into lib/sysfs.c.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3093 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
| |
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3080 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
| |
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3031 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
| |
("set lines") to go unnoticed. lm78's fan3_div (which is read-only
but stored in a R/W file in procfs) was one of them.
Make sensors' error message in this case more explicit.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2692 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Current gcc versions warn when type punning is used, as this breaks the
> strict aliasing analysis gcc 3.3 does by default. When checking the causes
> for these warnings I discovered that sensors_malloc_array,
> sensors_free_array, sensors_add_array_el and sensors_add_array_els in
> lib/general.c all take a 'void **' for the list. This is plain wrong as
> the C standard only allow 'char *' and 'void *' to alias any other type, so
> if these functions should take a generic pointer, it *must* be a 'void *'
> that's internally cast to a 'void **'.
>
> The attached patch does this and adapts all places where these functions are
> called. Note that when done correctly, no cast what-so-ever in the calling
> code is needed.
>
> The patch is against current lm_sensors2 cvs version.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2345 7894878c-1315-0410-8ee3-d5d059ff63e0
|
|
|
|
| |
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2060 7894878c-1315-0410-8ee3-d5d059ff63e0
|