summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pmbus/tps53679.c
AgeCommit message (Collapse)AuthorFilesLines
2021-04-20hwmon: (pmbus) Introduce PMBUS symbol namespaceGuenter Roeck1-0/+1
Exported pmbus symbols are only supposed to be used from PMBus code. Introduce PMBUS symbol namespace to prevent misuse from other code. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2021-04-20hwmon: (pmbus/tps53679) Add support for TI TPS53676Erik Rosen1-1/+50
Add support for TI TPS53676 controller to the tps53679 pmbus driver The driver uses the USER_DATA_03 register to figure out how many phases are enabled and to which channel they are assigned, and sets the number of pages and phases accordingly. Signed-off-by: Erik Rosen <erik.rosen@metormote.com> Link: https://lore.kernel.org/r/20210322193734.75127-3-erik.rosen@metormote.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-12-02hwmon: (pmbus) shrink code and remove pmbus_do_remove()Bartosz Golaszewski1-1/+0
The only action currently performed in pmbus_do_remove() is removing the debugfs hierarchy. We can schedule a devm action at probe time and remove pmbus_do_remove() entirely from all pmbus drivers. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Link: https://lore.kernel.org/r/20201026105352.20359-1-brgl@bgdev.pl [groeck: Removed references to pmbus_do_remove from documentation] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-09-23hwmon (pmbus) use simple i2c probe functionStephen Kitt1-5/+6
pmbus_do_probe doesn't use the id information provided in its second argument, so this can be removed, which then allows using the single-parameter i2c probe function ("probe_new") for probes. This avoids scanning the identifier tables during probes. Drivers which didn't use the id are converted as-is; drivers which did are modified as follows: * if the information in i2c_client is sufficient, that's used instead (client->name); * configured v. probed comparisons are performed by comparing the configured name to the detected name, instead of the ids; this involves strcmp but is still cheaper than comparing all the device names when scanning the tables; * anything else is handled by calling i2c_match_id() with the same level of error-handling (if any) as before. Additionally, the mismatch message in the ltc2978 driver is adjusted so that it no longer assumes that the driver_data is an index into ltc2978_id. Signed-off-by: Stephen Kitt <steve@sk2.org> Acked-by: Wolfram Sang <wsa@kernel.org> Link: https://lore.kernel.org/r/20200808210004.30880-1-steve@sk2.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-03-08hwmon: (pmbus/tps53679) Add support for TPS53647 and TPS53667Guenter Roeck1-2/+13
TPS53647 and TPS53667 are single channel, Step-Down Buck Controllers. TPS53647 supports 4 phases, TPS53667 supports 6 phases. The chips do not support per-phase output telemetry. Cc: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-03-08hwmon: (pmbus/tps53679) Add support for TPS53681Guenter Roeck1-3/+117
TPS53681 is a dual-channel multiphase step-down controller supporting per-phase and per-channel output telemetry. Cc: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-03-08hwmon: (pmbus/tps53679) Add support for IIN and PIN to TPS53679 and TPS53688Guenter Roeck1-3/+3
All chips of this series with published datasheets support IIN, PIN, and STATUS_INPUT PMBus commands. Per TI Power Management Forum, "TPS53679 and TPS53681 have the same PMBus command set". There is no reason to believe that this does not apply to TPS53688. Let's assume that this is correct and add support for IIN, PIN, and STATUS_INPUT to TPS53679 and TPS53688 to simplify adding support for more chips of the same series. At the same time, drop reporting VIN on channel 2. On chips with published datasheets this voltage is identical to the voltage reported on channel 1, and there is no reason to believe that this is different for TPS53679 and TPS53888. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-03-08hwmon: (pmbus/tps53679) Add support for multiple chips IDsGuenter Roeck1-10/+31
Chip specific support will be needed in the driver to be able to support additional chips of the same series. Add support for it to the driver. To simplify adding support for more chips, call identification code from the probe function. This lets us use a single structure for common elements of struct pmbus_driver_info, thus reducing code size as support for more chips is added. Cc: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-01-23hwmon: (pmbus/tps53679) Extend device list supported by driverVadim Pasternak1-0/+2
Extends driver with support of the additional devices: Texas Instruments Dual channel DCAP+ multiphase controllers: TPS53688. Extend Kconfig with added device. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Link: https://lore.kernel.org/r/20200113150841.17670-4-vadimp@mellanox.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2020-01-23hwmon: (pmbus/core) Add support for vid mode detection per page basesVadim Pasternak1-21/+23
Add support for VID protocol detection per page bases, instead of detecting it based on "PMBU_VOUT" readout from page 0 for all the pages supported by particular device. The reason that some devices allows to configure different VID modes per page within the same device. Patch modifies the field "vrm_version" within the structure "pmbus_driver_info" to be per page array. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Link: https://lore.kernel.org/r/20200113150841.17670-2-vadimp@mellanox.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157Thomas Gleixner1-10/+1
Based on 3 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 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 [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] 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 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 [author] [graeme] [gregory] [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema] [hk] [hemahk]@[ti] [com] 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 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1105 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-15hwmon: (pmbus/tps53679) Fix build warningGuenter Roeck1-1/+1
If CONFIG_OF is not enabled, the following build warning is observed. drivers/hwmon/pmbus/tps53679.c:100:34: warning: ‘tps53679_of_match’ defined but not used Marking tps53679_of_match as __maybe_unused fixes the problem. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-02-18hwmon: (pmbus/tps53679) Fix driver info initialization in probe routineVadim Pasternak1-1/+8
Fix tps53679_probe() by using dynamically allocated "pmbus_driver_info" structure instead of static. Usage of static structures causes overwritten of the field "vrm_version", in case the system is equipped with several tps53679 devices with the different "vrm_version". In such case the last probed device overwrites this field for all others. Fixes: 610526527a13 ("hwmon: (pmbus) Add support for Texas Instruments tps53679 device") Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-08-30hwmon: (pmbus) Add support for Texas Instruments tps53679 deviceVadim Pasternak1-0/+113
The below lists of VOUT_MODE command readout with their related VID protocols, Digital to Analog Converter steps, supported by the device: VR12.0 mode, 5-mV DAC - 0x21 VR12.5 mode, 10-mV DAC - 0x22 VR13.0 mode, 10-mV DAC - 0x24 IMVP8 mode, 5-mV DAC - 0x25 VR13.0 mode, 5-mV DAC - 0x27 Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>