- Oct 12, 2021
-
-
Paul Fertser authored
We have bool so use it consistently in all the drivers. The following Coccinelle script was used: @@ identifier T; type t = { char, int }; @@ struct T { ... - t valid; + bool valid; ... } @@ identifier v; @@ ( - v->valid = 0 + v->valid = false | - v->valid = 1 + v->valid = true ) followed by sed to fixup the comments: sed '/bool valid;/{s/!=0/true/;s/zero/false/}' Few whitespace changes were fixed manually. All modified drivers were compile-tested. Signed-off-by:
Paul Fertser <fercerpav@gmail.com> Link: https://lore.kernel.org/r/20210924195202.27917-1-fercerpav@gmail.com [groeck: Fixed up 'u8 valid' to 'boool valid' in atxp1.c] Signed-off-by:
Guenter Roeck <linux@roeck-us.net>
-
- Sep 23, 2020
-
-
Stephen Kitt authored
Many hwmon drivers don't use the id information provided by the old i2c probe function, and the remainder can easily be adapted to the new form ("probe_new") by calling i2c_match_id explicitly. This avoids scanning the identifier tables during probes. Drivers which didn't use the id are converted as-is; drivers which did are modified as follows: * if the information in i2c_client is sufficient, that's used instead (client->name); * anything else is handled by calling i2c_match_id() with the same level of error-handling (if any) as before. A few drivers aren't included in this patch because they have a different set of maintainers. They will be covered by other patches. Signed-off-by:
Stephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20200813160222.1503401-1-steve@sk2.org Signed-off-by:
Guenter Roeck <linux@roeck-us.net>
-
- May 30, 2019
-
-
Thomas Gleixner authored
Based on 3 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 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 [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] 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 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 [author] [graeme] [gregory] [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema] [hk] [hemahk]@[ti] [com] 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 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1105 file(s). Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Reviewed-by:
Allison Randal <allison@lohutok.net> Reviewed-by:
Richard Fontana <rfontana@redhat.com> Reviewed-by:
Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- Feb 18, 2019
-
-
Guenter Roeck authored
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>
-
- Jan 02, 2017
-
-
Julia Lawall authored
Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source code, improves readbility, and reduces the chance of inconsistencies. The conversion was done automatically using coccinelle. It was validated by compiling both the old and the new source code and comparing its text, data, and bss size. Signed-off-by:
Julia Lawall <Julia.Lawall@lip6.fr> [groeck: Updated description] Signed-off-by:
Guenter Roeck <linux@roeck-us.net>
-
- May 21, 2014
-
-
Guenter Roeck authored
Use devm_hwmon_device_register_with_groups API to attach attributes to hwmon device, simplify code, and reduce code size. Signed-off-by:
Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
Avoid forward declarations by rearranging code. No functional change. Signed-off-by:
Guenter Roeck <linux@roeck-us.net>
-
Guenter Roeck authored
The FSF address changes over time, so drop it. Signed-off-by:
Guenter Roeck <linux@roeck-us.net>
-
- Apr 04, 2014
-
-
Jean DELVARE authored
All hwmon drivers allocate their data structure with some form of kzalloc, so setting data fields to zero explicitly is a waste of time. Signed-off-by:
Jean Delvare <jdelvare@suse.de> Reviewed-by:
Guenter Roeck <linux@roeck-us.net>
-
- Jan 29, 2014
-
-
Jean Delvare authored
Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- Jul 22, 2012
-
-
Guenter Roeck authored
Convert to use devm_ functions to reduce code size and simplify the code. Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by:
Guenter Roeck <linux@roeck-us.net> Acked-by:
Jean Delvare <khali@linux-fr.org>
-
- Mar 19, 2012
-
-
Axel Lin authored
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>
-
Frans Meulenbroeks authored
resolved: ERROR: trailing whitespace WARNING: please, no spaces at the start of a line WARNING: simple_strtol is obsolete, use kstrtol instead ERROR: do not use assignment in if condition Signed-off-by:
Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by:
Guenter Roeck <guenter.roeck@ericsson.com>
-
- Dec 14, 2009
-
-
Jean Delvare authored
These macros simply declare an enum, so drivers might as well declare it themselves. This puts an end to the arbitrary limit of 8 chip types per i2c driver. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Tested-by:
Wolfram Sang <w.sang@pengutronix.de>
-
Jean Delvare authored
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>
-
Jean Delvare authored
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>
-
- Dec 09, 2009
-
-
Jean Delvare authored
As kind is now hard-coded to -1, there is room for code clean-ups. Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- Jul 16, 2008
-
-
Jean Delvare authored
The new-style lm83 driver implements the optional detect() callback to cover the use cases of the legacy driver. Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- Feb 19, 2008
-
-
Mark M. Hoffman authored
Signed-off-by:
Mark M. Hoffman <mhoffman@lightlink.com>
-
- Feb 08, 2008
-
-
Jean Delvare authored
Many I2C hwmon drivers define a driver ID but no other code references these, meaning that they are useless. Discard them, along with a few IDs which are defined but never used at all. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Mark M. Hoffman <mhoffman@lightlink.com>
-
- Oct 10, 2007
-
-
Tony Jones authored
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>
-
- Jul 19, 2007
-
-
Jean Delvare authored
We have the following naming convention documented in Documentation/hwmon/sysfs-interface for fault files: in[0-*]_input_fault fan[1-*]_input_fault temp[1-*]_input_fault Some drivers follow this convention (lm63, lm83, lm90, smsc47m192). However some drivers omit the "input" part and create files named fan1_fault (pc87427) or temp1_fault (dme1737). And the new "generic" libsensors follows this second (non-standard) convention, so it fails to report fault conditions for drivers which follow the standard. We want a single naming scheme, and everyone seems to prefer the shorter variant, so let's go for it. Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
- Sep 28, 2006
-
-
Jean Delvare authored
hwmon: Fix unchecked return status, batch 4 Fix up some hwmon drivers so that they no longer ignore return status from device_create_file(). Note: f71805f actually checked the status from device_create_file already. However it did not remove the files on device destruction. It was also an opportunity to use sysfs_create/remove_group instead of hand-made loops. This makes the changes much more important but I think the result is worth it. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Jean Delvare authored
hwmon: Add individual alarm files to 4 drivers Add individual sysfs files for all f71805f, lm63, lm83 and lm90 alarm and fault conditions. This is a requirement for the planned chip-independent libsensors. Almost all other hwmon drivers will need the same improvement. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- Jun 22, 2006
-
-
Jordan Crouse authored
Add LM82 temperature sensor support (similar to the LM83, but less featureful). Signed-off-by:
Jordan Crouse <jordan.crouse@amd.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- Mar 23, 2006
-
-
Ingo Molnar authored
convert drivers/hwmon/*.c semaphore use to mutexes. the conversion was generated via scripts, and the result was validated automatically via a script as well. all affected hwmon drivers were build-tested. Signed-off-by:
Ingo Molnar <mingo@elte.hu> Signed-off-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- Jan 06, 2006
-
-
Greg Kroah-Hartman authored
Now that i2c_add_driver() doesn't need the module owner to be set by hand, we can delete it from the drivers. This patch catches all of the drivers that I found in the current tree (if a driver sets the .owner by hand, it's not a problem, just not needed.) Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de> Cc: Jean Delvare <khali@linux-fr.org>
-
Laurent Riffard authored
We should use the i2c_driver.driver's .name and .owner fields instead of the i2c_driver's ones. This patch updates the hwmon drivers. Signed-off-by:
Laurent Riffard <laurent.riffard@free.fr> Signed-off-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Jean Delvare authored
Just about every i2c chip driver sets the I2C_DF_NOTIFY flag, so we can simply make it the default and drop the flag. If any driver really doesn't want to be notified when i2c adapters are added, that driver can simply omit to set .attach_adapter. This approach is also more robust as it prevents accidental NULL pointer dereferences. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- Oct 28, 2005
-
-
Deepak Saxena authored
Use kzalloc instead of kmalloc+memset in all hardware monitoring drivers. Signed-off-by:
Deepak Saxena <dsaxena@plexity.net> Signed-off-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- Sep 05, 2005
-
-
Jean Delvare authored
The only thing left in i2c-sensor.h are module parameter definition macros. It's only an extension of what i2c.h offers, and this extension is not sensors-specific. As a matter of fact, a few non-sensors drivers use them. So we better merge them in i2c.h, and get rid of i2c-sensor.h altogether. Signed-off-by:
Jean Delvare <khali@linux-fr> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Jean Delvare authored
i2c_probe and i2c_detect now do the exact same thing and operate on the same data structure, so we can have everyone call i2c_probe. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Jean Delvare authored
We could refactor the error message 34 different i2c drivers print if i2c_detach_client() fails in this function itself. Saves quite a few lines of code. Documentation is updated to reflect that change. Note that this patch should be applied after Rudolf Marek's w83792d patches. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Jean Delvare authored
Kill normal_isa in header files, documentation and all chip drivers, as it is no more used. normal_i2c could be renamed to normal, but I decided not to do so at the moment, so as to limit the number of changes. This might be done later as part of the i2c_probe/i2c_detect merge. Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Mark M. Hoffman authored
This patch modifies sensors chip drivers to make use of the new sysfs class "hwmon". Signed-off-by:
Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- Jul 11, 2005
-
-
Jean Delvare authored
Part 2: Move the driver files themselves. Note that the patch "adds trailing whitespace", because it does move the files as-is, and some files happen to have trailing whitespace. From: Jean Delvare <khali@linux-fr.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- Jun 22, 2005
-
-
Jean Delvare authored
This patch renames the new linux/i2c-sysfs.h header file to linux/hwmon-sysfs.h. This names seems to be more appropriate since this file defines macros and structures not related to i2c but to hardware monitoring drivers. The patch also updates the five hardware monitoring driver which include that header file already. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Jean Delvare authored
I updated the lm83 hardware monitoring driver to take benefit of Yani Ioannou's new sysfs callback capabilities. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Steven Cole authored
Here are some spelling corrections for drivers/i2c. occured -> occurred intialization -> initialization Everytime -> Every time transfering -> transferring relevent -> relevant continous -> continuous neccessary -> necessary explicitely -> explicitly Celcius -> Celsius differenciate -> differentiate Signed-off-by:
Steven Cole <elenstev@mesatop.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Alexey Dobriyan authored
Files that don't use CONFIG_* stuff shouldn't include config.h Files that use CONFIG_* stuff should include config.h It's that simple. ;-) Signed-off-by:
Alexey Dobriyan <adobriyan@mail.ru> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-