Commit Graph
24 Commits
Author SHA1 Message Date
Guenter Roeck 71ba0f315c hwmon: (max6650) Introduce local 'dev' variable
This makes the code a bit easier to read.

Reviewed-by: Jean Delvare <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
2014-03-03 08:01:06 -08:00
Guenter Roeck 0b5e33b632 hwmon: (max6650) Drop error message after memory allocation failures
The core code already generates an error message.

Reviewed-by: Jean Delvare <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
2014-03-03 08:01:05 -08:00
Guenter Roeck 17eaa25c3e hwmon: (max6650) Convert to use devm_hwmon_device_register_with_groups
Simplify code, reduce code size, and attach sensor attributes
to hwmon device.

Reviewed-by: Jean Delvare <[email protected]>
Acked-by: Lee Jones <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
2014-03-03 08:01:05 -08:00
Guenter Roeck 1577f94bce hwmon: (max6650) Rearrange code to no longer require forward declarations
Cleanup only; no functional change.

Reviewed-by: Jean Delvare <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
2014-03-03 08:01:05 -08:00
LABBE Corentin 84fb029faa hwmon: Correct some typos
Signed-off-by: LABBE Corentin <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
2013-10-18 09:12:02 -07:00
Guenter Roeck 2a844c148e hwmon: Replace SENSORS_LIMIT with clamp_val
SENSORS_LIMIT and the generic clamp_val have the same functionality,
and clamp_val is more efficient.

