History log of /drivers/hwmon/ds1621.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
19f2c05964dc428ef639fcda1cce7c8c3075c9cc 14-Jan-2012 Guenter Roeck <linux@roeck-us.net> hwmon: (ds1621) Fix checkpatch issues

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 instead

Also modified multi-line comments to follow Documentation/CodingStyle.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
/drivers/hwmon/ds1621.c
f0967eea80ec2a19a4fe1ad27e3ff1b22c79a3c7 20-Jan-2012 Axel Lin <axel.lin@gmail.com> 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 <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>
/drivers/hwmon/ds1621.c
90f4102ce59226954edbe960b2434d8b3da5f086 04-Nov-2011 Jean Delvare <khali@linux-fr.org> hwmon: Use i2c_smbus_{read,write}_word_swapped

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 <khali@linux-fr.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Dirk Eibach <eibach@gdsys.de>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Guillaume Ligneul <guillaume.ligneul@gmail.com>
/drivers/hwmon/ds1621.c
1f86df49ddfd0067cce941187d57b2fd2f749a9e 14-Dec-2009 Jean Delvare <khali@linux-fr.org> i2c: Drop I2C_CLIENT_INSMOD_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>
/drivers/hwmon/ds1621.c
c3813d6af177fab19e322f3114b1f64fbcf08d71 14-Dec-2009 Jean Delvare <khali@linux-fr.org> i2c: Get rid of struct i2c_client_address_data

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>
/drivers/hwmon/ds1621.c
310ec79210d754afe51e2e4a983e846b60179abd 14-Dec-2009 Jean Delvare <khali@linux-fr.org> i2c: Drop the kind parameter from detect callbacks

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>
/drivers/hwmon/ds1621.c
52df6440a29123eed912183fe785bbe174ef14b9 09-Dec-2009 Jean Delvare <khali@linux-fr.org> hwmon: Clean up detect functions

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>
/drivers/hwmon/ds1621.c
e4879e28abd67b894fb9d2db0afd08f1945670ba 30-Mar-2009 Jean Delvare <khali@linux-fr.org> hwmon: (ds1621) Avoid unneeded register access

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 <khali@linux-fr.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>
/drivers/hwmon/ds1621.c
594592dc6f68356a3b7278eb4d260a50a66f0a06 30-Mar-2009 Jean Delvare <khali@linux-fr.org> hwmon: (ds1621) Clean up register access

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 <khali@linux-fr.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>
/drivers/hwmon/ds1621.c
9202add67454c6a6f9508f41e733edce705dc56e 30-Mar-2009 Jean Delvare <khali@linux-fr.org> hwmon: (ds1621) Reorder code statements

Reorder the ds1621 driver code so that we can get rid of forward
function declarations.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>
/drivers/hwmon/ds1621.c
70313eabfc63ce6aa89b9fa3074129e5c521568a 16-Jul-2008 Jean Delvare <khali@linux-fr.org> hwmon: (ds1621) Convert to a new-style i2c driver

The new-style ds1621 driver implements the optional detect() callback
to cover the use cases of the legacy driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
/drivers/hwmon/ds1621.c
25e9c86d5a6d82ea45eb680fc66bf73ac5e50dff 18-Feb-2008 Mark M. Hoffman <mhoffman@lightlink.com> hwmon: normal_i2c arrays should be const

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
/drivers/hwmon/ds1621.c
7b501b1f53605bec17454dd8bbdbbf3f57a7cf32 03-Jan-2008 Jean Delvare <khali@linux-fr.org> hwmon: Discard useless I2C driver IDs

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>
/drivers/hwmon/ds1621.c
1beeffe43311f64df8dd0ab08ff6b1858c58363f 20-Aug-2007 Tony Jones <tonyj@suse.de> hwmon: Convert from class_device to device

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>
/drivers/hwmon/ds1621.c
5bfedac045082a97e20d47d876071279ef984d28 16-Aug-2007 Christian Hohnstaedt <chohnstaedt@innominate.com> hwmon: Allow writing of negative trigger temperatures

- replace differing temperature variable types by long
- use strtol() instead of strtoul() for conversion

Signed-off-by: Christian Hohnstaedt <chohnstaedt@innominate.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
/drivers/hwmon/ds1621.c
87f0f31baf9ea2cb273d7fb56b3ebf9df5096884 09-Jun-2007 Jean Delvare <khali@linux-fr.org> hwmon/ds1621: Create individual alarm files

Future versions of libsensors will need this.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>
/drivers/hwmon/ds1621.c
46a2e71ced949ecf238f796c178f85f03501ce88 09-Jun-2007 Jean Delvare <khali@linux-fr.org> hwmon/ds1621: Use dynamic sysfs callbacks

