summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pmbus
AgeCommit message (Collapse)AuthorFilesLines
2017-06-11hwmon: (pmbus) move header file out of I2C realmWolfram Sang4-4/+4
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>
2017-06-11hwmon: (pmbus) Add client driver for IR35221Samuel Mendoza-Jonas3-0/+348
IR35221 is a Digital DC-DC Multiphase Converter Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> [groeck: Preserve alphabetic order in Kconfig; add missing break statements (from Dan Carpenter); add missing error checks] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02hwmon: (ucd9200) Add OF device ID tableJavier Martinez Canillas1-1/+47
The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:<device>. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-04-02hwmon: (ucd9000) Add OF device ID tableJavier Martinez Canillas1-1/+38
The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a I2C device registered via OF will always match a legacy I2C device ID and that the MODALIAS reported will always be of the form i2c:<device>. But this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-03-27driver: (adm1275) set the m,b and R coefficients correctly for powerShikhar Dogra1-2/+2
Seems like coefficient values for m, b and R under power have been put in the wrong order. Rearranging them properly to get correct values of coefficients for power. For specs, please refer to table 7 (page 35) on http://www.analog.com/media/en/technical-documentation/data-sheets/ADM1075.pdf Fixes: 904b296f308d ("hwmon: (adm1275) Introduce configuration data structure for coeffcients") Signed-off-by: Shikhar Dogra <shidogra@cisco.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-12-02hwmon: (adm1275) Enable adm1278 VOUT samplingYi Li1-4/+16
The adm1278 can optionally monitor the VOUT pin. This functionality is not enabled at reset, so PMON_CONFIG needs to be modified in order to enable it. Signed-off-by: Yi Li <adamliyi@msn.com> Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-09-08hwmon: (ucd9000) Add support for UCD90160 Power Supply SequencerMatt Weber2-4/+5
The UCD90160 Power Supply Sequencer reuses the existing register layout, so just an id addition was required. Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Ronak Desai <ronak.desai@rockwellcollins.com> [groeck: Updated description, ordered alphabetically, added documentation] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-09-08hwmon: (pmbus) Add explicit support for DPS-460, DPS-800, and SGD009Vadim Pasternak1-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>
2016-03-05hwmon: (adm1275) Add support for ADM1278Guenter Roeck2-3/+57
ADM1278 is mostly compatible to other chips of the same series. Besides the usual difference in coefficients, it supports a temperature sensor, and it can measure both input and output voltage at the same time. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-12-18hwmon: (pmbus) Add client driver for LTC3815Guenter Roeck3-0/+226
LTC3815 is a Monolithic Synchronous DC/DC Step-Down Converter. Cc: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-19hwmon: (ltc2978) Add support for LTM4675Guenter Roeck2-3/+9
LTM2975 is a dual 9A or single 18A μModule regulator. It is register compatible with LTM4676. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-19hwmon: (ltc2978) Add polling for chips requiring itMichael Jones1-10/+101
Some of the LTC chips supported by this driver have to be polled to ensure that they are ready to accept commands. Signed-off-by: Michael Jones <mike@proclivis.com> [Guenter Roeck: simplifications and formatting changes] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-19hwmon: (pmbus) Enable PEC if the controller supports itGuenter Roeck1-0/+5
PMBus controllers optionally support PEC. Configure the driver to use it if available to improve operational security. Suggested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-19hwmon: (pmbus) Use BIT macroGuenter Roeck5-102/+107
Using the BIT macro makes the code a little easier to read. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-17hwmon: (ltc2978) Add support for LTC3886Guenter Roeck2-3/+23
LTC3886 is a is a dual PolyPhase DC/DC synchronous step-down switching regulator controller. It is mostly command compatible to LTC3883, but supports two phases instead of one. Suggested-by: Michael Jones <mike@proclivis.com> Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-17hwmon: (ltc2978) Add support for LTC2980 and LTM2987Guenter Roeck2-5/+19
LTC2980 and LTM2987 are command compatible to LTC2977. They consist of two LTC2977 on a single die, and are instantiated as two separate chips, each supporting eight channels. Suggested-by: Michael Jones <mike@proclivis.com> Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-17hwmon: (ltc2978) Add missing chip IDs for LTC2978 and LTC3882Guenter Roeck1-3/+8
Add additional chip ID for an older revision of LTC2978, as well as two chip IDs for LTC3882. Turns out the LTC3882 does support the LTC2978_MFR_SPECIAL_ID register, and reading it returns its chip ID, but the register is undocumented. Suggested-by: Michael Jones <mike@proclivis.com> Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-17hwmon: (ltc2978) Use correct ID mask to detect all chipsGuenter Roeck1-22/+17
Per information from Linear Technologies, the ID mask is 12 bit for all chips of this series. Use this mask to detect chips to ensure that all chip revisions are detected. Suggested-by: Michael Jones <mike@proclivis.com> Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-17hwmon: (ltc2978) Introduce helper functions for min and max valuesGuenter Roeck1-91/+57
The code used to determine historic low and high peaks is repeated several times. Introduce helper functions to simplify it. Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-17hwmon: (ltc2978) Introduce feature flagsGuenter Roeck1-12/+18
It is becoming cumbersom to track per-chip feature support. Introduce feature flag to simplify the code. Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-17hwmon: (pmbus) Convert command register definitions to enumGuenter Roeck1-140/+142
This will simplify adding new virtual commands. Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-17hwmon: (ltc2978) Add support for LTC2975Guenter Roeck2-12/+96
LTC2975 is mostly compatible to LTC2974, but supports input current and power measurement. Tested-by: Michael Jones <mike@proclivis.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-12hwmon: (ltc2978) Add support for LTC3887Guenter Roeck2-6/+16
LTC3887 is an enhanced version of LTC3880 and supports the same commands. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-12hwmon: (ltc2978) Add additional chip IDs for LTM4676 and LTM4676AGuenter Roeck1-2/+6
Per datasheet, the chip ID for LTM4676 is 0x448x. This was observed in real systems. In addition to that, chip ID 0x4401 was observed as well. Research shows that the chip ID has been changed from 0x440x to 0x448x in datasheet revision C. Add support for the additional chip ID. Also add the chip ID for LTM4676A, which is functionally identical to LTM4676. Reported-by: Ananda Babu Nettam <anandab@juniper.net> Cc: Ananda Babu Nettam <anandab@juniper.net> Cc: Amit U Jain <amjain@juniper.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-12hwmon: (ltc2978) Add support for LTC3882Guenter Roeck1-6/+44
LTC3882 is mostly compatible with LTC3880. Major differences are that it does not measure the input current, and it no longer supports LTC's legacy mechanism to identify the chip. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-12hwmon: (ltc2978) Move code to read chip ID into separate functionGuenter Roeck1-19/+29
Verifying the chip type is getting more complicated with new chips, since not all chips support the same mechanism to read the chip type. Move the code into a separate function to simplify adding support for those chips. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-10hwmon: (pmbus) Add device IDs for TPS544{B,C}2{0,5}Guenter Roeck2-1/+6
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>
2015-08-09hwmon: (pmbus) Add support for MAX20751Guenter Roeck3-0/+75
MAX20751 is a multiphase power controller with internal buck converter. It uses VR12.0 to report the output voltage. This requires an explicit driver, since the VR version can not be auto-detected. The chip supports a manufacturer specific command to fine-tune the output voltage. This command is not currently supported. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-09hwmon: (pmbus) Add support for VR12Guenter Roeck3-4/+15
Newer chips such as MAX20751 support VR12. Add support for it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-09hwmon: (ltc2978) LTM4676 supports CLEAR_PEAKSGuenter Roeck1-1/+1
Use the CLEAR_PEAKS command on LTM4676. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-09hwmon: (adm1275) Add support for ADM1293 and ADM1294Guenter Roeck2-10/+135
ADM1293 and ADM1294 are mostly compatible with other chips of the same series, but have more configuration options. There are also some differences in register details. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-09hwmon: (pmbus) Add support for lowest power value attributesGuenter Roeck2-24/+34
Add support for powerX_input_lowest for both input and output power. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-09hwmon: (adm1275) Introduce new feature flagsGuenter Roeck1-43/+54
Introduce have_vout, have_vaux_status, have_pin_max, and have_uc_fault to simplify adding support for new chips. Also simplify error returns where appropriate to return immediately on error. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-09hwmon: (adm1275) Introduce configuration data structure for coeffcientsGuenter Roeck1-45/+68
Each new chip supported by the driver has a new set of coefficients, making hard-coding coefficients more and more cumbersome. Introduce a datastructure and table to simplify configuration. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-09hwmon: (adm1275) Use BIT macroGuenter Roeck1-9/+10
Use BIT macro to simplify adding new bit masks. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-09hwmon: (pmbus_core) Constify pmbus_regulator_opsAxel Lin2-2/+2
pmbus_regulator_ops is not modified after initialized, so make it const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-08-09hwmon: (pmbus) Explicitly set regulator type for pmbus_regulator_opsAxel Lin1-0/+1
The pmbus_regulator_ops is for voltage regulators, so explicitly set regulator type for better readability. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2015-01-07kconfig: use bool instead of boolean for type definition attributesChristoph Jaeger1-1/+1
Support for keyword 'boolean' will be dropped later on. No functional change. Reference: http://lkml.kernel.org/r/cover.1418003065.git.cj@linux.com Signed-off-by: Christoph Jaeger <cj@linux.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-11-30hwmon: (ltc2978) Add regulator supportAlan Tull2-3/+47
Add simple on/off regulator support for ltc2978 and other pmbus parts supported by the ltc2978 driver. Signed-off-by: Alan Tull <atull@opensource.altera.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-11-30hwmon: (pmbus) Add regulator supportAlan Tull2-0/+113
Add support for simple on/off control of each channel. To add regulator support, the pmbus part driver needs to add regulator_desc information and number of regulators to its pmbus_driver_info struct. regulator_desc can be declared using default macro for a regulator (PMBUS_REGULATOR) that is in pmbus.h The regulator_init_data can be initialized from either platform data or the device tree. Signed-off-by: Alan Tull <atull@opensource.altera.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-11-30hwmon: (pmbus) add helpers for byte write and read modify writeAlan Tull2-0/+35
Add two helper functions: * pmbus_write_byte_data = paged byte write * pmbus_update_byte_data = paged byte read/modify/write Signed-off-by: Alan Tull <atull@opensource.altera.com> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-08-04hwmon: (pmbus) Add tps40422 front-end driverZhu, Richard \(NSN - CN/Beijing\)4-3/+76
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>
2014-03-19hwmon: (pmbus/ltc2978) Add support for LTM4676Guenter Roeck1-9/+11
The chip's programming interface is quite similar to LTC3880 and supports the same set of sensors. Reviewed-by: Robert Coulson <rob.coulson@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-03-05hwmon: (pmbus/ltc2978) Add new chip ID for LTC2974Guenter Roeck1-2/+3
LTC2974 datasheet revision C lists the chip ID for LTC2974 as 0x0213. Reviewed-by: Robert Coulson <rob.coulson@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2014-02-02hwmon: (pmbus) Support per-page exponent in linear modeGuenter Roeck1-32/+36
Some chips use different exponents for sensors on different pages or rails. Detect and store exponent per page to support this situation. This fixes a problem with wrong voltages seen on UCD90120. Reported-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Tested-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (pmbus/ltc2978): Add support for LTC2978AGuenter Roeck1-1/+3
Detect LTC2978A chip ID. Treat it as LC2978. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (pmbus/ltc2978): Add support for LTC2977Guenter Roeck1-3/+9
LTC2977 is a pin compatible replacement for LTC2978. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: (pmbus/lm25066) Add support for LM25063Guenter Roeck1-9/+82
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-18hwmon: Correct some typosLABBE Corentin1-1/+1
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-13hwmon: (pmbus) Convert to use hwmon_device_register_with_groupsGuenter Roeck1-13/+7
Signed-off-by: Guenter Roeck <linux@roeck-us.net>