This patch reduces text size by 9052 bytes and bss size by 11624 bytes
for x86_64 builds.

Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: George Joseph <[email protected]>
Acked-by: Jean Delvare <[email protected]>
2013-01-25 21:03:54 -08:00
Guenter Roeck 94cd52027a hwmon: (max6650) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Hans J. Koch <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Hans J. Koch <[email protected]>
2012-07-21 21:48:37 -07:00
Axel Lin f0967eea80 hwmon: convert drivers/hwmon/* to use module_i2c_driver()
This patch converts the drivers in drivers/hwmon/* to use the
module_i2c_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <[email protected]>
Cc: Corentin Labbe <[email protected]>
Cc: Dirk Eibach <[email protected]>
Cc: "Mark M. Hoffman" <[email protected]>
Cc: Steve Glendinning <[email protected]>
Cc: Riku Voipio <[email protected]>
Cc: Guillaume Ligneul <[email protected]>
Cc: David George <[email protected]>
Cc: "Hans J. Koch" <[email protected]>
Cc: Marc Hulsman <[email protected]>
Cc: Rudolf Marek <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
2012-03-18 18:26:50 -07:00
Guenter Roeck 703af96040 hwmon: (max6650) Fix multi-line comments
Cc: Hans J. Koch <[email protected]>
Acked-by: Hans J. Koch <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
2012-03-18 18:26:47 -07:00
Guenter Roeck bafda5d0f5 hwmon: (max6650) Fix checkpatch issues
Fixed:
ERROR: do not use assignment in if condition
ERROR: open brace '{' following struct go on the same line
ERROR: spaces required around that '||' (ctx:VxV)
ERROR: switch and case should be at the same indent
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Cc: Hans J. Koch <[email protected]>
Acked-by: Hans J. Koch <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
2012-03-18 18:26:44 -07:00
Al Viro 587a1f1659 switch ->is_visible() to returning umode_t
Signed-off-by: Al Viro <[email protected]>
2012-01-03 22:54:55 -05:00
Jean Delvare 9c084dae5d hwmon: (max6650) Properly support the MAX6650
The MAX6650 has only one fan input.

Signed-off-by: Jean Delvare <[email protected]>
Acked-by: "Hans J. Koch" <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
2011-05-25 20:43:32 +02:00
Jean Delvare 67b670ff04 hwmon: (max6650) Drop device detection
MAX6650 device detection is unreliable, we got reports of false
positives. We now have many ways to let users instantiate the devices
explicitly, so unreliable detection should be dropped.

Signed-off-by: Jean Delvare <[email protected]>
Acked-by: "Hans J. Koch" <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
2011-05-25 20:43:32 +02:00
Hans J. Koch 2aa25c22c4 hwmon: Change mail address of Hans J. Koch
My old mail address doesn't exist anymore. This changes all occurrences
to my new address.

Signed-off-by: Hans J. Koch <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
2010-11-15 21:38:56 +01:00
Jean Delvare 1f86df49dd i2c: Drop I2C_CLIENT_INSMOD_1
This macro simply declares an enum, so drivers might as well declare
it themselves.

Signed-off-by: Jean Delvare <[email protected]>
Tested-by: Wolfram Sang <[email protected]>
2009-12-14 21:17:26 +01:00
Jean Delvare c3813d6af1 i2c: Get rid of struct i2c_client_address_data
Struct i2c_client_address_data only contains one field at this point,
which makes its usefulness questionable. Get rid of it and pass simple
address lists around instead.

Signed-off-by: Jean Delvare <[email protected]>
Tested-by: Wolfram Sang <[email protected]>
2009-12-14 21:17:25 +01:00
Jean Delvare 310ec79210 i2c: Drop the kind parameter from detect callbacks
The "kind" parameter always has value -1, and nobody is using it any
longer, so we can remove it.

Signed-off-by: Jean Delvare <[email protected]>
Tested-by: Wolfram Sang <[email protected]>
2009-12-14 21:17:23 +01:00
Jean Delvare 52df6440a2 hwmon: Clean up detect functions
As kind is now hard-coded to -1, there is room for code clean-ups.

Signed-off-by: Jean Delvare <[email protected]>
Acked-by: Corentin Labbe <[email protected]>
Cc: "Mark M. Hoffman" <[email protected]>
Cc: Juerg Haefliger <[email protected]>
Cc: Riku Voipio <[email protected]>
Acked-by: "Hans J. Koch" <[email protected]>
Cc: Rudolf Marek <[email protected]>
2009-12-09 20:35:57 +01:00
Jiri Slaby 025dc740d0 hwmon: (max6650) Fix lock imbalance
Add omitted update_lock to one switch/case in set_div.

Signed-off-by: Jiri Slaby <[email protected]>
Acked-by: Hans J. Koch <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
2009-07-11 13:42:37 +02:00
Christian Engelmayer 52b5226f48 hwmon: (max6650) Add support for alarms
Export the alarm flags provided by the MAX6650/MAX6651 fan-speed regulator
and monitor chips via sysfs.

Signed-off-by: Christian Engelmayer <[email protected]>
Acked-by: Hans de Goede <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
2009-06-15 18:39:52 +02:00
Jean Delvare 0d57abd5b8 hwmon: (max6650) Convert to a new-style i2c driver
The new-style max6650 driver implements the optional detect() callback
to cover the use cases of the legacy driver.

Signed-off-by: Jean Delvare <[email protected]>
Cc: Hans J. Koch <[email protected]>
2008-07-16 19:30:16 +02:00
Mark M. Hoffman 25e9c86d5a hwmon: normal_i2c arrays should be const
Signed-off-by: Mark M. Hoffman <[email protected]>
2008-02-18 21:58:15 -05:00
Tony Jones 1beeffe433 hwmon: Convert from class_device to device
Convert from class_device to device for hwmon_device_register/unregister

Signed-off-by: Tony Jones <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Kay Sievers <[email protected]>
Signed-off-by: Mark M. Hoffman <[email protected]>
2007-10-09 22:56:30 -04:00
Hans-Juergen Koch d20620de0c hwmon: New max6650 driver
This driver supports the Maxim MAX6650 and MAX6651 fan speed
monitoring and control chips.

Signed-off-by: Hans J. Koch <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
2007-05-08 17:22:00 +02:00