summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/fschmd.c
AgeCommit message (Collapse)Author
2013-04-07hwmon: Fix checkpatch warning 'quoted string split across lines'Guenter Roeck
Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Cc: Marc Hulsman <m.hulsman@tudelft.nl> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-01-25hwmon: Replace SENSORS_LIMIT with clamp_valGuenter Roeck
SENSORS_LIMIT and the generic clamp_val have the same functionality, and clamp_val is more efficient. This patch reduces text size by 9052 bytes and bss size by 11624 bytes for x86_64 builds. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: George Joseph <george.joseph@fairview5.com> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-27watchdog: nowayout is boolWim Van Sebroeck
nowayout is actually a boolean value. So make it bool for all watchdog device drivers. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2012-03-18hwmon: (fschmd) Fix checkpatch issuesGuenter Roeck
Fixed: ERROR: that open brace { should be on the previous line ERROR: trailing statements should be on next line WARNING: line over 80 characters WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul instead Modify multi-line comments to follow Documentation/CodingStyle. Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18hwmon: convert drivers/hwmon/* to use module_i2c_driver()Axel Lin
This patch converts the drivers in drivers/hwmon/* to use the module_i2c_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Cc: Dirk Eibach <eibach@gdsys.de> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Steve Glendinning <steve.glendinning@smsc.com> Cc: Riku Voipio <riku.voipio@iki.fi> Cc: Guillaume Ligneul <guillaume.ligneul@gmail.com> Cc: David George <david.george@ska.ac.za> Cc: "Hans J. Koch" <hjk@hansjkoch.de> Cc: Marc Hulsman <m.hulsman@tudelft.nl> Cc: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-12hwmon: (fschmd) Drop useless mutexJean Delvare
As discussed one year ago, the WDIOC_GETSUPPORT ioctl only needs a mutex because it operates on a static variable. There is no good reason to keep this variable static, so let's just make it non-static and drop the now useless mutex altogether. See the discussion at: http://marc.info/?l=lm-sensors&m=125563869402323&w=2 Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <hdegoede@redhat.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de>
2010-10-05drivers: autoconvert trivial BKL users to private mutexArnd Bergmann
All these files use the big kernel lock in a trivial way to serialize their private file operations, typically resulting from an earlier semi-automatic pushdown from VFS. None of these drivers appears to want to lock against other code, and they all use the BKL as the top-level lock in their file operations, meaning that there is no lock-order inversion problem. Consequently, we can remove the BKL completely, replacing it with a per-file mutex in every case. Using a scripted approach means we can avoid typos. These drivers do not seem to be under active maintainance from my brief investigation. Apologies to those maintainers that I have missed. file=$1 name=$2 if grep -q lock_kernel ${file} ; then if grep -q 'include.*linux.mutex.h' ${file} ; then sed -i '/include.*<linux\/smp_lock.h>/d' ${file} else sed -i 's/include.*<linux\/smp_lock.h>.*$/include <linux\/mutex.h>/g' ${file} fi sed -i ${file} \ -e "/^#include.*linux.mutex.h/,$ { 1,/^\(static\|int\|long\)/ { /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex); } }" \ -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \ -e '/[ ]*cycle_kernel_lock();/d' else sed -i -e '/include.*\<smp_lock.h\>/d' ${file} \ -e '/cycle_kernel_lock()/d' fi Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2010-05-17drivers: Push down BKL into various driversArnd Bergmann
These are the last remaining device drivers using the ->ioctl file operation in the drivers directory (except from v4l drivers). [fweisbec: drop i8k pushdown as it has been done from procfs pushdown branch already] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
2010-03-05hwmon: Fix off-by-one kind valuesJean Delvare
Recent changes on the I2C front have left off-by-one array indexes in 3 hwmon drivers. Fix them. Faulty commit: e5e9f44c2 i2c: Drop I2C_CLIENT_INSMOD_2 to 8 Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Andre Prendel <andre.prendel@gmx.de> Cc: stable@kernel.org
2010-01-25hwmon: (fschmd) Fix a memleak on multiple opens of /dev/watchdogHans de Goede
When /dev/watchdog gets opened a second time we return -EBUSY, but we already have got a kref then, so we end up leaking our data struct. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org
2009-12-14i2c: Drop I2C_CLIENT_INSMOD_2 to 8Jean Delvare
These macros simply declare an enum, so drivers might as well declare it themselves. This puts an end to the arbitrary limit of 8 chip types per i2c driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Wolfram Sang <w.sang@pengutronix.de>
2009-12-14i2c: Get rid of struct i2c_client_address_dataJean Delvare
Struct i2c_client_address_data only contains one field at this point, which makes its usefulness questionable. Get rid of it and pass simple address lists around instead. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Wolfram Sang <w.sang@pengutronix.de>
2009-12-14i2c: Drop the kind parameter from detect callbacksJean Delvare
The "kind" parameter always has value -1, and nobody is using it any longer, so we can remove it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Wolfram Sang <w.sang@pengutronix.de>
2009-12-09hwmon: Clean up detect functionsJean Delvare
As kind is now hard-coded to -1, there is room for code clean-ups. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Corentin Labbe <corentin.labbe@geomatys.fr> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Riku Voipio <riku.voipio@iki.fi> Acked-by: "Hans J. Koch" <hjk@linutronix.de> Cc: Rudolf Marek <r.marek@assembler.cz>
2009-10-24hwmon: (fschmd) Fix check on unsigned in watchdog_write()Roel Kluin
If unsigned the watchdog_trigger() return value will not be checked correctly. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-10-01const: constify remaining file_operationsAlexey Dobriyan
[akpm@linux-foundation.org: fix KVM] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-30hwmon: (fschmd) Add support for the FSC Hades ICHans de Goede
Add support for the Hades to the FSC hwmon driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-03-30hwmon: (fschmd) Add support for the FSC Syleus ICHans de Goede
Many thanks to Fujitsu Siemens Computers for providing docs and a machine to test the driver on. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-03-30dmi: Let dmi_walk() users pass private dataJean Delvare
At the moment, dmi_walk() lacks flexibility, users can't pass data to the callback function. Add a pointer for private data to make this function more flexible. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: Roland Dreier <rolandd@cisco.com>
2009-01-07Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6Linus Torvalds
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: (29 commits) hwmon: Fix various typos hwmon: Check for ACPI resource conflicts hwmon: (lm70) Add TI TMP121 support hwmon: (lm70) Code streamlining and cleanup hwmon: Deprecate the fscher and fscpos drivers hwmon: (fschmd) Add watchdog support hwmon: (fschmd) Cleanups for watchdog support hwmon: (i5k_amb) Load automatically on all 5000/5400 chipsets hwmon: (it87) Add support for the ITE IT8720F hwmon: Don't overuse I2C_CLIENT_MODULE_PARM hwmon: Add LTC4245 driver hwmon: (f71882fg) Fix fan_to/from_reg prototypes hwmon: (f71882fg) Printout fan modes hwmon: (f71882fg) Add documentation hwmon: (f71882fg) Fix auto_channels_temp temp numbering with f8000 hwmon: (f71882fg) Add missing pwm3 attr for f71862fg hwmon: (f71882fg) Add F8000 support hwmon: (f71882fg) Remove the fan_mode module option hwmon: (f71882fg) Separate max and crit alarm and beep hwmon: (f71882fg) Check for hwmon powerdown state ...
2009-01-07hwmon: (fschmd) Add watchdog supportHans de Goede
This patch adds support for the watchdog part found in _all_ supported FSC sensor chips. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-01-07hwmon: (fschmd) Cleanups for watchdog supportHans de Goede
Various small cleanups in preparation of adding watchdog support, mostly removing _MASK postfix from defines which are not masks. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-01-06trivial: fix then -> than typos in comments and documentationFrederik Schwarzer
- (better, more, bigger ...) then -> (...) than Signed-off-by: Frederik Schwarzer <schwarzerf@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-07-16hwmon: (fschmd) Convert to a new-style i2c driverJean Delvare
The new-style fschmd driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <j.w.r.degoede@hhs.nl>
2008-02-18hwmon: normal_i2c arrays should be constMark M. Hoffman
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: (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>
2007-10-11hwmon: Add new combined driver for FSC chipsHans de Goede
This patch adds a new merged driver for FSC sensor chips, it merges the fscher and fscpos drivers and adds support for the FSC Scylla, Heracles and Heimdall chips. 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>