History log of /drivers/hwmon/pmbus/adm1275.c
Revision Date Author Comments
927112696654f4c96a85aa8a494866cbc6ccfbe6 24-Feb-2012 Guenter Roeck <linux@roeck-us.net> hwmon: (adm1275) Add support for ADM1075

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
dd285ad7373bf5d21cceacb3b7a5eb8b72d37085 22-Feb-2012 Guenter Roeck <linux@roeck-us.net> hwmon: (pmbus) Simplify remove functions

Since devm_kzalloc() is now used to allocate driver memory, the client
driver remove function has no purpose other than to call pmbus_do_remove().
This means we can get rid of it by redefining pmbus_do_remove() to use the
same prototype, and pointing to it directly.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
8b313ca7f1b98263ce22519b25a9c2a362eeb898 22-Feb-2012 Guenter Roeck <linux@roeck-us.net> hwmon: (pmbus) Convert pmbus drivers to use devm_kzalloc

Marginally less code and eliminate the possibility of memory leaks.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
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>
87102808d03948c825c3bdc48316e48f6422fd7e 30-Sep-2011 Guenter Roeck <guenter.roeck@ericsson.com> hwmon: (pmbus/adm1275) Validate device ID

Since manufacturer and device ID are known, read and validate it.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
[Dan Carpenter <dan.carpenter@oracle.com>: Fixed memory leak]
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
da8e48ab483e1f54c1099bed91bfd2c302bc7ddf 30-Jul-2011 Guenter Roeck <guenter.roeck@ericsson.com> hwmon: (pmbus) Always call _pmbus_read_byte in core driver

Always call _pmbus_read_byte() instead of pmbus_read_byte() in PMBus core
driver. With this change, device specific read functions can be implemented for
all registers.

Since the device specific read_byte function is now always called, we need to be
more careful with page validations. Only fail if the passed page number is larger
than 0, since -1 means "current page".

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
5cf231a346fb80d7945aa46e90186a068a3a001b 14-Jul-2011 Guenter Roeck <guenter.roeck@ericsson.com> hwmon: (pmbus/adm1275) Add support for ADM1276

ADM1276 is mostly compatible to ADM1275, with added support for input power
measurement. Add support for it to the ADM1275 driver.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
c5e6763667ffc94eaad4634841cb1b7ecd951fb7 02-Aug-2011 Guenter Roeck <guenter.roeck@ericsson.com> hwmon: (pmbus/adm1275) Add support for second current limit

ADM1275 supports a second current limit, which can be configured as either lower
or upper limit. Add support for it and report it as either lower or upper
critical current limit.

Also replace error return code EINVAL for unsupported pages with ENXIO as this
is more appropriate for the observed condition.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
866cf12a0eab65f94e40608bdd21ca8dea4d0ac2 26-Aug-2011 Guenter Roeck <guenter.roeck@ericsson.com> hwmon: (pmbus) Don't return errors from driver remove functions

Driver remove functions have an error return value, but rarely return an error
in practice. If a driver does return an error from its remove function, the
driver won't be unloaded and is expected to stay alive.

pmbus_do_remove() is defined as returning an int, but always returns 0 (no
error). Calling code passes that return value on to high level driver
remove functions, but does not evaluate it and removes driver data even if
pmbus_do_remove() returned an error (which it in practice never does). Even if
this code could never cause a real problem, it is nevertheless conceptually
wrong.

To reduce confusion and simplify the code, change pmbus_do_remove() to be a void
function, and have PMBus client drivers always return zero in their driver
remove functions.

Reported-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
c576e30cd0c9814b3b45772d46924d796f538dee 09-Jul-2011 Guenter Roeck <guenter.roeck@ericsson.com> hwmon: (adm1275) Add support for peak attributes

Add support for voltage and current peak (historic maximum) attributes.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
1061d8518f8bde548a03a5ff77dbe9a4202ad826 25-Jun-2011 Guenter Roeck <guenter.roeck@ericsson.com> hwmon: (pmbus) Add support for VID output voltage mode

In VID mode, output voltages are measured and reported as VID values, and
have to be converted to voltages using VID conversion tables or functions.
Support is added for VR11 only at this time.

This patch enables support for PMBus devices supporting VID VR11 based output
voltage selection such as NCP4200 and NCP4208.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
9d2ecfb768bd2f8b41816a23b0f1dda026fef41d 12-Jul-2011 Guenter Roeck <guenter.roeck@ericsson.com> hwmon: (pmbus) Move PMBus drivers to drivers/hwmon/pmbus

Since the number of PMBus drivers is getting large, move them into
directory drivers/hwmon/pmbus to improve readability and scalability.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>