2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 14:25:39 +00:00
Commit Graph

1204 Commits

Author SHA1 Message Date
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
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
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
834cd70e14 Drop redundant test.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4632 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-20 19:09:00 +00:00
Jean Delvare
70317e1a0e The way we use sensors_feature_get_type() is rather suboptimal. It is
first called during the library initialization to generate the feature
tables. Then it is called again by sensors itself. This is because we
do not store the result the first time. I propose that we add a type
field to struct sensors_feature_data, where libsensors would store
the result of sensors_feature_get_type(). That way, the application
can get the information without calling sensors_feature_get_type()
again.

This change has the following benefits:
* Obviously, a small speed-up.
* sensors_feature_get_type() can be removed from the public interface.
  This means that we can turn it into something that fits the
  libsensors needs better, allowing for more optimizations (see next
  patches.)

Note: the patch looks bigger that it really is, because I had to move
definitions around in sensors.h.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4629 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-19 20:46:09 +00:00
Jean Delvare
d73a25b166 Don't sort the same list twice.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4611 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-14 16:32:56 +00:00
Jean Delvare
c100b4f38b Don't add non-sensor I2C chips to the list of detected I2C chips. Even
if we discard them later, their presence in the list can prevent the
"no sensors found" event from triggering. It also causes the script to
suggest loading i2c bus drivers which are not needed for hardware
monitoring.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4610 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-14 16:29:52 +00:00
Jean Delvare
356e03f000 Add missing static marker.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4605 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-13 11:05:43 +00:00
Jean Delvare
02b58be2e8 Add Fintek F71806FG and F71862FG detection.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4604 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-10 21:09:32 +00:00
Jean Delvare
7b8fdf0188 Advertise and document libsensors_version.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4602 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-10 19:55:06 +00:00
Jean Delvare
e45b873981 Delete unused function sensors_get_sub_feature_by_type().
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4598 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-09 11:20:47 +00:00
Jean Delvare
867b8453f2 Add more known SMSC Super IO chips to sensors-detect. Also sort
the list of SMSC chips by chip name. Patch from Juerg Haefliger.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4597 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-08 20:54:33 +00:00
Hans de Goede
712748f659 Handle chips who return the beta value as temp sensor type
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4595 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-08 18:59:16 +00:00
Jean Delvare
a83ef92c9a Delete mkdev.sh. i2c device nodes are created by devfs or udev on most
2.6 kernel-based systems, for others they should have been created at
system installation time. If they are missing, sensors-detect will run
MAKEDEV to create them.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4593 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-08 12:00:55 +00:00
Jean Delvare
982afbce24 Only write integer values to pwm files.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4591 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-08 11:17:26 +00:00
Jean Delvare
cd0b8c3489 Delete fancontrol.pl. The reason given when it was added was that the
bash implementation was spawning too many child processes, and that
was true, but this has been addressed since. And I don't particularly
enjoy maintaining two scripts doing exactly the same thing.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4590 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-08 10:13:11 +00:00
Jean Delvare
759098c8f8 Use linear interpolation instead of quadratic to choose PWM values.
This is simpler and will work better in most cases. For example this
should address at least part of ticket #2224. It seems that quadratic
was used to lower the average noise level, but I don't think this is a
valid reason. The new MINPWM and MAXPWM parameters will also let the
user control the noise level if really needed.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4589 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-08 10:04:48 +00:00
Hans de Goede
caa92d7b1e add check for /dev/MAKEDEV
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4587 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-08 05:56:43 +00:00
Jean Delvare
d33285b3b0 Cleanup the module.conf / modprobe.conf selection code.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4585 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-07 20:04:59 +00:00
Jean Delvare
3549a94232 Right-align FAULT flags.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4578 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-07 15:26:12 +00:00
Hans de Goede
d2c3d2d14f try to run MAKEDEV if i2c-dev device files are missing before aborting (adapted fedora patch)
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4572 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-06 19:40:44 +00:00
Hans de Goede
9fb93e1ff9 handle /usr/bin location of sensors command in example scripts printed by sensors-detect
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4569 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-06 19:24:57 +00:00
Hans de Goede
1864d90513 also recognise /etc/modprobe.conf (Fedora patch)
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4567 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-06 19:14:18 +00:00
Hans de Goede
b1281bf669 improve generic print of temp inputs with so many limits they span 2 lines
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4564 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-06 13:19:00 +00:00
Jean Delvare
e17f73da24 Fix ADM1022 detection.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4562 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-06 09:54:10 +00:00
Hans de Goede
4d2fa4eadd Better generic print fault handling
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4559 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-05 21:03:06 +00:00
Jean Delvare
83fe82736d Prevent a potential array overrun.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4556 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-05 16:19:51 +00:00
Hans de Goede
b998b35ecc update fintek f71882fg sensors-detect entry
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4555 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-05 16:15:27 +00:00
Hans de Goede
7cb36ef6d2 add AMDSI PECI sensortype support to generic_temp_print()
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4552 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-05 11:22:57 +00:00
Hans de Goede
3e37149f04 generic in and fan print routine fixes
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4549 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-03 19:38:37 +00:00
Jean Delvare
b79274babd Add some more warning flags, and fix these warnings.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4545 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-03 16:03:22 +00:00
Jean Delvare
7cc03f5029 Drop VRM reporting and selection support from libsensors. Since kernel
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
2007-07-03 13:22:28 +00:00
Jean Delvare
5b8b0a0ede Drop a bogus comment.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4534 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-02 15:16:02 +00:00
Jean Delvare
0c96adf025 Clean up Savage bus driver entries: remove the unsuppored devices from
the list, and mention the i2c-prosavage driver.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4533 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-06-30 17:04:32 +00:00
Jean Delvare
8c92ac1096 Drop all references to non-sensor chips. We will still detect some of these
(in particular SPD and EDID EEPROMS) at addresses where hardware monitoring
chips are known to live, to prevent misdetections, but we no longer point
the user to drivers for these chips.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4529 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-06-30 15:21:46 +00:00
Jean Delvare
1ba9c1837d Delete the matorb support script. The matorb driver was never ported to
Linux 2.6, and has nothing to do with sensors anyway.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4526 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-06-30 13:40:40 +00:00
Hans de Goede
184ad7e23e long promised print_generic_chip_in() fixes
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4514 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-06-28 21:00:08 +00:00
Jean Delvare
4c905e1632 Drop the --generic option. This is the default now, so the option has
no effect.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4512 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-06-28 17:47:18 +00:00
Jean Delvare
a6c3c36f00 Warning fix ("index" is a standard libc function.)
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4511 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-06-28 14:46:08 +00:00
Jean Delvare
56e9e2da88 Delete needless forward declarations and wrapper.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4505 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-06-28 09:02:12 +00:00
Jean Delvare
6a6cf217d4 Drop all the chip-specific handling and printing code from sensors. The
generic printing code should work now, and what doesn't work, will get
fixed.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4503 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-06-28 08:52:37 +00:00
Jean Delvare
28ba499f12 Move py-smbus to the i2c-tools package.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4497 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-06-27 13:03:44 +00:00
Jean Delvare
f51bf1e7b9 Move the eeprom writing tools to the i2c-tools package.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4494 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-06-27 12:53:02 +00:00
Jean Delvare
d5cc9ae889 Move the eeprom decoding scripts to the i2c-tools package.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4489 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-06-27 10:10:34 +00:00
Jean Delvare
d7b4debbf6 Move i2cdetect, i2cdump, i2cset and i2cget to a separate package
(i2c-tools).


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4480 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-06-27 08:10:19 +00:00
Jean Delvare
9ab400fad3 Add SMSC SCH5317 detection. Patch from Juerg Haefliger.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4479 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-06-26 20:34:18 +00:00
Jean Delvare
617e759d94 Make sensors-detect no longer depend on i2cdetect. Parsing /proc/bus/i2c or
walking sysfs for the same information (i2c adapter names) is not that
difficult.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4472 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-06-26 07:47:30 +00:00
Jean Delvare
220aa2649a Discard irrelevant "CONFORMING TO" sections.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4471 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-06-26 06:24:23 +00:00