Commit Graph

8 Commits (ec5e1a4b8faa6a3522171a185a5c6ac9609e14b4)

Author SHA1 Message Date
Hans de Goede bc8f0a2685 hwmon/abituguru: Fix unchecked return status
Fix an unused return value warning for the abituguru driver.
Also make sure the sysfs files are created before we register with
the hwmon class, and delete the sysfs files on driver removal.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-02-14 21:15:05 +01:00
Al Viro f6a570333e [PATCH] severing module.h->sched.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-12-04 02:00:22 -05:00
Hans de Goede 360b9ab220 abituguru: Add suspend/resume support
This patch contains rudimentary suspend / resume support for the uguru,
this protects the uguru and the driver against suspend / resume cycles,
so there is no reason to unload the driver in your suspend / resume
scripts.

Only include suspend / resume functions when CONFIG_PM is set.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:31:14 -07:00
Hans de Goede faf9b61632 [PATCH] hwmon: abituguru timeout fixes
This patch contains 2 sets of fixes for the abituguru:
 1) Much improved timeout handling, drasticly reducing the amount of
    timeout errors on some motherboards
 2) Fix the exit paths in the bank1 sensor type detect code to always
    restore the original settings even on an error. Without this our
    special test settings could remain seriously confusing the system
    BIOS's setup menu.

Both are very much related and are must haves, to avoid messing up the
uguru CMOS settings.

Detailed changes:
- Much improved timeout / wait for status handling. Many thanks to Sunil
  Kumar, for all his testing, ideas and patches! The code now first busy
  waits, polling the uguru for the expected status as this usually
  succeeds pretty quickly (within 90 reads). To avoid unnecessary CPU burn
  in timeout conditions, the amount of busy waiting has been halved from
  previous versions (120 tries instead of 250). This is not a problem,
  because this version goes to sleep after 120 attemps for 1 jiffy and
  then tries again, it does this sleep and try again 5 times before
  finally giving up. This (almost?) completly removes the timeout errors
  some people have seen regulary. Apparently some older uguru versions
  sometimes are distracted for a (relatively) long time. This solves this.
- These timeout errors not only occur in the sending address part of
  reading the uguru but also in the wait for read state, so errors in
  this state are now handled as retryable just like send address state
  errors and are only logged and reported to userspace if 3 executive
  tries fail.
- Fix a very nasty bug in the bank1 sensor type detection code, where it
  would not restore the original settings in any of the error paths!
- Since not successfully restoring the original settings can seriously
  confuse the system BIOS (hang when entering the relevant setup menu),
  we now try restoring them 3 times before giving up.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-26 13:05:19 -07:00
Hans de Goede 9b2ad12982 [PATCH] hwmon: Fix for first generation Abit uGuru chips
Now that the abituguru driver is seeing some more widespread testing
it has turned out that one the first generation of Abit uGuru
motherboards, with uGuru revision 1, the autodetect bank1 sensor type
code doesn't (always) work. This patch adds a module param to override
the autodetect, and it adds validity checks for the value of the 2
other autodetection override module params. An example of howto use
the new param can be found here:
http://lm-sensors.org/wiki/Configurations/Abit/AN7

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 15:43:07 -07:00
Hans de Goede b7c066044f [PATCH] abituguru: Fix fan detection
One of my testers had a problem where the driver only saw 2 of the 4 fan
sensors his uGuru has, this fixes this.
 -accept 0x40 (bit 6) being high as a valid fan sensor setting for all fans
  not just fan 1, I have a feeling this bit indicates whether or not a fan is
  actually connected .

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-22 11:10:34 -07:00
Hans de Goede a2392e0b90 [PATCH] abituguru: Review fixes
Fixes to the Abit uGuru driver as requested in review by Jean Delvare:
 - exactly calculate the sysfs_names array length using macro
 - use snprintf when generating names to double check that the sysfs_names
   array does not overflow.
 - use ARRAY_SIZE and / or defines to determine number of loops in for loops
   instead of using hardcoded values.
 - In abituguru_probe(), refactor the error path leaving a single call to kfree

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-22 11:10:34 -07:00
Hans de Goede f2b84bbceb [PATCH] abituguru: New hardware monitoring driver
New hardware monitoring driver for the Abit uGuru

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-22 11:10:34 -07:00