summaryrefslogtreecommitdiff
path: root/drivers/hwmon
AgeCommit message (Collapse)Author
2008-02-07hwmon: (lm80) Add individual alarm filesJean Delvare
The new libsensors needs these individual alarm files. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (lm80) De-macro the sysfs callbacksJean Delvare
Use standard dynamic sysfs callbacks instead of macro-generated functions. This makes the code more readable, and the binary smaller (by about 34%). As a side note, another benefit of this type of cleanup is that they shrink the build time. For example, this cleanup saves about 29% of the lm80 driver build time. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (lm80) Various cleanupsJean Delvare
* Drop trailing whitespace * Fold a long line * Rename new_client to client * Drop redundant initializations to 0 * Drop bogus comment Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (w83627hf) Refactor beep enable handlingJean Delvare
We can handle the beep enable bit as any other beep mask bit for slightly smaller code. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (w83627hf) Add individual alarm and beep filesJean Delvare
The new libsensors needs these individual alarm and beep files. The code was copied from the w83781d driver. I've tested the alarm files on a W83627THF. I couldn't test the beep files as the system in question doesn't have a speaker. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (w83627hf) Enable VBAT monitoringJean Delvare
If VBAT monitoring is disabled, enable it. Bug reported on the lm-sensors trac system: http://lm-sensors.org/ticket/2282 This is the exact same patch that was applied to the w83627ehf driver 6 months ago. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (w83627ehf) The W83627DHG has 8 VID pinsJean Delvare
While the W83627EHF/EHG has only 6 VID pins, the W83627DHG has 8 VID pins, to support VRD 11.0. Add support for this. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (asb100) Add individual alarm filesJean Delvare
The new libsensors needs these individual alarm files. I did not create alarm files for in5 and in6 as these alarms are documented as not working. 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>
2008-02-07hwmon: (asb100) De-macro the sysfs callbacksJean Delvare
Use standard dynamic sysfs callbacks instead of macro-generated wrappers. This makes the code more readable, and the binary smaller (by about 12%). 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>
2008-02-07hwmon: (asb100) Various cleanupsJean Delvare
* Drop history, it's incomplete and doesn't belong there * Drop unused version number * Drop trailing spaces * Coding style fixes * Fold long lines * Rename new_client to client * Drop redundant initializations to 0 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>
2008-02-07hwmon: VRM is not written to registersJean Delvare
What was true of reading the VRM value is also true of writing it: not being a register value, it doesn't need hardware access, so we don't need a reference to the i2c client. This allows for a minor code cleanup. As gcc appears to be smart enough to simplify the generated code by itself, this cleanup only affects the source code, the generated binaries are unchanged. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (dme1737) fix Super-IO device ID overrideJuerg Haefliger
The dme1737 has a second place where the Super-IO device ID is checked. This has been missed by Jean's initial patch that adds support for user-controlled Super-IO device ID override. This patch fixes this issue. Signed-off-by: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (dme1737) fix divide-by-0Juerg Haefliger
This patch fixes a possible divide-by-0 and a minor bug in the FAN_FROM_REG macro (in TPC mode). Signed-off-by: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (abituguru3) Add AUX4 fan input for Abit IP35 ProSergey Vlasov
Abit IP35 Pro has 6 fan connectors (CPU, SYS and AUX1-4), but the entry for AUX4 was missing from the table. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: Add support for Texas Instruments/Burr-Brown ADS7828Steve Hardy
Signed-off-by: Steve Hardy <steve@linuxrealtime.co.uk> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (adm9240) Add individual alarm filesJean Delvare
The new libsensors needs these individual alarm files. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Grant Coady <gcoady.lk@gmail.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (lm77) Add individual alarm filesJean Delvare
The new libsensors needs this. As the old library never had support for the lm77 driver, I even dropped the legacy "alarms" file. 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>
2008-02-07hwmon: Discard useless I2C driver IDsJean Delvare
Many I2C hwmon drivers define a driver ID but no other code references these, meaning that they are useless. Discard them, along with a few IDs which are defined but never used at all. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (lm85) Make the pwmN_enable files writableJean Delvare
Make the pwmN_enable files writable. This makes it possible to use standard fan speed control tools (pwmconfig, fancontrol) with the lm85 driver. I left the non-standard pwmN_auto_channels files in place, as they give additional control for the automatic mode, and some users might be used to them by now. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (lm85) Return standard values in pwmN_enableJean Delvare
The values returned by the lm85 driver in pwmN_enable sysfs files do not match the standard. Fix that. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (adm1031) Add individual alarm and fault filesJean Delvare
The new libsensors needs these. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (adm1031) Get rid of macro-generated wrappersJean Delvare
Use the standard dynamic sysfs callbacks instead of macro-generated wrappers. It makes the code more simple and the binary smaller (-8% on my system.) Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (adm1031) Various cleanupsJean Delvare
* Rename new_client to client * Drop redundant initializations to 0 * Drop trailing space * Other whitespace cleanups * Split/fold a few long lines * Constify static data * Optimizations in set_fan_div() Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (adm1031) Fix register overwrite in set_fan_div()Jean Delvare
Don't rely on the register cache when setting a new fan clock divider. For one thing, the cache might not have been initialized at all if the driver has just been loaded. For another, the cached values may be old and you never know what can happen in the driver's back. Also invalidate the cache instead of trying to adjust the measured fan speed: the whole point of changing the clock divider is to get a better reading. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (it87) Delete pwmN_freq files on driver removalJean Delvare
In commit f8d0c19a93cea3a26a90f2462295e1e01a4cd250 I forgot to delete the pwmN_freq files on driver removal, here's the fix. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Riku Voipio <riku.voipio@movial.fi> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (w83781d) Misc cleanupsJean Delvare
* Drop unused defines * Drop unused driver ID * Remove trailing whitespace Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (w83781d) Drop W83627HF supportJean Delvare
The W83627HF hardware monitoring features are supported by the w83627hf driver for several years now. Support by the w83781d has been advertised as deprecated 6 months ago, it's about time to see it go. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (adm1026) Don't create files for missing inputsJean Delvare
On the ADM1026, pins 27 and 28 can be used for two different functions: either temp3, or in8+in9. We should only create the sysfs files for the function that is configured, otherwise it is confusing for the user. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (adm1026) More cleanups (updated)Jean Delvare
Various cleanups: * Drop an unused define. * Drop unused struct member "type". * Drop one useless instruction. * Drop redundant initializations to 0. * Rename new_client to client. * Drop a useless cast. * Minor code cleanup. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (adm1026) Whitespace cleanupsJean Delvare
Whitespace cleanups only: * Trim trailing whitespace. * Use tabs for indentation and alignment. * Add missing space after commas. * Remove extra spaces. No functional change, binary is identical before and after this patch. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (adm1026) Add individual alarm filesJean Delvare
The new libsensors needs these. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (it87) Add individual alarm filesJean Delvare
The new libsensors needs this. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (it87) Discard a dead e-mail addressJean Delvare
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (adt7470) Support per-sensor alarm filesDarrick J. Wong
Remove the old alarms hack and replace it with per-sensor alarm files. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (fschmd) Read voltage scaling factors from BIOS DMIHans de Goede
This patch adds support to the fschmd driver for reading the voltage scaling factors from BIOS DMI tables, as specified in the Siemens datasheet. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: Let the user override the detected Super-I/O device IDJean Delvare
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>
2008-02-07hwmon: (vt8231) Add missing "space"Joe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (gl520sm) Add individual alarm and beep filesJean Delvare
libsensors 3.0 needs these. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (gl520sm) De-macro the sysfs callbacksJean Delvare
Use standard dynamic sysfs callbacks instead of macro-generated wrappers. This makes the code more readable, and the binary smaller (by about 11%). Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (gl520sm) Put register addresses in arraysJean Delvare
This allows for some code refactoring, making the binary slightly smaller. This is also required to use dynamic sysfs callbacks for voltage and temperature files. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (gl520sm) Various cleanupsJean Delvare
* Drop trailing spaces * Drop unused driver ID * Drop stray backslashes in macros * Rename new_client to client * Drop redundant initializations to 0 Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (lm90) Use generic i2c reads during detectionJean Delvare
As indirectly reported by Olof Johansson, the lm90 driver uses a custom i2c read function even during detection, at which point we don't know yet what device we're talking with. It would make more sense to only use the generic i2c read function at this point, so that we don't log irrelevant errors on misdetection. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (gl518sm) Fix the reported fan speedJean Delvare
The fan speeds reported by the gl518sm driver are twice as much as they should. It's currently reporting the number of pulses per minute, not rotations per minute, while typical fans emit two pulses per rotation. This explains why all reports with this driver had very high speed values (between 9000 to 12000 RPM). Odd that nobody ever actually complained about this bug. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (gl518sm) Report error on invalid fan div valueJean Delvare
If the user attempts to write a fan clock divider not supported by the chip, an error should be returned. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (gl518sm) Add individual alarm and beep filesJean Delvare
The new libsensors needs these. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (gl518sm) Refactor fan functionsJean Delvare
This makes the code more readable and the binary smaller (by 5% or so). Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (gl518sm) Don't create sysfs files for missing featuresJean Delvare
The early revisions of the GL518SM do not report voltage values for the first 3 voltage channels. We should not create sysfs attributes for these missing features. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (gl518sm) Various cleanupsJean Delvare
* Drop history, it doesn't belong there * Drop unused struct member * Drop bogus struct member comment * Drop unused driver ID * Rename new_client to client * Drop redundant initializations to 0 * Drop useless cast * Drop trailing space * Fix comment * Drop duplicate comment Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (fschmd) Discard non-ASCII charactersJean Delvare
Somehow non-ASCII characters managed to sneak into the fschmd driver. Kick them out. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-07hwmon: (adm1025) Various cleanupsJean Delvare
* Whitespace cleanups * Constify scaling constants * Fold long lines * Drop redundant initializations to 0 * Rename new_client to just client * Use sysfs_create_group() * Drop a useless comment Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>