Commit Graph
14 Commits
Author SHA1 Message Date
Axel Lin 7edc8cc19f hwmon: (max6639) Make normal_i2c array const
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Roland Stigge <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
2014-08-04 07:01:39 -07:00
Jingoo Han 768821a302 hwmon: (max6639) Use SIMPLE_DEV_PM_OPS macro
Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.

Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Roland Stigge <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
2014-03-03 08:01:06 -08:00
Guenter Roeck 7981c5846a hwmon: (max6639) Convert to use devm_hwmon_device_register_with_groups
Simplify code, reduce code size, and attach sysfs attricutes to hwmon device.

Signed-off-by: Guenter Roeck <[email protected]>
Reviewed-by: Jean Delvare <[email protected]>
2014-03-03 08:01:06 -08:00
Guenter Roeck c1ea0a0431 hwmon: (max6639) Introduce local dev variable, and reduce noisiness
Introduce local variable 'dev' in probe function to make code easier
to read. Also drop dev_info message in probe to reduce noisiness
during boot.

Signed-off-by: Guenter Roeck <[email protected]>
Reviewed-by: Jean Delvare <[email protected]>
2014-03-03 08:01:06 -08:00
Jingoo Han a8b3a3a53f hwmon: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
2013-08-11 22:10:39 -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 b07405fbc3 hwmon: (max6639) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.

Cc: Roland Stigge <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Roland Stigge <[email protected]>
2012-07-21 21:48:38 -07:00
Mark Brown 52f30f7717 hwmon: (max6639) Convert to dev_pm_ops
The I2C specific PM operations have been deprecated and printing a
warning on boot for over a year now.

Signed-off-by: Mark Brown <[email protected]>
[[email protected]: Added missing #ifdef around pm functions]
Cc: [email protected] # 3.0+
Signed-off-by: Guenter Roeck <[email protected]>
2012-04-01 10:24:08 -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
Chris D Schimp 2f2da1ac0b hwmon: (max6639) Fix PPR register initialization to set both channels
Initialize PPR register for both channels, and set correct PPR register bits.
Also remove unnecessary variable initializations.

Signed-off-by: Chris D Schimp <[email protected]>
[[email protected]: Merged two patches into one]
Signed-off-by: Guenter Roeck <[email protected]>
Cc: [email protected] # 3.0+
Acked-by: Roland Stigge <[email protected]>
2012-02-21 14:30:45 -08:00
Chris D Schimp b63d97a36e hwmon: (max6639) Fix FAN_FROM_REG calculation
RPM calculation from tachometer value does not depend on PPR.
Also, do not report negative RPM values.

Signed-off-by: Chris D Schimp <[email protected]>
[[email protected]: do not report negative RPM values]
Signed-off-by: Guenter Roeck <[email protected]>
Cc: [email protected] # 3.0+
Acked-by: Roland Stigge <[email protected]>
2012-02-21 14:30:12 -08:00
Frans Meulenbroeks 179c4fdb56 hwmon: replaced strict_str* with kstr*
replaced strict_strtol with kstrtol and
replaced strict_strtuol with kstrtuol

This satisfies checkpatch -f
Compile tested only: no warnings or errors given

Signed-off-by: Frans Meulenbroeks <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
2012-01-05 08:19:34 -08:00
[email protected] 177f3b920c hwmon: (max6639) Set reasonable default PWM frequency
This patch initializes register CONFIG3 to a reasonable default PWM frequency
of 25kHz, to prevent audible sound in fan.

Signed-off-by: Roland Stigge <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
2011-03-14 22:36:25 -07:00
[email protected] a5b79d62f2 hwmon: Driver for Maxim MAX6639
2-Channel Temperature Monitor with Dual PWM Fan-Speed Controller

Signed-off-by: Roland Stigge <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
2011-03-14 22:36:24 -07:00