This lets us get rid of macro-generated functions and shrinks the
driver size by about 8%.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>
/drivers/hwmon/ds1621.c
75819f01af77d6d70abc7777e450a0848a9b898b 09-Jun-2007 Jean Delvare <khali@linux-fr.org> hwmon/ds1621: Minor cleanups

* 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 <khali@linux-fr.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>
/drivers/hwmon/ds1621.c
7574d7e937f81754dfd82deac24aea5880107e2d 27-May-2007 Jean Delvare <khali@linux-fr.org> hwmon/ds1621: Fix swapped temperature limits

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 <khali@linux-fr.org>
Acked-by: Aurelien Jarno <aurelien@aurel32.net>
/drivers/hwmon/ds1621.c
a5ebe668add5f76ed8f01f752b37cfa164a26a30 24-Sep-2006 Jean Delvare <khali@linux-fr.org> hwmon: Fix unchecked return status, batch 6

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 <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/hwmon/ds1621.c
9a61bf6300533d3b64d7ff29adfec00e596de67d 18-Jan-2006 Ingo Molnar <mingo@elte.hu> [PATCH] hwmon: Semaphore to mutex conversions

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>
/drivers/hwmon/ds1621.c
2b48716d1d2f2edb1e7cbc5ecf1cb2cb39373e33 07-Dec-2005 Greg Kroah-Hartman <gregkh@suse.de> [PATCH] I2C: Remove .owner setting from i2c_driver as it's no longer needed

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>
/drivers/hwmon/ds1621.c
cdaf79349c7d24e1d33acb6497849c9e956a33ea 26-Nov-2005 Laurent Riffard <laurent.riffard@free.fr> [PATCH] i2c: Drop i2c_driver.{owner,name}, 3 of 11

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>
/drivers/hwmon/ds1621.c
8a9947552d43b0d20d5fa23ac0ba435d526be454 26-Nov-2005 Jean Delvare <khali@linux-fr.org> [PATCH] i2c: Drop i2c_driver.flags, 2 of 3

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>
/drivers/hwmon/ds1621.c
c49efceffa599299ab3f38b1cdf8c2f1bf9811c4 26-Oct-2005 Ben Dooks <ben-linux@fluff.org> [PATCH] hwmon: Static function fixes, 3 of 4

Fixup functions that have been declared static
and then actually defined without the static on.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/hwmon/ds1621.c
ba9c2e8d15da029ea3051c95e446b2d638ef02e2 17-Oct-2005 Deepak Saxena <dsaxena@plexity.net> [PATCH] hwmon: kzalloc conversion

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>
/drivers/hwmon/ds1621.c
ddec748f328af6b67e4d0ce0248a8e9f36751827 17-Oct-2005 Jean Delvare <khali@linux-fr.org> [PATCH] hwmon: Missing class check in two hwmon drivers

The atxp1 and ds1621 drivers should make sure they do not probe
non-hwmon i2c adapters.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/hwmon/ds1621.c
f4b50261207c987913f076d867c2e154d71fd012 31-Jul-2005 Jean Delvare <khali@linux-fr.org> [PATCH] hwmon: hwmon vs i2c, second round (06/11)

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>
/drivers/hwmon/ds1621.c
2ed2dc3c116d26fc6a9384e83d136b15cc203b6c 31-Jul-2005 Jean Delvare <khali@linux-fr.org> [PATCH] hwmon: hwmon vs i2c, second round (04/11)

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>
/drivers/hwmon/ds1621.c
7bef559455fc71f66f8573cc1aafe1dd33966c1c 27-Jul-2005 Jean Delvare <khali@linux-fr.org> [PATCH] I2C: refactor message in i2c_detach_client

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>
/drivers/hwmon/ds1621.c
5071860aba7fc69279ab822638ed2c2e4549f9fd 20-Jul-2005 Jean Delvare <khali@linux-fr.org> [PATCH] I2C: Separate non-i2c hwmon drivers from i2c-core (7/9)

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>
/drivers/hwmon/ds1621.c
943b0830cebe4711354945ed3cb44e84152aaca0 16-Jul-2005 Mark M. Hoffman <mhoffman@lightlink.com> [PATCH] I2C hwmon: add hwmon sysfs class to drivers

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>
/drivers/hwmon/ds1621.c
8d5d45fb14680326f833295f2316a4ec5e357220 02-Jul-2005 Jean Delvare <khali@linux-fr.org> [PATCH] I2C: Move hwmon drivers (2/3)

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>
/drivers/hwmon/ds1621.c