summaryrefslogtreecommitdiff
path: root/drivers/hwmon/adm1029.c
AgeCommit message (Collapse)AuthorFilesLines
2020-09-23hwmon: (adm1029) use simple i2c probeStephen Kitt1-3/+2
This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form. Signed-off-by: Stephen Kitt <steve@sk2.org> Acked-by: Corentin LABBE <clabbe.montjoie@gmail.com> Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com> Link: https://lore.kernel.org/r/20200813161129.1507599-1-steve@sk2.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-06-24hwmon: Convert remaining drivers to use SPDX identifierGuenter Roeck1-10/+0
This gets rid of the unnecessary license boilerplate, and avoids having to deal with individual patches one by one. No functional changes intended. Reviewed-by: Corentin Labbe <clabbe.montjoie@gmail.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-04-16hwmon: (adm1029) Use permission specific [SENSOR_][DEVICE_]ATTR variantsGuenter Roeck1-20/+21
Use [SENSOR_][DEVICE_]ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, 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/. This patch does not introduce functional changes. It was verified by compiling the old and new files and comparing text and data sizes. Cc: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-02-19hwmon: (adm1029) Add a comment for locking mutexCorentin Labbe1-1/+1
Checkpatch complains that mutex does not have any comment. This patch fix that. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-02-19hwmon: (adm1029) Fix function alignmentCorentin Labbe1-3/+3
This patch fix the "Alignment should match open parenthesis" checkpatch warning. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-02-19hwmon: (adm1029) Fix Logical continuations should be on the previous line ↵Corentin Labbe1-7/+6
checkpatch warning This patchs fix the "Logical continuations should be on the previous line" checkpatch warning. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-02-19hwmon: (adm1029) Add blank line after declarationsCorentin Labbe1-0/+4
As requested by checkpatch, this patch adds a blank line after declarations Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-02-19hwmon: (adm1029) replace S_IXXX macros by their numeric valuesCorentin Labbe1-21/+16
As requested by checkpatch, this patch replace S_IXXX macros by their numeric values. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-02-19hwmon: (adm1029) Add SPDX headerCorentin Labbe1-0/+1
This patch addes SPDX header to adm1029 Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-02-19hwmon: (adm1029) Remove write to FFF paragraphCorentin Labbe1-4/+0
As suggested by checkpatch, remove the "write to FFF" paragraph. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (adm1029) Convert to devm_hwmon_device_register_with_groupsAxel Lin1-40/+15
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (adm1029) Avoid forward declarationsAxel Lin1-93/+78
Reorder functions to avoid forward declarations. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-07-03hwmon: (adm1029) Ensure the fan_div cache is updated in set_fan_divAxel Lin1-0/+3
Writing to fanX_div does not clear the cache. As a result, reading from fanX_div may return the old value for up to two seconds after writing a new value. This patch ensures the fan_div cache is updated in set_fan_div(). Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Axel Lin <axel.lin@ingics.com> Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-05-22hwmon: (adm1029) Update Corentin Labbe's emailLABBE Corentin1-2/+2
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-01-29Update Jean Delvare's e-mail addressJean Delvare1-1/+1
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2013-04-08hwmon: Fix checkpatch warning 'quoted string split across lines'Guenter Roeck1-4/+5
Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Cc: Marc Hulsman <m.hulsman@tudelft.nl> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-09-24hwmon: (adm1029) Convert to use devm_ functionsGuenter Roeck1-14/+7
Convert to use devm_ functions to reduce code size and simplify the code. Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-19hwmon: (adm1029) Fix multi-line commentsGuenter Roeck1-8/+11
Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-19hwmon: convert drivers/hwmon/* to use module_i2c_driver()Axel Lin1-17/+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-03-19hwmon: (adm1029) fix checkpatch issuesFrans Meulenbroeks1-3/+7
fixed: ERROR: space prohibited after that open parenthesis '(' +#define DIV_FROM_REG(val) ( 1 << (((val) >> 6) - 1)) WARNING: simple_strtol is obsolete, use kstrtol instead + long val = simple_strtol(buf, NULL, 10); ERROR: do not use assignment in if condition + if ((err = sysfs_create_group(&client->dev.kobj, &adm1029_group))) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2009-12-14i2c: Drop I2C_CLIENT_INSMOD_1Jean Delvare1-7/+1
This macro simply declares an enum, so drivers might as well declare it themselves. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Wolfram Sang <w.sang@pengutronix.de>
2009-12-14i2c: Get rid of struct i2c_client_address_dataJean Delvare1-1/+1
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 <khali@linux-fr.org> Tested-by: Wolfram Sang <w.sang@pengutronix.de>
2009-12-14i2c: Drop the kind parameter from detect callbacksJean Delvare1-2/+2
The "kind" parameter always has value -1, and nobody is using it any longer, so we can remove it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Wolfram Sang <w.sang@pengutronix.de>
2009-12-10Merge branch 'hwmon-for-linus' of ↵Linus Torvalds1-39/+16
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: (41 commits) hwmon: (adt7475) Add VID support for the ADT7476 hwmon: (adt7475) Add an entry in MAINTAINERS hwmon: (adt7475) Add support for the ADT7476 hwmon: (adt7475) Voltage attenuators can be bypassed hwmon: (adt7475) Print device information on probe hwmon: (adt7475) Handle alternative pin functions hwmon: (adt7475) Move sysfs files removal to a separate function hwmon: (adt7475) Add support for the ADT7490 hwmon: (adt7475) Improve device detection hwmon: (adt7475) Add missing static marker hwmon: (adt7475) Rework voltage inputs handling hwmon: (adt7475) Implement pwm_use_point2_pwm_at_crit hwmon: (adt7475) New documentation hwmon: (adt7475) Add support for the ADT7473 hwmon: (f71882fg) Add support for the f71889fg (version 2) hwmon: (f71882fg) Fix sysfs file removal hwmon: (f71882fg) Cleanup sysfs attr creation 2/2 hwmon: (f71882fg) Cleanup sysfs attr creation 1/2 hwmon: (thmc50) Stop using I2C_CLIENT_MODULE_PARM hwmon: Add Freescale MC13783 ADC driver ...
2009-12-09hwmon: Clean up detect functionsJean Delvare1-39/+16
As kind is now hard-coded to -1, there is room for code clean-ups. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Corentin Labbe <corentin.labbe@geomatys.fr> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Riku Voipio <riku.voipio@iki.fi> Acked-by: "Hans J. Koch" <hjk@linutronix.de> Cc: Rudolf Marek <r.marek@assembler.cz>
2009-12-04tree-wide: fix assorted typos all over the placeAndré Goddard Rosa1-1/+1
That is "success", "unknown", "through", "performance", "[re|un]mapping" , "access", "default", "reasonable", "[con]currently", "temperature" , "channel", "[un]used", "application", "example","hierarchy", "therefore" , "[over|under]flow", "contiguous", "threshold", "enough" and others. Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-10-17hwmon: (adm1029) Use mask for fan_div valueCorentin Labbe1-2/+3
This is my patch for testing correct values of fan div in adm1029 and prevent a division by 0 for some (unlikely) register values. Signed-off-by: Corentin Labbe <corentin.labbe@geomatys.fr> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16hwmon: (adm1029) Convert to a new-style i2c driverJean Delvare1-53/+44
The new-style adm1029 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Corentin Labbe <corentin.labbe@geomatys.fr>
2008-02-19hwmon: normal_i2c arrays should be constMark M. Hoffman1-4/+2
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-10-10hwmon: Convert from class_device to deviceTony Jones1-5/+5
Convert from class_device to device for hwmon_device_register/unregister Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-02-14hwmon: New driver for the Analog Devices ADM1029Corentin Labbe1-0/+508
Signed-off-by: Corentin Labbe <corentin.labbe@geomatys.fr> Signed-off-by: Jean Delvare <khali@linux-fr.org>