summaryrefslogtreecommitdiffstats
path: root/drivers (follow)
Commit message (Collapse)AuthorAgeFilesLines
* watchdog: iTCO_wdt.c: remove extra pci_dev_put()'s from init codePrarit Bhargava2010-10-291-2/+0
| | | | | | | | | | | | | | | | The iTCO_wdt driver erroneously releases the pci_dev, and causes PCI hotremove to fail because of an incorrect usage count. The probe for this driver does a for_each_pci_dev() which gets a reference for a pci_dev when iTCO_wdt_init() is successful. The for_each_pci_dev() loop puts a reference for a pci_dev when iTCO_wdt_init() fails, so the iTCO_wdt_init() does not need to do any pci_dev_put()'s. The only pci_dev_put() that is required is in the iTCO_wdt_cleanup() function. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: add support for Broadcom BCM63xx built-in watchdogFlorian Fainelli2010-10-283-0/+361
| | | | | | | | | | This patch adds support for the Broadcom BCM63xx SoC built-in watchdog, it uses one of the BCM63xx hardware timer id. Signed-off-by: Miguel Gaio <miguel.gaio@efixo.com> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: f71808e_wdt: add support for the F71889FGGiel van Schijndel2010-10-282-3/+11
| | | | | | Signed-off-by: Giel van Schijndel <me@mortis.eu> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: MachZ: fix debug macroNicolas Kaiser2010-10-281-1/+1
| | | | | | | | Fix debug macro line wrapping. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: it8712f_wdt: Add module parameter for alternative reset sourcesTimo Juhani Lindfors2010-10-281-2/+11
| | | | | | | | | | | | | | | | | | | | On iEi PCISA-9652-R10 (BIOS version 1.5) single board computer reads from the game port do not seem to reset the watchdog timer. This patch adds a module parameter wdt_config_reg to specify alternative reset sources. At least WDT_RESET_KBD has been tested, even just running while true; do setleds -L +scroll sleep 1 setleds -L -scroll sleep 1 done is enough to keep the watchdog happy. Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: it8712f_wdt: Add comments for config/control register namesTimo Juhani Lindfors2010-10-281-6/+6
| | | | | | Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: it87_wdt: Add support for watchdogs with 8b timersOndrej Zajicek2010-10-282-28/+63
| | | | | | | | | | | | This patch adds support for watchdogs with 8b timers, like ones in IT8702F and older revisions of IT8712F Super IO chip, to it87_wdt driver. This patch should be used after the patch 'it87_wdt: Add support for IT8720F watchdog'. Signed-off-by: Ondrej Zajicek <santiago@crfreenet.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
* watchdog: it87_wdt: Add support for IT8720F watchdogOndrej Zajicek2010-10-282-10/+16
| | | | | | | | | | This simple patch adds support for a watchdog in IT8720F Super IO chip to it87_wdt driver. Signed-off-by: Ondrej Zajicek <santiago@crfreenet.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
* watchdog: Use static const char * const where possibleJoe Perches2010-10-281-1/+1
| | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: iTCO_wdt: Cleanup warning messagesPrarit Bhargava2010-10-281-9/+12
| | | | | | | | | | | | | | | | | | | | | | The current iTCO_wdt driver warnings are confusing. Currently when the device driver returns an error the console contains: iTCO_vendor_support: vendor-support=0 iTCO_wdt: Intel TCO WatchDog Timer Driver v1.05 iTCO_wdt: failed to reset NO_REBOOT flag, reboot disabled by hardware iTCO_wdt: No card detected After the patch, iTCO_vendor_support: vendor-support=0 iTCO_wdt: Intel TCO WatchDog Timer Driver v1.05 iTCO_wdt: failed to reset NO_REBOOT flag, device disabled by hardware/BIOS Clean this up and use the word "device" to describe the device. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: iTCO_wdt: TCO Watchdog patch for Intel Patsburg DeviceIDsSeth Heasley2010-10-281-0/+3
| | | | | | | | This patch adds the Intel Patsburg (PCH) DeviceIDs for iTCO Watchdog. Signed-off-by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* Merge branch 'hwmon-for-linus' of ↵Linus Torvalds2010-10-2821-504/+3165
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: (68 commits) hwmon: (it87) Add support for the IT8721F/IT8758E hwmon: (it87) Move conversion functions hwmon: Remove many EXPERIMENTAL flags hwmon: (lm85) Add support for ADT7468 high-frequency PWM mode hwmon: (lm85) Document the ADT7468 as supported hwmon: (lm85) Fix ADT7468 frequency table hwmon: I2C addresses are constant Move ams driver to macintosh hwmon: (pcf8591) Don't attempt to detect devices hwmon: (pcf8591) Register as a hwmon device hwmon: (w83795) Use standard attributes for chassis intrusion hwmon: (w83795) Exclude fan control feature by default hwmon: (w83795) Add myself as co-author and maintainer hwmon: (w83795) More style cleanups hwmon: (w83795) Fix LSB reading of voltage limits hwmon: (w83795) Use dev_get_drvdata() where possible hwmon: (w83795) Delay reading pwm config registers hwmon: (w83795) Delay reading limit registers hwmon: (w83795) Move register reads to dedicated functions hwmon: (w83795) Pack similar register reads ...
| * hwmon: (it87) Add support for the IT8721F/IT8758EJean Delvare2010-10-282-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>
| * hwmon: (it87) Move conversion functionsJean Delvare2010-10-281-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>
| * hwmon: Remove many EXPERIMENTAL flagsJean Delvare2010-10-281-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>
| * hwmon: (lm85) Add support for ADT7468 high-frequency PWM modeJean Delvare2010-10-281-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>
| * hwmon: (lm85) Document the ADT7468 as supportedJean Delvare2010-10-281-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>
| * hwmon: (lm85) Fix ADT7468 frequency tableJean Delvare2010-10-281-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>
| * hwmon: I2C addresses are constantJean Delvare2010-10-283-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>
| * Move ams driver to macintoshJean Delvare2010-10-2810-27/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | The ams driver isn't a hardware monitoring driver, so it shouldn't live under driver/hwmon. drivers/macintosh seems much more appropriate, as the driver is only useful on PowerBooks and iBooks. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Stelian Pop <stelian@popies.net> Cc: Michael Hanselmann <linux-kernel@hansmi.ch> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Grant Likely <grant.likely@secretlab.ca>
| * hwmon: (pcf8591) Don't attempt to detect devicesJean Delvare2010-10-281-26/+0
| | | | | | | | | | | | | | | | | | The PCF8591 can't be detected, don't even try. There are plenty of other means to instantiate i2c devices these days. Signed-off-by: Jean Delvare <khali@linux-fr.org> Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Aurelien Jarno <aurelien@aurel32.net>
| * hwmon: (pcf8591) Register as a hwmon deviceJean Delvare2010-10-281-0/+12
| | | | | | | | | | | | | | | | | | | | Register PCF8591 devices as hwmon devices. There's little point in implementing the standard sysfs interface if we don't register it in a way libsensors will pick it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Aurelien Jarno <aurelien@aurel32.net>
| * hwmon: (w83795) Use standard attributes for chassis intrusionJean Delvare2010-10-281-3/+8
| | | | | | | | | | | | | | | | | | Follow the standard attribute naming for the chassis intrusion feature. I couldn't test the beeping (my board apparently doesn't do that) but the alarm works fine. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
| * hwmon: (w83795) Exclude fan control feature by defaultJean Delvare2010-10-282-0/+27
| | | | | | | | | | | | | | | | | | | | | | The fan control feature of the w83795 driver is insufficiently reviewed and tested for public consumption at this time, so make it optional and disabled by default. We will change the default when review and testing is deemed sufficient. Ultimately the option will go away. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
| * hwmon: (w83795) Add myself as co-author and maintainerJean Delvare2010-10-281-1/+2
| | | | | | | | | | | | | | | | | | I've made so many changes to the w83795 driver that it's only fair to list myself as a co-author. I'll also maintain the driver for some time. There's more work needed on the driver for sure. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
| * hwmon: (w83795) More style cleanupsJean Delvare2010-10-281-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | Cleanups suggested by Guenter Roeck, falling into 4 categories: * Swapping test orders, because if (var == CONSTANT) is much easier to read than if (CONSTANT == var). * Simplifying comparisons with 0. * Dropping unneeded masks. * Dropping unneeded parentheses and curly braces. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
| * hwmon: (w83795) Fix LSB reading of voltage limitsJean Delvare2010-10-281-1/+1
| | | | | | | | | | | | | | Wrong index caused the wrong register value to be read, resulting in random LSB for voltage limits. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Use dev_get_drvdata() where possibleJean Delvare2010-10-281-6/+3
| | | | | | | | | | | | | | | | When we don't need the client pointer, calling dev_get_drvdata() is more efficient that calling to_i2c_client() and then i2c_get_clientdata(). Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Delay reading pwm config registersJean Delvare2010-10-281-22/+29
| | | | | | | | | | | | | | | | | | | | | | | | Wait until we need the pwm config register values, instead of pre-reading them. This saves over 1 second on modprobe on my test system. Obviously this time is added when first accessing pwm config attributes, however not everybody will use them, so it seems unfair to slow down driver loading (and thus boot) for an optional feature. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Delay reading limit registersJean Delvare2010-10-281-1/+6
| | | | | | | | | | | | | | | | | | Wait until we need the limit register values, instead of pre-reading them. This saves 544 ms on modprobe on my test system. Obviously this time is added when first running "sensors" or any other monitoring application, but I think it is better than slowing down the boot. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Move register reads to dedicated functionsJean Delvare2010-10-281-99/+119
| | | | | | | | | | | | | | | | | | | | Move initial register reads out of probe, to dedicated functions. This makes the code clearer, and will be needed if we want to delay calling these functions until they are needed, or want to call them periodically. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
| * hwmon: (w83795) Pack similar register readsJean Delvare2010-10-281-16/+6
| | | | | | | | | | | | Pack similar register reads using for loops. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Make W83795_REG_PWM more efficientJean Delvare2010-10-281-12/+8
| | | | | | | | | | | | | | | | Cascaded conditionals are inefficient. Reorder the fields so that PWM register addresses can be computed more efficiently. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
| * hwmon: (w83795) Don't pre-read values we'll update laterJean Delvare2010-10-281-26/+7
| | | | | | | | | | | | | | | | | | There is no point in reading registers during initialization if we will refresh the values in the update function later. This is only slowing down the driver loading with no benefit, stop doing it. This change saves 480 ms on driver load on my test system. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Simplify temperature sensor type handlingJean Delvare2010-10-281-83/+24
| | | | | | | | | | | | | | | | | | | | | | All 3 temperature sensor type sysfs functions (show_temp_mode, store_temp_mode and show_dts_mode) can be simplified. We don't create these files when the correponding input isn't in temperature monitoring mode, so there is no point in handling that case. Likewise, we don't allow changing inputs from temperature to voltage, so the code handling this case is dead and can be removed. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Drop _NUM constantsJean Delvare2010-10-281-10/+6
| | | | | | | | | | | | Consistently use ARRAY_SIZE() to control for loops. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Drop REST_VLT_BEGIN/ENDJean Delvare2010-10-281-6/+3
| | | | | | | | | | | | | | Get rid of REST_VLT_BEGIN and REST_VLT_END, they don't make the code more readable. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Fix parity checksJean Delvare2010-10-281-4/+4
| | | | | | | | | | | | | | x % 1 is obviously wrong, as it always evaluates to 0. You want x % 2, or x & 1, for parity checking. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Get rid of VRLSB_SHIFTJean Delvare2010-10-281-10/+5
| | | | | | | | | | | | | | | | | | | | VRLSB_SHIFT is a non-sense, the actual shift depends on the sensor type (fans need 4, other sensors need 6). Get rid of it to prevent any confusion. Also get rid of the useless masking, the meaningful bits are always the MSb so there's nothing to mask out after shifting. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Avoid reading the same register twiceJean Delvare2010-10-281-2/+9
| | | | | | | | | | | | | | Shorten driver load time by avoiding duplicate register access during initialization. This saves 112 ms on modprobe on my test system. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Rework beep_enable implementationJean Delvare2010-10-281-38/+2
| | | | | | | | | | | | | | | | Handle beep_enable just like all other beep bits. It doesn't need anything special, so let's avoid redundant code. This also saves a duplicate register read at initialization time. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Report PECI agent Tbase valuesJean Delvare2010-10-281-0/+13
| | | | | | | | | | | | | | On systems with PECI, report PECI agent Tbase temperature values. This is informative only. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Properly handle negative temperaturesJean Delvare2010-10-281-13/+7
| | | | | | | | | | | | | | The temperature registers hold regular 2's complement values, no need to add any arithmetics. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Rename temperature limit attributesJean Delvare2010-10-281-10/+10
| | | | | | | | | | | | | | Follow the standard for temperature limit attribute naming, so that libsensors will pick the values. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Fix PWM duty cycle frequency attributesJean Delvare2010-10-281-28/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | The PWM duty cycle frequenty attributes are improperly named (fanN_div instead of pwmN_div) and contain raw values instead of actual frequencies. Rename them and fix their contents. Also improve the logic when the user asks for a new frequency, to always pick the closest supported frequency. The algorithm could certainly be optimized, but the operation is infrequent enough that I don't think it's worth the effort. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Add support for dynamic in0-2 limitsJean Delvare2010-10-281-0/+56
| | | | | | | | | | | | | | | | The W83795G can be configured to set the in0, in1 and/or in2 voltage limits dynamically based on VID input pins. Switch the respective sysfs attributes to read-only. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Fix LSB reading of fan speedsJean Delvare2010-10-281-5/+5
| | | | | | | | | | | | | | Misplaced parentheses caused the wrong register value to be read, resulting in random LSB for fan speed values and limits. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Clean up probe functionJean Delvare2010-10-281-57/+34
| | | | | | | | | | | | | | | | | | | | * The data structure is zalloc'd, so no need to set individual fields to 0 explicitly. * Refactor the handling of pins that can be used for either temperature or voltage monitoring. * Misc other clean-ups. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Fix in17-in20 gain factorJean Delvare2010-10-281-3/+3
| | | | | | | | | | | | | | Gain bit set means 1x gain and cleared means 8x gain, not the other way around. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * hwmon: (w83795) Only start monitoring if neededJean Delvare2010-10-281-3/+10
| | | | | | | | | | | | This saves an SMBus write if monitoring was already enabled. Signed-off-by: Jean Delvare <khali@linux-fr.org>