summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/f71882fg.c
Commit message (Collapse)AuthorAgeFilesLines
...
* hwmon: (f71882fg) Separate max and crit alarm and beepHans de Goede2009-01-071-9/+23
| | | | | | | | | | | | While studying the datasheets for adding F8000 support, I noticed that the F718x2 has separate alarms (and beep control) for its max and crit limits. We keep the temp#_alarm attributes as they are, even though it would be more logical to rename them to temp#_max_alarm. Because lm_sensors v2 depends on them. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (f71882fg) Check for hwmon powerdown stateHans de Goede2009-01-071-0/+5
| | | | | | | | | | More F8000 prep work. Take over the checking if the hwmon part is not powered down from the standalone f8000 driver. This check is valid for all supported models. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (f71882fg) Cleanup fan and temp hyst functionsHans de Goede2009-01-071-78/+43
| | | | | | | | | | Simplify fan and temp hyst. handling by treating the registers as an array of nibbles instead of using switch cases. Also unify the way hysts are handled between temp and fans, the temp code was storing the actual per temp hyst values in 4 u8's, where as the fan code was storing actual register values. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (f71882fg) Fix various sysfs callback function issuesHans de Goede2009-01-071-49/+73
| | | | | | | | | | | | | | | | | | | While working on adding F8000 support I noticed that various of the store sysfs functions (and a few of the show also) had issues. This patch fixes the following issues in these functions: * store: storing the result of strto[u]l in an int, resulting in a possible overflow before boundary checking * store: use of f71882fg_update_device(), we don't want to read the whole device in store functions, just the registers we need * store: use of cached register values instead of reading the needed regs in the store function, including cases where f71882fg_update_device() was not used, this could cause real isues * show: shown value is a calculation of 2 or more cached register reads, without locking the data struct. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (f71882fg) Prepare for adding F8000 supportHans de Goede2009-01-071-57/+60
| | | | | | | | | | | | | This patch is a preparation patch for adding F8000 support to the f71882fg driver. If you look at the register addresses and esp, the bits used for the temperature channels, then you will notice that it appears that they start at 1 in a system meant to start at 0. As the F8000 actually uses the 0 addresses and bits, this patch changes the f71882fg driver to take 4 temperatures numbered 0-3 in to account, using 1-3 in this new scheme for the temperatures actually present in the F718x2FG. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (f71882fg) Move some io access from the detect to the probe functionHans de Goede2009-01-071-23/+23
| | | | | | | | | The f71882fg driver did some io to ioports it hadn't reserved yet in its find (detect) function, this patches moves this io to the probe function where these ports are reserved and this io belongs. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (f71882fg) Add support for the F71862FG superio sensorsHans de Goede2009-01-071-72/+224
| | | | | | | | | | | This patch adds support for the Fintek f71862fg superio monitoring functions to the f71882fg driver. This support has been tested without problems on a Jetway J9F2 by Tony McConnell. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (f71882fg) Style cleanups and put some repeating code into functionsHans de Goede2009-01-071-48/+41
| | | | | | | | Various small cleanups as preparation for adding f71862fg support to the f71882fg driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (f71882fg) Add PWM supportMark van Doesburg2009-01-071-1/+655
| | | | | | | | | | | Add PWM (fan speed control) support to the f71882fg driver. Both manual control and automatic (temperature-based) modes are supported. Additionally, each mode has a PWM-based and an RPM-based variant. By default we use the mode set by the BIOS. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Cc: Mark van Doesburg <mark.vandoesburg@hetnet.nl> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (f71882fg) Misc cleanupsMark van Doesburg2009-01-071-5/+5
| | | | | | | | | A few cleanups that were originally part of a larger patch but are better submitted separately. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Cc: Mark van Doesburg <mark.vandoesburg@hetnet.nl> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (f71882fg) Use sensor_device_attribute_2Mark van Doesburg2009-01-071-92/+95
| | | | | | | | | | Convert f71882fg driver from SENSOR_ATTR to SENSOR_ATTR2 use, this is a preparation patch for adding pwm support, which is broken out to make what changes really in the pwm support patch clear. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Cc: Mark van Doesburg <mark.vandoesburg@hetnet.nl> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (f71882fg) Delete needless forward declarationsJean Delvare2008-08-061-6/+0
| | | | | | | | These functions aren't used before being defined, so there's no point in forward-declaring them. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
* hwmon: Let the user override the detected Super-I/O device IDJean Delvare2008-02-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | While it is possible to force SMBus-based hardware monitoring chip drivers to drive a not officially supported device, we do not have this possibility for Super-I/O-based drivers. That's unfortunate because sometimes newer chips are fully compatible and just forcing the driver to load would work. Instead of that we have to tell the users to recompile the kernel driver, which isn't an easy task for everyone. So, I propose that we add a module parameter to all Super-I/O based hardware monitoring drivers, letting advanced users force the driver to load on their machine. The user has to provide the device ID of a supposedly compatible device. This requires looking at the source code or a datasheet, so I am confident that users can't randomly force a driver without knowing what they are doing. Thus this should be relatively safe. As you can see from the code, the implementation is pretty simple and unintrusive. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
* hwmon: Convert from class_device to deviceTony Jones2007-10-091-5/+5
| | | | | | | | | Convert from class_device to device for hwmon_device_register/unregister Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
* hwmon: (f71882fg) trivial whitespace cleanupMark M. Hoffman2007-10-091-7/+7
| | | | Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
* hwmon: add support for Fintek F71882FG and F71883FGHans de Goede2007-10-091-0/+950
This is the second version of a new driver for the hardware monitoring features of the Fintek F71882FG and F71883FG Super-I/O chips. This version has several small fixes for flaws discovered during the review of the first version. This version of the driver does not support the pwm part of these chips (yet). I'll first design a sysfs api for this and post that for discussion, and then implement pwm support as an incremental patch over this one. This driver supports all sensors of this chip, except for the vid inputs. The vid inputs are somewhat documented in the datasheet, but I know nothing about vid/vrm stuff. Help with this would be much appreciated. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Acked-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
OpenPOWER on IntegriCloud