aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAge
* mfd: Convert WM8350 to genirqMark Brown2010-03-07
| | | | | | | | | | | This gives us use of the diagnostic facilities genirq provides and will allow implementation of interrupt support for the WM8350 GPIOs. Stub functions are provided to ease the transition of the individual drivers, probably after additional work to pass the IRQ numbers via the struct devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* rtc: Suppress duplicate enable/disable of WM8350 update interruptMark Brown2010-03-07
| | | | | | | | | | | | Unlike the wm8350-custom code genirq nests enable and disable calls so we can't just unconditionally mask or unmask the interrupt, we need to remember the state we set and only mask or unmask when there is a real change. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Cc: rtc-linux@googlegroups.com Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Add a data argument to the WM8350 IRQ free functionMark Brown2010-03-07
| | | | | | | To better match genirq. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Correct use after free for t7l66xbJulia Lawall2010-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The structure t7l66xb should not be freed before the subsequent references to its fields in the arguments to clk_put. Furthermore, this structure is allocated near the beginning of the function, and a goto to the label err_noirq appears after a successful allocation, so it would seem that the kfree should be moved down below this label. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,e; identifier f; iterator I; statement S; @@ *kfree(x); ... when != &x when != x = e when != I(x,...) S *x->f // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk>
* mfd: Use resouce_size for tc6393xbH Hartley Sweeten2010-03-07
| | | | | | | | Use resource_size() for ioremap. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Use resource_size() for t7l66xbH Hartley Sweeten2010-03-07
| | | | | | | | Use resource_size() for ioremap. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: Use resource_size() in sm501H Hartley Sweeten2010-03-07
| | | | | | | | | The requested memory region is smaller than the actual ioremap(). Use resource_size() to get the correct size. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* Merge branch 'next' of ↵Linus Torvalds2010-03-07
|\ | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq: [CPUFREQ] Fix cast warning in pcc driver. [CPUFREQ] Processor Clocking Control interface driver
| * [CPUFREQ] Processor Clocking Control interface driverNaga Chumbalkar2010-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Processor Clocking Control (PCC) is an interface between the BIOS and OSPM. Based on the server workload, OSPM can request what frequency it expects from a logical CPU, and the BIOS will achieve that frequency transparently. This patch introduces driver support for PCC. OSPM uses the PCC driver to communicate with the BIOS via the PCC interface. There is a Documentation file that provides a link to the PCC Specification, and also provides a summary of the PCC interface. Currently, certain HP ProLiant platforms implement the PCC interface. However, any platform whose BIOS implements the PCC Specification, can utilize this driver. V2 --> V1 changes (based on Dominik's suggestions): - Removed the dependency on CPU_FREQ_TABLE - "cpufreq_stats" will no longer PANIC. Actually, it will not load anymore because it is not applicable. - Removed the sanity check for target frequency in the ->target routine. NOTE: A patch to sanitize the target frequency requested by "ondemand" is needed to ensure that the target freq < policy->min. Can this driver be queued up for the 2.6.33 tree? Signed-off-by: Naga Chumbalkar <nagananda.chumbalkar@hp.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Dave Jones <davej@redhat.com>
* | USB: remove unused defintion of struct usb_device_statusDmitry Torokhov2010-03-07
| | | | | | | | | | | | | | | | The recent rework of /proc/bus/usb/devices polling support made this structure unused so let's remove it. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Revert "lib: build list_sort() only if needed"Linus Torvalds2010-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a069c266ae5fdfbf5b4aecf2c672413aa33b2504. It turns ou that not only was it missing a case (XFS) that needed it, but perhaps more importantly, people sometimes want to enable new modules that they hadn't had enabled before, and if such a module uses list_sort(), it can't easily be inserted any more. So rather than add a "select LIST_SORT" to the XFS case, just leave it compiled in. It's not all _that_ big, after all, and the inconvenience isn't worth it. Requested-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Don Mullis <don.mullis@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Dave Chinner <david@fromorbit.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | usbfs: fix deadlock on 'usbfs_mutex', clean up pollLinus Torvalds2010-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The caller of usbfs_conn_disc_event() in some cases (but not always) already holds usbfs_mutex, so trying to protect the event counter with that lock causes nasty deadlocks. The problem was introduced by commit 554f76962d ("USB: Remove BKL from poll()") when the BLK protection was turned into using the mutex instead. So fix this by using an atomic variable instead. And while we're at it, get rid of the atrocious naming of said variable and the waitqueue it is associated with. This also cleans up the unnecessary locking in the poll routine, since the whole point of how the pollwait table works is that you can just add yourself to the waiting list, and then check the condition you're waiting for afterwards - avoiding all races. It also gets rid of the unnecessary dynamic allocation of the device status that just contained a single word. We should use f_version for this, as Dmitry Torokhov points out. That simplifies everything further. Reported-and-tested-by: Jeff Chua <jeff.chua.linux@gmail.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: Oliver Neukum <oliver@neukum.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dmLinus Torvalds2010-03-06
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: dm raid1: fix deadlock when suspending failed device dm: eliminate some holes data structures dm ioctl: introduce flag indicating uevent was generated dm: free dm_io before bio_endio not after dm table: remove unused dm_get_device range parameters dm ioctl: only issue uevent on resume if state changed dm raid1: always return error if all legs fail dm mpath: refactor pg_init dm mpath: wait for pg_init completion when suspending dm mpath: hold io until all pg_inits completed dm mpath: avoid storing private suspended state dm: document when snapshot has finished merging dm table: remove dm_get from dm_table_get_md dm mpath: skip activate_path for failed paths dm mpath: pass struct pgpath to pg init done
| * | dm raid1: fix deadlock when suspending failed deviceTakahiro Yasui2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To prevent deadlock, bios in the hold list should be flushed before dm_rh_stop_recovery() is called in mirror_suspend(). The recovery can't start because there are pending bios and therefore dm_rh_stop_recovery deadlocks. When there are pending bios in the hold list, the recovery waits for the completion of the bios after recovery_count is acquired. The recovery_count is released when the recovery finished, however, the bios in the hold list are processed after dm_rh_stop_recovery() in mirror_presuspend(). dm_rh_stop_recovery() also acquires recovery_count, then deadlock occurs. Signed-off-by: Takahiro Yasui <tyasui@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
| * | dm: eliminate some holes data structuresMike Snitzer2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate a 4-byte hole in 'struct dm_io_memory' by moving 'offset' above the 'ptr' to which it applies (size reduced from 24 to 16 bytes). And by association, 1-4 byte hole is eliminated in 'struct dm_io_request' (size reduced from 56 to 48 bytes). Eliminate all 6 4-byte holes and 1 cache-line in 'struct dm_snapshot' (size reduced from 392 to 368 bytes). Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * | dm ioctl: introduce flag indicating uevent was generatedPeter Rajnoha2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | Set a new DM_UEVENT_GENERATED_FLAG when returning from ioctls to indicate that a uevent was actually generated. This tells the userspace caller that it may need to wait for the event to be processed. Signed-off-by: Peter Rajnoha <prajnoha@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * | dm: free dm_io before bio_endio not afterMikulas Patocka2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Free the dm_io structure before calling bio_endio() instead of after it, to ensure that the io_pool containing it is not referenced after it is freed. This partially fixes a problem described here https://www.redhat.com/archives/dm-devel/2010-February/msg00109.html thread 1: bio_endio(bio, io_error); /* scheduling happens */ thread 2: close the device remove the device thread 1: free_io(md, io); Thread 2, when removing the device, sees non-empty md->io_pool (because the io hasn't been freed by thread 1 yet) and may crash with BUG in mempool_free. Thread 1 may also crash, when freeing into a nonexisting mempool. To fix this we must make sure that bio_endio() is the last call and the md structure is not accessed afterwards. There is another bio_endio in process_barrier, but it is called from the thread and the thread is destroyed prior to freeing the mempools, so this call is not affected by the bug. A similar bug exists with module unloads - the module may be unloaded immediately after bio_endio - but that is more difficult to fix. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@kernel.org Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * | dm table: remove unused dm_get_device range parametersNikanth Karthikesan2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | Remove unused parameters(start and len) of dm_get_device() and fix the callers. Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * | dm ioctl: only issue uevent on resume if state changedMike Snitzer2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only issue a uevent on a resume if the state of the device changed, i.e. if it was suspended and/or its table was replaced. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Cc: stable@kernel.org Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * | dm raid1: always return error if all legs failMikulas Patocka2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If all mirror legs fail, always return an error instead of holding the bio, even if the handle_errors option was set. At present it is the responsibility of the driver underneath us to deal with retries, multipath etc. The patch adds the bio to the failures list instead of holding it directly. do_failures tests first if all legs failed and, if so, returns the bio with -EIO. If any leg is still alive and handle_errors is set, do_failures calls hold_bio. Reviewed-by: Takahiro Yasui <tyasui@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * | dm mpath: refactor pg_initKiyoshi Ueda2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch pulls the pg_init path activation code out of process_queued_ios() into a new function. No functional change. Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * | dm mpath: wait for pg_init completion when suspendingKiyoshi Ueda2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When suspending the device we must wait for all I/O to complete, but pg-init may be still in progress even after flushing the workqueue for kmpath_handlerd in multipath_postsuspend. This patch waits for pg-init completion correctly in multipath_postsuspend(). Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * | dm mpath: hold io until all pg_inits completedKiyoshi Ueda2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | m->queue_io is set to block processing I/Os, and it needs to be kept while pg-init, which issues multiple path activations, is in progress. But m->queue is cleared when a path activation completes without error in pg_init_done(), even while other path activations are in progress. That may cause undesired -EIO on paths which are not complete activation. This patch fixes that by not clearing m->queue_io until all path activations complete. (Before the hardware handlers were moved into the SCSI layer, pg_init only used one path.) Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * | dm mpath: avoid storing private suspended stateKiyoshi Ueda2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'suspended' flag in struct multipath was introduced to check whether the multipath target is in suspended state, but the same check is done through dm_suspended() now, so remove the flag and related code. Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Cc: Mike Anderson <andmike@linux.vnet.ibm.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * | dm table: remove dm_get from dm_table_get_mdKiyoshi Ueda2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the dm_get() in dm_table_get_md() because dm_table_get_md() could be called from presuspend/postsuspend, which are called while mapped_device is in DMF_FREEING state, where dm_get() is not allowed. Justification for that is the lifetime of both objects: As far as the current dm design/implementation, mapped_device is never freed while targets are doing something, because dm core waits for targets to become quiet in dm_put() using presuspend/postsuspend. So targets should be able to touch mapped_device without holding reference count of the mapped_device, and we should allow targets to touch mapped_device even if it is in DMF_FREEING state. Backgrounds: I'm trying to remove the multipath internal queue, since dm core now has a generic queue for request-based dm. In the patch-set, the multipath target wants to request dm core to start/stop queue. One of such start/stop requests can happen during postsuspend() while the target waits for pg-init to complete, because the target stops queue when starting pg-init and tries to restart it when completing pg-init. Since queue belongs to mapped_device, it involves calling dm_table_get_md() and dm_put(). On the other hand, postsuspend() is called in dm_put() for mapped_device which is in DMF_FREEING state, and that triggers BUG_ON(DMF_FREEING) in the 2nd dm_put(). I had tried to solve this problem by changing only multipath not to touch mapped_device which is in DMF_FREEING state, but I couldn't and I came up with a question why we need dm_get() in dm_table_get_md(). Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * | dm mpath: skip activate_path for failed pathsMoger, Babu2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds two minor fixes while processing device mapper path activation. Skip failed paths while calling activate_path. If the path is already failed then activate_path will fail for sure. We don't have to call in that case. In some case this might cause prolonged retries unnecessarily. Change the misleading message if the path being activated fails with SCSI_DH_NOSYS. Signed-off-by: Babu Moger <babu.moger@lsi.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
| * | dm mpath: pass struct pgpath to pg init doneMoger, Babu2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes some unnecessary argument casting. There is no functional change with this patch. Passes 'struct pgpath' through to pg_init_done() instead of the enclosed 'struct dm_path'. Tested the changes with LSI storage.. CC: Chandra Seetharaman <chandra.seetharaman@us.ibm.com> Signed-off-by: Babu Moger <babu.moger@lsi.com> Acked-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
* | | Merge branch 'hwmon-for-linus' of ↵Linus Torvalds2010-03-06
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: (23 commits) hwmon: Remove the deprecated adt7473 driver hwmon: Fix off-by-one kind values hwmon: (tmp421) Fix temperature conversions hwmon: (tmp421) Restore missing inputs hwmon: Driver for Andigilog aSC7621 family monitoring chips hwmon: (adt7411) Improve locking hwmon: Add driver for ADT7411 voltage and temperature sensor hwmon: (w83793) Add watchdog functionality hwmon: (g760a) Make rpm_from_cnt static hwmon: (it87) Validate auto pwm settings hwmon: (it87) Add support for old automatic fan speed control hwmon: (it87) Drop dead web links in documentation hwmon: (it87) Add an entry in MAINTAINERS hwmon: (it87) Use strict_strtol instead of simple_strtol hwmon: (it87) Fix many checkpatch errors and warnings hwmon: (it87) Add support for beep on alarm hwmon: (it87) Create vid attributes by group hwmon: (it87) Refactor attributes creation and removal hwmon: (it87) Expose the PWM/temperature mappings hwmon: (it87) Display fan outputs in automatic mode as such ...
| * | | hwmon: Remove the deprecated adt7473 driverAmerigo Wang2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adt7473 driver is obsoleted by adt7475 driver. And it is scheduled to be removed in Feb 2010. Signed-off-by: WANG Cong <amwang@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: Fix off-by-one kind valuesJean Delvare2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | hwmon: (tmp421) Fix temperature conversionsJean Delvare2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The low bits of temperature registers are status bits, they must be masked out before converting the register values to temperatures. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Andre Prendel <andre.prendel@gmx.de> Cc: stable@kernel.org
| * | | hwmon: (tmp421) Restore missing inputsJean Delvare2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An off-by-one error caused some inputs to not be created by the driver when they should. TMP421 gets only one input instead of two, TMP422 gets two instead of three, etc. Fix the bug by listing explicitly the number of inputs each device has. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Andre Prendel <andre.prendel@gmx.de> Cc: stable@kernel.org
| * | | hwmon: Driver for Andigilog aSC7621 family monitoring chipsGeorge Joseph2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hwmon driver for Andigilog aSC7621 family monitoring chips. Signed-off-by: George Joseph <george.joseph@fairview5.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: (adt7411) Improve lockingWolfram Sang2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add proper locking for the cached variables. Also get rid of ref_is_vdd, which became obsolete. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: Add driver for ADT7411 voltage and temperature sensorWolfram Sang2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add basic support for the ADT7411. Reads out all conversion results (via I2C, SPI yet missing) and allows some on-the-fly configuration. Tested with a custom board. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: (w83793) Add watchdog functionalitySven Anders2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add watchdog functionality to the Winbond W83793 driver. Signed-off-by: Sven Anders <anders@anduras.de> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: (g760a) Make rpm_from_cnt staticJean Delvare2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Function rpm_from_cnt is only used internally so it can be made static. Make it inline while we're here, for performance reasons (although hopefully gcc would figure out by itself...) Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Herbert Valerio Riedel <hvr@gnu.org> Acked-by: Martin Michlmayr <tbm@cyrius.com>
| * | | hwmon: (it87) Validate auto pwm settingsJean Delvare2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before switching to automatic fan control mode, make sure that all the trip points make sense. Otherwise, the control loop could lead to weird fan behavior. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: (it87) Add support for old automatic fan speed controlJean Delvare2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the automatic fan speed control interface as implemented by IT8705F chips up to revision F and IT8712F chips up to revision G. This implementation fits very well in our standard sysfs interface. I implemented the old and not the new interface because the only chip I have at hand is an old one, and the new interface is more difficult to map to the standard sysfs interface. Adding support later should be possible though, if someone with a supported chip is interested. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: (it87) Use strict_strtol instead of simple_strtolJean Delvare2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For consistency and robustness, use strict_strtol instead of simple_strtol. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: (it87) Fix many checkpatch errors and warningsJean Delvare2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix 20 errors and 11 warnings reported by the checkpatch script. The remainining errors would require more work. The remaining warnings will be addressed later. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: (it87) Add support for beep on alarmJean Delvare2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IT87xxF chips support beeping on alarm, if properly wired and configured. There is one control bit for each input type (temperature, fan, voltage.) Let the user see and change them. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: (it87) Create vid attributes by groupJean Delvare2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only VID-related attributes are left in it87_attributes_opt, so we might as well rename it to it87_attributes_vid and use this group to create all attributes at once. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: (it87) Refactor attributes creation and removalJean Delvare2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a lot of code redundancy in the creation of the fan and pwm attributes. Move these attributes to arrays so that the code can be simplified. This in turns makes the attributes removal code larger, so move it to a separate function that can be called in both the standard removal case and the error path during probing. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: (it87) Expose the PWM/temperature mappingsJean Delvare2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let the user read the PWM-to-temperature mappings. Until the trip points are also exposed, this is essentially a way to know how the BIOS has set things up. The ability to change the settings will be added later, together with the trip points. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: (it87) Display fan outputs in automatic mode as suchJean Delvare2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The it87 driver doesn't yet support automatic fan control. Let it at least tell the user when a fan output is in automatic mode. Also let the user switch from automatic mode (possibly set by the BIOS) to manual mode and back without losing the settings. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: (lm90) Add SMBus alert supportJean Delvare2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested successfully with an ADM1032 chip on its evaluation board. It should work fine with all other chips as well. At this point this is more of a proof-of-concept, we don't do anything terribly useful on SMBus alert: we simply log the event. But this could later evolve into libsensors signaling so that user-space applications can take an appropriate action. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Trent Piepho <tpiepho@freescale.com>
| * | | hwmon: (lm90) Restore configuration on exitJean Delvare2010-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Restore the chip configuration when unloading the driver. This ensures we don't leave the chip running if it was initially stopped. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | hwmon: (lm90) Add support for the Winbond/Nuvoton W83L771AWG/ASGJean Delvare2010-03-05
| |/ / | | | | | | | | | | | | | | | | | | | | | This chips is found on several Zotac Ion ITX boards, amongst others. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: MC Matti <mcmatti17@googlemail.com> Cc: Manuel Lamotte-Schubert <mls@pronego.com>
* | | Merge git://git.infradead.org/ubi-2.6Linus Torvalds2010-03-06
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.infradead.org/ubi-2.6: UBI: add write checking UBI: simplify debugging return codes UBI: fix attaching error path UBI: support attaching by MTD character device name UBI: mark few variables as __initdata