03 Jan, 2017
1 commit
-
Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for
read/write 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
[groeck: Updated description]
Signed-off-by: Guenter Roeck
29 Aug, 2014
1 commit
-
After the conversion rate is changed, the zbits are not updated,
but should be, since they are used later in the set_temp function.Fixes: a50d9a4d9ad3 ("hwmon: (ds1621) Fix temperature rounding operations")
Reported-by: Murat Ilsever
Signed-off-by: Robert Coulson
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck
30 Jan, 2014
1 commit
-
Signed-off-by: Jean Delvare
19 Oct, 2013
1 commit
-
drivers/hwmon/ds1621.c:381:1-3: WARNING: PTR_RET can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: coccinelle/api/ptr_ret.cocci
CC: Guenter Roeck
Signed-off-by: Fengguang Wu
Signed-off-by: Guenter Roeck
14 Oct, 2013
2 commits
-
Also use new macro __ATTRIBUTE_GROUPS to declare attribute groups.
Signed-off-by: Guenter Roeck
-
Signed-off-by: Guenter Roeck
28 Jun, 2013
6 commits
-
Commit "hwmon: (ds1621) Add ds1721 chip support" broke rounding
for chips or configurations with less than 12 bit resolution.Tested-by: Jean Delvare
Acked-by: Jean Delvare
Signed-off-by: Guenter Roeck -
These changes add DS1731 chip support to the ds1621 driver,
Kconfig, and documentation.Signed-off-by: Robert Coulson
Signed-off-by: Guenter Roeck -
Due to a lack of device and vendor identification registers, the
Dallas/Maxim DS16xx devices cannot be uniquely detected, sometimes
resulting in false positives. Therefore, the detect function is
being removed in favor of explicit device instantiation.Signed-off-by: Robert Coulson
Acked-by: Jean Delvare
Signed-off-by: Guenter Roeck -
Add definitions, information, and code for ds1631 chip support
to the ds1621 driver.Signed-off-by: Robert Coulson
Signed-off-by: Guenter Roeck -
The ds1721 device can be configured for 9..12 bit resolutions;
add a sysfs attribute for userspace to configure this attribute.
The definition, description, details, and usage are shown in the
documentation and were crafted from an LM73 driver patch done by
Chris Verges & Guenter Roeck).Signed-off-by: Robert Coulson
Signed-off-by: Guenter Roeck -
Update the ds1621 documentation, driver, and Kconfig with
ds1721 chip support.Signed-off-by: Robert Coulson
Signed-off-by: Guenter Roeck
22 Jul, 2012
1 commit
-
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare
19 Mar, 2012
2 commits
-
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: trailing whitespace
WARNING: labels should not be indented
WARNING: please, no spaces at the start of a line
WARNING: simple_strtol is obsolete, use kstrtol insteadAlso modified multi-line comments to follow Documentation/CodingStyle.
Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare -
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
Cc: Corentin Labbe
Cc: Dirk Eibach
Cc: "Mark M. Hoffman"
Cc: Steve Glendinning
Cc: Riku Voipio
Cc: Guillaume Ligneul
Cc: David George
Cc: "Hans J. Koch"
Cc: Marc Hulsman
Cc: Rudolf Marek
Signed-off-by: Guenter Roeck
04 Nov, 2011
1 commit
-
Make use of the new i2c_smbus_{read,write}_word_swapped functions.
This makes the driver code more compact and readable. It also ensures
proper error handling.Signed-off-by: Jean Delvare
Acked-by: Jonathan Cameron
Acked-by: Guenter Roeck
Cc: Dirk Eibach
Cc: "Mark M. Hoffman"
Cc: Guillaume Ligneul
15 Dec, 2009
3 commits
-
This macro simply declares an enum, so drivers might as well declare
it themselves.Signed-off-by: Jean Delvare
Tested-by: Wolfram Sang -
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
Tested-by: Wolfram Sang -
The "kind" parameter always has value -1, and nobody is using it any
longer, so we can remove it.Signed-off-by: Jean Delvare
Tested-by: Wolfram Sang
10 Dec, 2009
1 commit
-
As kind is now hard-coded to -1, there is room for code clean-ups.
Signed-off-by: Jean Delvare
Acked-by: Corentin Labbe
Cc: "Mark M. Hoffman"
Cc: Juerg Haefliger
Cc: Riku Voipio
Acked-by: "Hans J. Koch"
Cc: Rudolf Marek
31 Mar, 2009
3 commits
-
Register access over SMBus isn't cheap, so avoid register access where
possible:
* Only write back the configuration register if it changed.
* Don't refresh the register cache when we don't have to.Signed-off-by: Jean Delvare
Cc: Aurelien Jarno -
Fix a few oddities in how the ds1621 driver accesses the registers:
* We don't need a wrapper to access the configuration register.
* Check for error before calling swab16. Error checking isn't
complete yet, but that's a start.
* Device-specific read functions should never be called during
detection, as by definition we don't know what device we are talking
to at that point.
* Likewise, don't assume that register reads succeed during detection.Signed-off-by: Jean Delvare
Cc: Aurelien Jarno -
Reorder the ds1621 driver code so that we can get rid of forward
function declarations.Signed-off-by: Jean Delvare
Cc: Aurelien Jarno
17 Jul, 2008
1 commit
-
The new-style ds1621 driver implements the optional detect() callback
to cover the use cases of the legacy driver.Signed-off-by: Jean Delvare
19 Feb, 2008
1 commit
-
Signed-off-by: Mark M. Hoffman
08 Feb, 2008
1 commit
-
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
Signed-off-by: Mark M. Hoffman
10 Oct, 2007
2 commits
-
Convert from class_device to device for hwmon_device_register/unregister
Signed-off-by: Tony Jones
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Kay Sievers
Signed-off-by: Mark M. Hoffman -
- replace differing temperature variable types by long
- use strtol() instead of strtoul() for conversionSigned-off-by: Christian Hohnstaedt
Acked-by: Jean Delvare
Signed-off-by: Mark M. Hoffman
20 Jul, 2007
3 commits
-
Future versions of libsensors will need this.
Signed-off-by: Jean Delvare
Cc: Aurelien Jarno -
This lets us get rid of macro-generated functions and shrinks the
driver size by about 8%.Signed-off-by: Jean Delvare
Cc: Aurelien Jarno -
* Discard comments which do not apply or are redundant.
* Remove a few useless instructions.
* Rename new_client to just client.Signed-off-by: Jean Delvare
Cc: Aurelien Jarno
28 May, 2007
1 commit
-
The low temperature limit and the high temperature limit registers
have been accidentally swapped, causing alarms to trigger
when they shouldn't.Signed-off-by: Jean Delvare
Acked-by: Aurelien Jarno
29 Sep, 2006
1 commit
-
hwmon: Fix unchecked return status, batch 6
Fix up 5 more hwmon drivers so that they no longer ignore return status
from device_create_file().Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
24 Mar, 2006
1 commit
-
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
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
06 Jan, 2006
3 commits
-
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
Cc: Jean Delvare -
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
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman
29 Oct, 2005
3 commits
-
Fixup functions that have been declared static
and then actually defined without the static on.Signed-off-by: Ben Dooks
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman -
Use kzalloc instead of kmalloc+memset in all hardware monitoring
drivers.Signed-off-by: Deepak Saxena
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman -
The atxp1 and ds1621 drivers should make sure they do not probe
non-hwmon i2c adapters.Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman