aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/max6639.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-24treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61Thomas Gleixner1-14/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 675 mass ave cambridge ma 02139 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 441 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-18hwmon: (max6639) Use permission specific SENSOR[_DEVICE]_ATTR variantsGuenter Roeck1-49/+43
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readability, and to reduce the chance of inconsistencies. Also replace any remaining S_<PERMS> in the driver with octal values. The conversion was done automatically with coccinelle. The semantic patches and the scripts used to generate this commit log are available at https://github.com/groeck/coccinelle-patches/hwmon/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-06-11hwmon: (max6639) move header file out of I2C realmWolfram Sang1-1/+1
include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (max6639) Make normal_i2c array constAxel Lin1-1/+1
Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03hwmon: (max6639) Use SIMPLE_DEV_PM_OPS macroJingoo Han1-3/+1
Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-03hwmon: (max6639) Convert to use devm_hwmon_device_register_with_groupsGuenter Roeck1-55/+26
Simplify code, reduce code size, and attach sysfs attricutes to hwmon device. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2014-03-03hwmon: (max6639) Introduce local dev variable, and reduce noisinessGuenter Roeck1-7/+5
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 <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de>
2013-08-11hwmon: use dev_get_platdata()Jingoo Han1-1/+1
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-01-25hwmon: Replace SENSORS_LIMIT with clamp_valGuenter Roeck1-2/+2
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 <linux@roeck-us.net> Acked-by: George Joseph <george.joseph@fairview5.com> Acked-by: Jean Delvare <khali@linux-fr.org>
2012-07-21hwmon: (max6639) Convert to use devm_ functionsGuenter Roeck1-11/+6
Convert to use devm_ functions to reduce code size and simplify the code. Cc: Roland Stigge <stigge@antcom.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Roland Stigge <stigge@antcom.de>
2012-04-01hwmon: (max6639) Convert to dev_pm_opsMark Brown1-4/+11
The I2C specific PM operations have been deprecated and printing a warning on boot for over a year now. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> [guenter.roeck@ericsson.com: Added missing #ifdef around pm functions] Cc: stable@vger.kernel.org # 3.0+ Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18hwmon: convert drivers/hwmon/* to use module_i2c_driver()Axel Lin1-12/+1
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 <axel.lin@gmail.com> Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Cc: Dirk Eibach <eibach@gdsys.de> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Steve Glendinning <steve.glendinning@smsc.com> Cc: Riku Voipio <riku.voipio@iki.fi> Cc: Guillaume Ligneul <guillaume.ligneul@gmail.com> Cc: David George <david.george@ska.ac.za> Cc: "Hans J. Koch" <hjk@hansjkoch.de> Cc: Marc Hulsman <m.hulsman@tudelft.nl> Cc: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-02-21hwmon: (max6639) Fix PPR register initialization to set both channelsChris D Schimp1-7/+9
Initialize PPR register for both channels, and set correct PPR register bits. Also remove unnecessary variable initializations. Signed-off-by: Chris D Schimp <silverchris@gmail.com> [guenter.roeck@ericsson.com: Merged two patches into one] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: stable@vger.kernel.org # 3.0+ Acked-by: Roland Stigge <stigge@antcom.de>
2012-02-21hwmon: (max6639) Fix FAN_FROM_REG calculationChris D Schimp1-3/+3
RPM calculation from tachometer value does not depend on PPR. Also, do not report negative RPM values. Signed-off-by: Chris D Schimp <silverchris@gmail.com> [guenter.roeck@ericsson.com: do not report negative RPM values] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: stable@vger.kernel.org # 3.0+ Acked-by: Roland Stigge <stigge@antcom.de>
2012-01-05hwmon: replaced strict_str* with kstr*Frans Meulenbroeks1-4/+4
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 <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-03-14hwmon: (max6639) Set reasonable default PWM frequencystigge@antcom.de1-2/+16
This patch initializes register CONFIG3 to a reasonable default PWM frequency of 25kHz, to prevent audible sound in fan. Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-03-14hwmon: Driver for Maxim MAX6639stigge@antcom.de1-0/+639
2-Channel Temperature Monitor with Dual PWM Fan-Speed Controller Signed-off-by: Roland Stigge <stigge@antcom.de> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>