aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-01-08hwmon: (via-cputemp) Use pr_fmt and pr_<level>Joe Perches1-5/+5
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (smsc47m1) Use pr_fmt and pr_<level>Joe Perches1-16/+15
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (smsc47b397) Use pr_fmt and pr_<level>Joe Perches1-7/+6
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (sis5595) Use pr_fmt and pr_<level>Joe Perches1-5/+5
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (pkgtemp) Use pr_fmt and pr_<level>Joe Perches1-3/+4
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (pcf8591) Use pr_fmt and pr_<level>Joe Perches1-2/+3
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (lm70) Use pr_fmt and pr_<level>Joe Perches1-2/+3
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (lis3lv02d) Use pr_fmt and pr_<level>Joe Perches1-12/+11
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (ibmaem) Use pr_fmt and pr_<level>Joe Perches1-1/+3
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (core) Use pr_fmt and pr_<level>Joe Perches1-1/+3
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (hwmon-vid) Use pr_fmt and pr_<level>Joe Perches1-5/+6
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (hp_accel) Use pr_fmt and pr_<level>Joe Perches1-6/+7
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (f71882fg) Use pr_fmt and pr_<level>Joe Perches1-11/+12
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (f71805f) Use pr_fmt and pr_<level>Joe Perches1-16/+13
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (dme1737) Use pr_fmt and pr_<level>Joe Perches1-6/+6
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (coretemp) Use pr_fmt and pr_<level>Joe Perches1-5/+6
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (asus_atk0110) Use pr_fmt and pr_<level>Joe Perches1-3/+4
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (asb1000) Use pr_fmt and pr_<level>Joe Perches1-4/+5
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (adt7470) Use pr_fmt and pr_<level>Joe Perches1-1/+3
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (abituguru3) Use pr_fmt and pr_<level>Joe Perches1-26/+19
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Added a few static strings to standardize logging messages. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-08hwmon: (abituguru) Use pr_fmt and pr_<level>Joe Perches1-19/+17
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Added a few static strings to standardize logging messages. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-01-02hwmon: (s3c-hwmon) Fix compilationMaurus Cuelenaere1-2/+0
The owner field was removed from struct attribute in 6fd69dc578fa0b1bbc3aad70ae3af9a137211707, so don't assign it anymore. Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-12-14Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/stagingLinus Torvalds1-2/+2
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging: hwmon: (ltc4215) make sysfs file match the alarm cause
2010-12-13hwmon: (ltc4215) make sysfs file match the alarm causeIra W. Snyder1-2/+2
The ltc4215 driver used the chip's "power good" status bit to provide the power1_alarm file. This is wrong: the chip is really reporting the status of one of the monitored voltages. Change the sysfs file from power1_alarm to in2_min_alarm instead. This matches the voltage that the chip is raising an alarm for. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-12-08hwmon: (adm1026) Allow 1 as a valid divider valueGabriele Gorla1-3/+1
Allow 1 as a valid div value as specified in the ADM1026 datasheet. Signed-off-by: Gabriele Gorla <gorlik@penguintown.net> Cc: stable@kernel.org Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-12-08hwmon: (adm1026) Fix setting fan_divGabriele Gorla1-7/+9
Prevent setting fan_div from stomping on other fans that share the same I2C register. Signed-off-by: Gabriele Gorla <gorlik@penguintown.net> Cc: stable@kernel.org Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-12-08hwmon: (it87) Fix manual fan speed control on IT8721FJean Delvare1-16/+45
The manual fan speed control logic of the IT8721F is much different from what older devices had. Update the code to properly support that. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-11-22hwmon: (lis3lv02d_i2c) Fix compile warningsGuenter Roeck1-6/+4
This commit fixes the following compile warnings. From v2.6.37-rc2/m68k/m68k-allmodconfig, v2.6.37-rc2/powerpc/powerpc-randconfig: drivers/hwmon/lis3lv02d_i2c.c:222: warning: 'lis3_i2c_runtime_suspend' defined but not used drivers/hwmon/lis3lv02d_i2c.c:231: warning: 'lis3_i2c_runtime_resume' defined but not used Seen if CONFIG_PM_RUNTIME is not set. From v2.6.37-rc2/sh4/sh-allyesconfig: drivers/hwmon/lis3lv02d_i2c.c:191: warning: 'lis3lv02d_i2c_suspend' defined but not used drivers/hwmon/lis3lv02d_i2c.c:201: warning: 'lis3lv02d_i2c_resume' defined but not used Seen if CONFIG_PM is set but CONFIG_PM_SLEEP is not. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Acked-by: Jean Delvare <khali@linux-fr.org>
2010-11-22hwmon: (i5k_amb) Fix compile warningGuenter Roeck1-0/+2
This patch fixes the following compile warning. drivers/hwmon/i5k_amb.c:500: warning: 'i5k_amb_ids' defined but not used The warning is seen if the driver is built into the kernel (not as module). Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Acked-by: Jean Delvare <khali@linux-fr.org>
2010-11-15hwmon: (w83795) Check for BEEP pin availabilityJean Delvare1-7/+51
On the W83795ADG, there's a single pin for BEEP and OVT#, so you can't have both. Check the configuration and don't create beep attributes when BEEP pin is not available. The W83795G has a dedicated BEEP pin so the functionality is always available there. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-11-15hwmon: (w83795) Clear intrusion alarm immediatelyJean Delvare1-0/+4
When asked to clear the intrusion alarm, do so immediately. We have to invalidate the cache to make sure the new status will be read. But we also have to read from the status register once to clear the pending alarm, as writing to CLR_CHS surprising won't clear it automatically. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-11-15hwmon: (w83795) Read the intrusion state properlyJean Delvare1-3/+20
We can't read the intrusion state from the real-time alarm registers as we do for all other alarm flags, because real-time alarm bits don't stick (by definition) and the intrusion state has to stick until explicitly cleared (otherwise it has little value.) So we have to use the interrupt status register instead, which is read from the same address but with a configuration bit flipped in another register. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-11-15hwmon: (w83795) Print the actual temperature channels as sourcesJean Delvare1-10/+20
Don't expose raw register values to user-space. Decode and encode temperature channels selected as temperature sources as needed. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-11-15hwmon: (w83795) List all usable temperature sourcesJean Delvare1-3/+54
Temperature sources are not correlated directly with temperature channels. A look-up table is required to find out which temperature sources can be used depending on which temperature channels (both analog and digital) are enabled. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-11-15hwmon: (w83795) Expose fan control methodJean Delvare1-1/+18
Expose fan control method (DC vs. PWM) using the standard sysfs attributes. I've made it read-only as the board should be wired for a given mode, the BIOS should have set up the chip for this mode, and you shouldn't have to change it. But it would be easy enough to make it changeable if someone comes up with a use case. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-11-15hwmon: (w83795) Fix fan control mode attributesJean Delvare1-10/+8
There were two bugs: * Speed cruise mode was improperly reported for all fans but fan1. * Fan control method (PWM vs. DC) was mixed with the control mode. It will be added back as a separate attribute, as per the standard sysfs interface. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-11-15hwmon: (lm95241) Check validity of input valuesJean Delvare1-5/+14
This clears the following build-time warnings I was seeing: drivers/hwmon/lm95241.c: In function "set_interval": drivers/hwmon/lm95241.c:132:15: warning: ignoring return value of "strict_strtol", declared with attribute warn_unused_result drivers/hwmon/lm95241.c: In function "set_max2": drivers/hwmon/lm95241.c:278:1: warning: ignoring return value of "strict_strtol", declared with attribute warn_unused_result drivers/hwmon/lm95241.c: In function "set_max1": drivers/hwmon/lm95241.c:277:1: warning: ignoring return value of "strict_strtol", declared with attribute warn_unused_result drivers/hwmon/lm95241.c: In function "set_min2": drivers/hwmon/lm95241.c:249:1: warning: ignoring return value of "strict_strtol", declared with attribute warn_unused_result drivers/hwmon/lm95241.c: In function "set_min1": drivers/hwmon/lm95241.c:248:1: warning: ignoring return value of "strict_strtol", declared with attribute warn_unused_result drivers/hwmon/lm95241.c: In function "set_type2": drivers/hwmon/lm95241.c:220:1: warning: ignoring return value of "strict_strtol", declared with attribute warn_unused_result drivers/hwmon/lm95241.c: In function "set_type1": drivers/hwmon/lm95241.c:219:1: warning: ignoring return value of "strict_strtol", declared with attribute warn_unused_result This also fixes a small race in set_interval() as a side effect: by working with a temporary local variable we prevent data->interval from being accessed at a time it contains the interval value in the wrong unit. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Davide Rizzo <elpa.rizzo@gmail.com>
2010-11-15hwmon: Change mail address of Hans J. KochHans J. Koch3-4/+4
My old mail address doesn't exist anymore. This changes all occurrences to my new address. Signed-off-by: Hans J. Koch <hjk@hansjkoch.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-11-11hwmon: (gpio-fan) Fix fan_ctrl_init error pathAxel Lin1-4/+4
In current implementation, the sysfs entries is not removed before return -ENODEV. Creating the sysfs attribute should be the last thing done by the function, after all the rest has been successful. Otherwise there is a small window during which user-space can access the attribute but the driver isn't ready to deal with the requests. Fix it by moving sysfs_create_group to be the last thing done by the function. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Simon Guinot <sguinot@lacie.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-11-11hwmon: (ad7414) Return proper error code for ad7414_probe()Axel Lin1-2/+4
Return proper error if i2c_check_functionality reports the adapter does not support the capability we need. Also remove unneeded initialization for err variable. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sean MacLennan <smaclennan@pikatech.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-11-11hwmon: (adt7470) Return proper error code for adt7470_probe()Axel Lin1-1/+3
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-11-05hwmon: (ltc4261) Fix error message formatJean Delvare1-2/+1
adapter->id is deprecated and not set by any adapter driver, so this was certainly not what the author wanted to use. adapter->nr maybe, but as dev_err() already includes this value, as well as the client's address, there's no point repeating them. Better print a simple error message in plain English words. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-11-05hwmon: (ltc4261) Add missing newline in debug messageGuenter Roeck1-1/+1
Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Acked-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (it87) Add support for the IT8721F/IT8758EJean Delvare2-24/+96
Add support for the IT8721F/IT8758E. These new chips differ from the older IT87xxF chips in the following ways: * ADC LSB is 12 mV instead of 16 mV. * PWM values are 8-bit instead of 7-bit. There are other minor changes we don't have to care about in the driver. Another change is that we will handle internal voltage scaling in the driver instead of delegating the work to user-space. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (it87) Move conversion functionsJean Delvare1-50/+52
Move conversion functions until after structure defintions. This is needed for future changes which make use of the structures in the conversion funtcions. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: Remove many EXPERIMENTAL flagsJean Delvare1-16/+12
Remove the dependency on EXPERIMENTAL for all drivers which are in the kernel tree for a long time, are known to work properly and for which we have documentation. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Cc: Riku Voipio <riku.voipio@iki.fi> Cc: Juerg Haefliger <juergh@gmail.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-10-28hwmon: (lm85) Add support for ADT7468 high-frequency PWM modeJean Delvare1-7/+28
The ADT7468 supports a high-frequency PWM output mode where all PWM outputs are driven by a 22.5 kHz clock. Add support for this mode, and document it, as it may surprise the user that setting one PWM output frequency also affects the other PWM outputs. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Darrick J. Wong <djwong@us.ibm.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-10-28hwmon: (lm85) Document the ADT7468 as supportedJean Delvare1-1/+2
Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Darrick J. Wong <djwong@us.ibm.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-10-28hwmon: (lm85) Fix ADT7468 frequency tableJean Delvare1-0/+1
The ADT7468 uses the same frequency table as the ADT7463. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org Cc: Darrick J. Wong <djwong@us.ibm.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-10-28hwmon: I2C addresses are constantJean Delvare3-5/+5
We can mark normal_i2c const. Almost all drivers do that already, so fix the 3 remaining ones before they are used as (bad) examples for new drivers. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: George Joseph <george.joseph@fairview5.com> Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com>