aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-10-28hwmon: (w83795) Avoid reading the same register twiceJean Delvare1-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 <[email protected]>
2010-10-28hwmon: (w83795) Rework beep_enable implementationJean Delvare1-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 <[email protected]>
2010-10-28hwmon: (w83795) Report PECI agent Tbase valuesJean Delvare1-0/+13
On systems with PECI, report PECI agent Tbase temperature values. This is informative only. Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (w83795) Properly handle negative temperaturesJean Delvare1-13/+7
The temperature registers hold regular 2's complement values, no need to add any arithmetics. Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (w83795) Rename temperature limit attributesJean Delvare1-10/+10
Follow the standard for temperature limit attribute naming, so that libsensors will pick the values. Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (w83795) Fix PWM duty cycle frequency attributesJean Delvare1-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 <[email protected]>
2010-10-28hwmon: (w83795) Add support for dynamic in0-2 limitsJean Delvare1-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 <[email protected]>
2010-10-28hwmon: (w83795) Fix LSB reading of fan speedsJean Delvare1-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 <[email protected]>
2010-10-28hwmon: (w83795) Clean up probe functionJean Delvare1-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 <[email protected]>
2010-10-28hwmon: (w83795) Fix in17-in20 gain factorJean Delvare1-3/+3
Gain bit set means 1x gain and cleared means 8x gain, not the other way around. Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (w83795) Only start monitoring if neededJean Delvare1-3/+10
This saves an SMBus write if monitoring was already enabled. Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (w83795) Add const markersJean Delvare1-8/+10
Attribute structures can be made const. Same for the I2C address list. Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (w83795) Only create fan[1-8]_target files when neededJean Delvare1-23/+4
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 <[email protected]>
2010-10-28hwmon: (w83795) Move PWM attributes to a dedidated arrayJean Delvare1-10/+8
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 <[email protected]>
2010-10-28hwmon: (w83795) Use 2D arrays for many device attributesJean Delvare1-29/+37
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 <[email protected]>
2010-10-28hwmon: (w83795) Merge w83795_create_files and w83795_remove_filesJean Delvare1-38/+17
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 <[email protected]>
2010-10-28hwmon: (w83795) Move file creation to a separate function tooJean Delvare1-55/+66
Function w83795_probe() is way too big, move file creation to a separate function to make it more readable. Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (w83795) Move files removal to a separate functionJean Delvare1-50/+31
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 <[email protected]>
2010-10-28hwmon: (w83795) Improve detection routineJean Delvare1-23/+57
Check for additional identification registers. Improve debugging messages on failed detection. Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (w83795) Refactor bank selectionJean Delvare1-43/+50
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 <[email protected]>
2010-10-28hwmon: (w83795) Drop duplicate enumJean Delvare1-19/+15
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 <[email protected]>
2010-10-28hwmon: (w83795) Misc cleanupsJean Delvare1-6/+1
* Improve driver description. * Drop unused macro. * Drop unreachable code. Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: New driver for the W83795G/ADG monitoring chipsWei Song3-0/+2149
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 <[email protected]>
2010-10-28hwmon: (s3c-hwmon) Depend on S3C_ADCMaurus Cuelenaere1-4/+4
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 <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (s3c-hwmon) Use a real mutexThomas Gleixner1-4/+4
The semaphore which protects the ADC is semantically a mutex. Use a real mutex. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Ben Dooks <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (lm75) Trivial changes to pacify the checkpatchShubhrajyoti D1-21/+23
Some trivial changes to pacify the checkpatch. Signed-off-by: Shubhrajyoti D <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (lm75) Make the writing to sysfs more robustShubhrajyoti D1-1/+6
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 <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (lm90) Add support for the W83L771W/GJean Delvare3-9/+30
I was wondering if that chip ever existed publicly... Apparently yes, so add support for it. Signed-off-by: Jean Delvare <[email protected]> Tested-by: Alexander Stein <[email protected]> Acked-by: Guenter Roeck <[email protected]>
2010-10-28hwmon: (lm90) Add support for update_interval sysfs attributeGuenter Roeck1-5/+92
Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (lm90) Introduce capability flag to indicate broken ALERT functionalityGuenter Roeck1-3/+6
Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (lm90) Introduce chip parameter structureGuenter Roeck1-32/+60
Instead of using switch/case and if statements in probe, define chip specific functionality in a parameter structure array. Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (lm90) Rearrange code to no longer require forward declarationsGuenter Roeck1-267/+256
Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (lm90) Add support for max6695 and max6696Guenter Roeck3-24/+247
Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (lm90) Add support for extra features of max6659Guenter Roeck2-10/+64
Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (lm90) Add explicit support for max6659Guenter Roeck2-13/+23
Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (lm90) Simplify set_temp11 register calculationsGuenter Roeck1-27/+28
Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (lm90) Introduce function to delete sysfs filesGuenter Roeck1-7/+11
Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (lm90) Introduce device feature bitsGuenter Roeck1-14/+26
Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (lm90) Fix checkpatch errorsGuenter Roeck1-25/+51
Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: Add tempX_emergency attribute to sysfs ABIGuenter Roeck1-0/+15
Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28hwmon: (k8temp) Remove superfluous CPU family checkAndreas Herrmann1-29/+22
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 <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-10-28numa: fix slab_node(MPOL_BIND)Eric Dumazet1-1/+1
When a node contains only HighMem memory, slab_node(MPOL_BIND) dereferences a NULL pointer. [ This code seems to go back all the way to commit 19770b32609b: "mm: filter based on a nodemask as well as a gfp_mask". Which was back in April 2008, and it got merged into 2.6.26. - Linus ] Signed-off-by: Eric Dumazet <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Lee Schermerhorn <[email protected]> Cc: Andrew Morton <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
2010-10-28Staging: brcm80211: fix usage of roundup in structuresGreg Kroah-Hartman2-2/+3
Now that the roundup macro is sane, it can't be used in structure definitions, or the build breaks.. For now, create a "broken_roundup()" macro to get everything building again, but in the end, fixing these structures to use a proper size value is the correct thing to do. Cc: Brett Rudley <[email protected]> Cc: Henry Ptasinski <[email protected]> Cc: Nohee Ko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-10-28Staging: bcm: fix up network device reference countingGreg Kroah-Hartman1-6/+4
The way network devices are reference counted does not include poking around in the reference count itself. This breaks when the reference count is changed to be a different type. Fix the driver to do the proper function calls instead. Cc: Stephen Hemminger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-10-28Staging: keucr: fix up US_ macro changeGreg Kroah-Hartman3-9/+9
The usb tree renamed the USB storage defines to make more sense, so this driver needs the changes as well so that things will compile properly. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-10-28Merge 'staging-next' to Linus's treeGreg Kroah-Hartman1365-148540/+421108
This merges the staging-next tree to Linus's tree and resolves some conflicts that were present due to changes in other trees that were affected by files here. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-10-28Merge branch 'v4l_for_linus' of ↵Linus Torvalds531-13099/+41145
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (505 commits) [media] af9015: Fix max I2C message size when used with tda18271 [media] IR: initialize ir_raw_event in few more drivers [media] Guard a divide in v4l1 compat layer [media] imon: fix nomouse modprobe option [media] imon: remove redundant change_protocol call [media] imon: fix my egregious brown paper bag w/rdev/idev split [media] cafe_ccic: Configure ov7670 correctly [media] ov7670: allow configuration of image size, clock speed, and I/O method [media] af9015: support for DigitalNow TinyTwin v3 [1f4d:9016] [media] af9015: map DigitalNow TinyTwin v2 remote [media] DigitalNow TinyTwin remote controller [media] af9015: RC fixes and improvements videodev2.h.xml: Update to reflect the latest changes at videodev2.h [media] v4l: document new Bayer and monochrome pixel formats [media] DocBook/v4l: Add missing formats used on gspca cpia1 and sn9c2028 [media] firedtv: add parameter to fake ca_system_ids in CA_INFO [media] tm6000: fix a macro coding style issue tm6000: Remove some ugly debug code [media] Nova-S-Plus audio line input [media] [RFC,1/1] V4L2: Use new CAP bits in existing RDS capable drivers ...
2010-10-28Merge branch 'for-linus' of ↵Linus Torvalds60-565/+2535
git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (66 commits) mmc: add new sdhci-pxa driver for Marvell SoCs mmc: make number of mmcblk minors configurable mmc_spi: Recover from CRC errors for r/w operation over SPI. mmc: sdhci-pltfm: add -pltfm driver for imx35/51 mmc: sdhci-of-esdhc: factor out common stuff mmc: sdhci_pltfm: pass more data on custom init call mmc: sdhci: introduce get_ro private write-protect hook mmc: sdhci-pltfm: move .h file into appropriate subdir mmc: sdhci-pltfm: Add structure for host-specific data mmc: fix cb710 kconfig dependency warning mmc: cb710: remove debugging printk (info duplicated from mmc-core) mmc: cb710: clear irq handler on init() error path mmc: cb710: remove unnecessary msleep() mmc: cb710: implement get_cd() callback mmc: cb710: partially demystify clock selection mmc: add a file to debugfs for changing host clock at runtime mmc: sdhci: allow for eMMC 74 clock generation by controller mmc: sdhci: highspeed: check for mmc as well as sd cards mmc: sdhci: Add Moorestown device support mmc: sdhci: Intel Medfield support ...
2010-10-28Merge branch 'for-next' of ↵Linus Torvalds2-2/+4
git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus: hfsplus: free space correcly for files unlinked while open hfsplus: fix double lock typo in ioctl
2010-10-28ext4: fix compile with CONFIG_EXT4_FS_XATTR disabledIngo Molnar1-1/+1
Commit 5dabfc78dced ("ext4: rename {exit,init}_ext4_*() to ext4_{exit,init}_*()") causes fs/ext4/super.c:4776: error: implicit declaration of function ‘ext4_init_xattr’ when CONFIG_EXT4_FS_XATTR is disabled. It renamed init_ext4_xattr to ext4_init_xattr but forgot to update the dummy definition in fs/ext4/xattr.h. Signed-off-by: Ingo Molnar <[email protected]> Acked-by: "Theodore Ts'o" <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>