summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pmbus/pmbus.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61Thomas Gleixner2019-05-241-14/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on 1 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 you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 675 mass ave cambridge ma 02139 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 441 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* hwmon: (pmbus) add support for DPS-650ABXiaoting Liu2019-02-181-0/+1
| | | | | | | Provide support for PSU DPS-650AB from Delta Electronics, INC. Signed-off-by: Xiaoting Liu <xiaoting.liu@hxt-semitech.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (pmbus) associate PMBUS_SKIP_STATUS_CHECK with driver dataXiaoting Liu2019-02-181-22/+41
| | | | | | | | | | | | | | | | Current code compares device name with name in i2c_device_id to decide whether PMBUS_SKIP_STATUS_CHECK should be set in pmbus_platform_data, which makes adding new devices with PMBUS_SKIP_STATUS_CHECK should also modify code in pmbus_probe(). This patch adds pmbus_device_info to save pages and flags. Its pointer is put in driver_data of i2c_device_id, which makes adding new device more straightforward. Signed-off-by: Shunyong Yang <shunyong.yang@hxt-semitech.com> Signed-off-by: Xiaoting Liu <xiaoting.liu@hxt-semitech.com> [groeck: Use designated structure initializers to improve readability] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (pmbus) Fix page count auto-detection.Dmitry Bazhenov2018-10-151-0/+2
| | | | | | | | | | | | | | | | Devices with compatible="pmbus" field have zero initial page count, and pmbus_clear_faults() being called before the page count auto- detection does not actually clear faults because it depends on the page count. Non-cleared faults in its turn may fail the subsequent page count auto-detection. This patch fixes this problem by calling pmbus_clear_fault_page() for currently set page and calling pmbus_clear_faults() after the page count was detected. Cc: stable@vger.kernel.org Signed-off-by: Dmitry Bazhenov <bazhenov.dn@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (pmbus) move header file out of I2C realmWolfram Sang2017-06-121-1/+1
| | | | | | | | include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (pmbus) Add explicit support for DPS-460, DPS-800, and SGD009Vadim Pasternak2016-09-091-2/+18
| | | | | | | | | | | | | | Provide support for PSU DPS-460, DPS-800 from Delta Electronics, INC and for SGD009 from Acbel Polytech, INC. These devices do not support the STATUS_CML register, and reports a communication error in response to this command. For this reason, the status register check is disabled for these controllers. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (pmbus) Add device IDs for TPS544{B,C}2{0,5}Guenter Roeck2015-08-111-0/+4
| | | | | | | | Add device IDs and references for Texas Instruments TPS544B20, TPS544B25, TPS544C20, and TPS544C25 to the generic PMBus driver. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (pmbus) Add support for VR12Guenter Roeck2015-08-091-0/+1
| | | | | | Newer chips such as MAX20751 support VR12. Add support for it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (pmbus) Add tps40422 front-end driverZhu, Richard \(NSN - CN/Beijing\)2014-08-041-1/+0Star
| | | | | | | | | | | | For TI power management chip TPS40422, READ_TEMPERATURE_2 command is supported on page 1 of the chip, but the original driver(pmbus.c) only tried to detect this command on page 0, this will lead to a result that the temperature sensor in page 1 couldn't be detected. This change is to isolate the tps40422 driver from pmbus.c into a solo front-end driver. Signed-off-by: Zhu Laiwen <richard.zhu@nsn.com> [Guenter Roeck: Dropped unnecessary license text (fixes checkpatch warning)] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (pmbus) Add support for Lineage Power MDT040Guenter Roeck2012-03-191-0/+1
| | | | | | | MDT040 is supported by the generic PMBus driver. Add device ID and reference to datasheet. Also mention Lineage Power device support in Kconfig. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (pmbus) Add support for TI TPS40400 and TPS40422Guenter Roeck2012-03-191-0/+2
| | | | | | | TPS40400 and TPS40422 are supported by the generic PMBus driver. Add device IDs and data sheet references. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (pmbus) Simplify remove functionsGuenter Roeck2012-03-191-7/+1Star
| | | | | | | | | 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>
* hwmon: (pmbus) Convert pmbus drivers to use devm_kzallocGuenter Roeck2012-03-191-14/+3Star
| | | | | | Marginally less code and eliminate the possibility of memory leaks. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: convert drivers/hwmon/* to use module_i2c_driver()Axel Lin2012-03-191-11/+1Star
| | | | | | | | | | | | | | | | | | 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>
* hwmon: (pmbus/zl6100) Add support for Ericsson BMR45[0,1] and BMR46[2,3,4]Guenter Roeck2012-01-051-2/+0Star
| | | | | | | | | Add support for Ericsson BMR450, BMR451, BMR462, BMR463, and BMR464, which are based on ZL2005 and ZL2008, to zl6100 driver. Remove BMR450 and BMR451 device IDs from generic PMBus driver. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
* hwmon: (pmbus) Add support for Lineage Power DC-DC convertersGuenter Roeck2011-10-241-0/+4
| | | | | | | Add device IDs and reference to datasheets for Lineage Power DC-DC converters. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
* hwmon: (pmbus/ltc2978) Explicit driver for LTC2978Guenter Roeck2011-10-241-1/+0Star
| | | | | | | | Provide explicit driver for LTC2978 to enable support for minimum and peak attributes. Remove ltc2978 chip id from generic pmbus driver. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
* hwmon: (pmbus) Don't return errors from driver remove functionsGuenter Roeck2011-10-241-3/+2Star
| | | | | | | | | | | | | | | | | | | | | 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>
* hwmon: (pmbus) Add ADP4000, NCP4200 and NCP4208 to list of supported devicesGuenter Roeck2011-07-291-0/+3
| | | | | | | | | Add ADP4000, NCP4200 and NCP4208 to the list of devices supported by the generic PMBus driver, and add device IDs to enable explicit instantiation. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Reviewed-by: Robert Coulson <robert.coulson@ericsson.com> Acked-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (pmbus) Add support for VID output voltage modeGuenter Roeck2011-07-291-3/+31
| | | | | | | | | | | | 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>
* hwmon: (pmbus) Move PMBus drivers to drivers/hwmon/pmbusGuenter Roeck2011-07-281-0/+210
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>