summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-10-28hwmon: (w83795) Rework beep_enable implementationJean Delvare
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>
2010-10-28hwmon: (w83795) Report PECI agent Tbase valuesJean Delvare
On systems with PECI, report PECI agent Tbase temperature values. This is informative only. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Properly handle negative temperaturesJean Delvare
The temperature registers hold regular 2's complement values, no need to add any arithmetics. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Rename temperature limit attributesJean Delvare
Follow the standard for temperature limit attribute naming, so that libsensors will pick the values. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Fix PWM duty cycle frequency attributesJean Delvare
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>
2010-10-28hwmon: (w83795) Add support for dynamic in0-2 limitsJean Delvare
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>
2010-10-28hwmon: (w83795) Fix LSB reading of fan speedsJean Delvare
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>
2010-10-28hwmon: (w83795) Clean up probe functionJean Delvare
* 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>
2010-10-28hwmon: (w83795) Fix in17-in20 gain factorJean Delvare
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>
2010-10-28hwmon: (w83795) Only start monitoring if neededJean Delvare
This saves an SMBus write if monitoring was already enabled. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Add const markersJean Delvare
Attribute structures can be made const. Same for the I2C address list. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Only create fan[1-8]_target files when neededJean Delvare
Only create fan[1-8]_target files when the fan in question can be controlled (PWM output is present.) Also name these files according to the standard. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Move PWM attributes to a dedidated arrayJean Delvare
Use a dedicated 2D array for PWM attributes. This way, PWM attributes are handled the same way as other attributes, this is more consistent. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Use 2D arrays for many device attributesJean Delvare
Use 2D arrays for in, fan, temp and dts device attributes. Using linear arrays is too risky as we have to skip some groups depending on the device model and configuration. Adding or removing an attribute would let the driver build silently but then it would crash at runtime. With 2D arrays, the consistency checking happens at build time, which is much safer. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Merge w83795_create_files and w83795_remove_filesJean Delvare
Functions w83795_create_files and w83795_remove_files iterate over the same set of files, just calling a different function. Merge them into a single function which takes the action as a parameter. This saves code, and also ensure that file creation and deletion are in sync. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Move file creation to a separate function tooJean Delvare
Function w83795_probe() is way too big, move file creation to a separate function to make it more readable. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Move files removal to a separate functionJean Delvare
Sysfs files must be removed on device removal but also when device registration fails. Move the code to a separate function to avoid code redundancy. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Improve detection routineJean Delvare
Check for additional identification registers. Improve debugging messages on failed detection. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Refactor bank selectionJean Delvare
Move the bank selection code to a separate function, to avoid duplicating it in read and write functions. Improve error reporting on register access error. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Drop duplicate enumJean Delvare
Enum chips and chip_types are redundant, get rid of the former. Fix the detection code to properly identify the chip variant and name the client accordingly. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Misc cleanupsJean Delvare
* Improve driver description. * Drop unused macro. * Drop unreachable code. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: New driver for the W83795G/ADG monitoring chipsWei Song
There is still much work needed, but I wanted to give Wei the credit he deserves. I've merged some of my own fixes already, to make gcc and checkpatch happy. Individual fixes and improvements from me will follow. [JD: Fix build errors] [JD: Coding style cleanups] [JD: Get rid of forward declarations] [JD: Drop VID support] [JD: Drop fault output control feature] [JD: Use lowercase for inline function names] [JD: Use strict variants of the strtol/ul functions] [JD: Shorten the read and write function names] Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (s3c-hwmon) Depend on S3C_ADCMaurus Cuelenaere
This way we don't need to modify Kconfig every time a new SoC comes along to make this driver support it. Also fix some typos while I'm at it. Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com> Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (s3c-hwmon) Use a real mutexThomas Gleixner
The semaphore which protects the ADC is semantically a mutex. Use a real mutex. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm75) Trivial changes to pacify the checkpatchShubhrajyoti D
Some trivial changes to pacify the checkpatch. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm75) Make the writing to sysfs more robustShubhrajyoti D
Currently we get the checkpatch warning consider using strict_strtol in preference to simple_strtol. Also we should not allow any partially numeric values. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Add support for the W83L771W/GJean Delvare
I was wondering if that chip ever existed publicly... Apparently yes, so add support for it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-10-28hwmon: (lm90) Add support for update_interval sysfs attributeGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Introduce capability flag to indicate broken ALERT functionalityGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Introduce chip parameter structureGuenter Roeck
Instead of using switch/case and if statements in probe, define chip specific functionality in a parameter structure array. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Rearrange code to no longer require forward declarationsGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Add support for max6695 and max6696Guenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Add support for extra features of max6659Guenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Add explicit support for max6659Guenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Simplify set_temp11 register calculationsGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Introduce function to delete sysfs filesGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Introduce device feature bitsGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Fix checkpatch errorsGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: Add tempX_emergency attribute to sysfs ABIGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (k8temp) Remove superfluous CPU family checkAndreas Herrmann
The family check in k8temp is not required because the driver is already bound to a northbridge device only used with K8 CPUs. Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-27Merge branch 'upstream-merge' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 * 'upstream-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (50 commits) ext4,jbd2: convert tracepoints to use major/minor numbers ext4: optimize orphan_list handling for ext4_setattr ext4: fix unbalanced mutex unlock in error path of ext4_li_request_new ext4: fix compile error in ext4_fallocate() ext4: move ext4_mb_{get,put}_buddy_cache_lock and make them static ext4: rename mark_bitmap_end() to ext4_mark_bitmap_end() ext4: move flush_completed_IO to fs/ext4/fsync.c and make it static ext4: rename {ext,idx}_pblock and inline small extent functions ext4: make various ext4 functions be static ext4: rename {exit,init}_ext4_*() to ext4_{exit,init}_*() ext4: fix kernel oops if the journal superblock has a non-zero j_errno ext4: update writeback_index based on last page scanned ext4: implement writeback livelock avoidance using page tagging ext4: tidy up a void argument in inode.c ext4: add batched_discard into ext4 feature list ext4: Add batched discard support for ext4 fs: Add FITRIM ioctl ext4: Use return value from sb_issue_discard() ext4: Check return value of sb_getblk() and friends ext4: use bio layer instead of buffer layer in mpage_da_submit_io ...
2010-10-27Merge branch 'next' into upstream-mergeTheodore Ts'o
Conflicts: fs/ext4/inode.c fs/ext4/mballoc.c include/trace/events/ext4.h
2010-10-27Merge branch 'drm-core-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/radeon/kms: enable unmappable vram for evergreen drm/radeon/kms: fix tiled db height calculation on 6xx/7xx drm/radeon/kms: fix handling of tex lookup disable in cs checker on r2xx
2010-10-27Merge branch 'for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: (24 commits) quota: Fix possible oops in __dquot_initialize() ext3: Update kernel-doc comments jbd/2: fixed typos ext2: fixed typo. ext3: Fix debug messages in ext3_group_extend() jbd: Convert atomic_inc() to get_bh() ext3: Remove misplaced BUFFER_TRACE() in ext3_truncate() jbd: Fix debug message in do_get_write_access() jbd: Check return value of __getblk() ext3: Use DIV_ROUND_UP() on group desc block counting ext3: Return proper error code on ext3_fill_super() ext3: Remove unnecessary casts on bh->b_data ext3: Cleanup ext3_setup_super() quota: Fix issuing of warnings from dquot_transfer quota: fix dquot_disable vs dquot_transfer race v2 jbd: Convert bitops to buffer fns ext3/jbd: Avoid WARN() messages when failing to write the superblock jbd: Use offset_in_page() instead of manual calculation jbd: Remove unnecessary goto statement jbd: Use printk_ratelimited() in journal_alloc_journal_head() ...
2010-10-27ext4,jbd2: convert tracepoints to use major/minor numbersTheodore Ts'o
Unfortunately perf can't deal with anything other than direct structure accesses in the TP_printk() section. It will drop dead when it sees jbd2_dev_to_name() in the "print fmt" section of the tracepoint. Addresses-Google-Bug: 3138508 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-10-27ext4: optimize orphan_list handling for ext4_setattrDmitry Monakhov
Surprisingly chown() on ext4 is not SMP scalable operation. Due to unconditional orphan_del(NULL, inode) in ext4_setattr() result in significant performance overhead because of global orphan mutex, especially in no-journal mode (where orphan_add() is noop). It is possible to skip explicit orphan_del if possible. Results of fchown() micro-benchmark in no-journal mode while (1) { iteration++; fchown(fd, uid, gid); fchown(fd, uid + 1, gid + 1) } measured: iterations per millisecond | nr_tasks | w/o patch | with patch | | 1 | 142 | 185 | | 4 | 109 | 642 | Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-10-27ext4: fix unbalanced mutex unlock in error path of ext4_li_request_newNicolas Kaiser
Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-10-27Merge branch 'next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (48 commits) DMAENGINE: move COH901318 to arch_initcall dma: imx-dma: fix signedness bug dma/timberdale: simplify conditional ste_dma40: remove channel_type ste_dma40: remove enum for endianess ste_dma40: remove TIM_FOR_LINK option ste_dma40: move mode_opt to separate config ste_dma40: move channel mode to a separate field ste_dma40: move priority to separate field ste_dma40: add variable to indicate valid dma_cfg async_tx: make async_tx channel switching opt-in move async raid6 test to lib/Kconfig.debug dmaengine: Add Freescale i.MX1/21/27 DMA driver intel_mid_dma: change the slave interface intel_mid_dma: fix the WARN_ONs intel_mid_dma: Add sg list support to DMA driver intel_mid_dma: Allow DMAC2 to share interrupt intel_mid_dma: Allow IRQ sharing intel_mid_dma: Add runtime PM support DMAENGINE: define a dummy filter function for ste_dma40 ...
2010-10-27Merge branch 'viafb-next' of git://github.com/schandinat/linux-2.6Linus Torvalds
* 'viafb-next' of git://github.com/schandinat/linux-2.6: (29 commits) viafb: add initial VX900 support viafb: fix hardware acceleration for suspend & resume viafb: make suspend and resume work (on all machines?) viafb: restore display on resume Minimal support for viafb suspend/resume viafb: use proper register for colour when doing fill ops viafb: add documentation for proc interface viafb: rename output devices viafb: add a mapping of supported output devices viafb: set sync polarity for all output devices viafb: add function to change sync polarity per device viafb: reduce I2C timeout and delay viafb: enable I2C for CRT viafb: fix i2c_transfer error handling viafb: vt1636 cleanup viafb: introduce per output device power management viafb: limit LCD code impact viafb: add interface for output device configuration viafb: merge the remaining output path with enable functions viafb: use new device routing ...
2010-10-27Merge git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-mn10300Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-mn10300: (44 commits) MN10300: Save frame pointer in thread_info struct rather than global var MN10300: Change "Matsushita" to "Panasonic". MN10300: Create a defconfig for the ASB2364 board MN10300: Update the ASB2303 defconfig MN10300: ASB2364: Add support for SMSC911X and SMC911X MN10300: ASB2364: Handle the IRQ multiplexer in the FPGA MN10300: Generic time support MN10300: Specify an ELF HWCAP flag for MN10300 Atomic Operations Unit support MN10300: Map userspace atomic op regs as a vmalloc page MN10300: And Panasonic AM34 subarch and implement SMP MN10300: Delete idle_timestamp from irq_cpustat_t MN10300: Make various interrupt priority settings configurable MN10300: Optimise do_csum() MN10300: Implement atomic ops using atomic ops unit MN10300: Make the FPU operate in non-lazy mode under SMP MN10300: SMP TLB flushing MN10300: Use the [ID]PTEL2 registers rather than [ID]PTEL for TLB control MN10300: Make the use of PIDR to mark TLB entries controllable MN10300: Rename __flush_tlb*() to local_flush_tlb*() MN10300: AM34 erratum requires MMUCTR read and write on exception entry ...