aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/w83795.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
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 <khali@linux-fr.org>
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 <khali@linux-fr.org>
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 <khali@linux-fr.org>
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 <khali@linux-fr.org>
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 <khali@linux-fr.org>
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 <khali@linux-fr.org>
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 <khali@linux-fr.org>
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 <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Misc cleanupsJean Delvare1-6/+1
* 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 Song1-0/+2138
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>