From 1734b4135a62fd2402232346b809e99177ea6b4c Mon Sep 17 00:00:00 2001 From: Václav Kubernát Date: Wed, 14 Apr 2021 10:00:17 +0200 Subject: hwmon: Add driver for fsp-3y PSUs and PDUs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds support for these devices: - YH-5151E - the PDU - YM-2151E - the PSU The device datasheet says that the devices support PMBus 1.2, but in my testing, a lot of the commands aren't supported and if they are, they sometimes behave strangely or inconsistently. For example, writes to the PAGE command requires using PEC, otherwise the write won't work and the page won't switch, even though, the standard says that PEC is optional. On the other hand, writes to SMBALERT don't require PEC. Because of this, the driver is mostly reverse engineered with the help of a tool called pmbus_peek written by David Brownell (and later adopted by my colleague Jan Kundrát). The device also has some sort of a timing issue when switching pages, which is explained further in the code. Because of this, the driver support is limited. It exposes only the values that have been tested to work correctly. Signed-off-by: Václav Kubernát Link: https://lore.kernel.org/r/20210414080019.3530794-1-kubernat@cesnet.cz [groeck: Fixed up "missing braces around initializer" from 0-day] Signed-off-by: Guenter Roeck --- drivers/hwmon/pmbus/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/hwmon/pmbus/Kconfig') diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig index fd0911017be6..e9727176b167 100644 --- a/drivers/hwmon/pmbus/Kconfig +++ b/drivers/hwmon/pmbus/Kconfig @@ -65,6 +65,16 @@ config SENSORS_BPA_RS600 This driver can also be built as a module. If so, the module will be called bpa-rs600. +config SENSORS_FSP_3Y + tristate "FSP/3Y-Power power supplies" + help + If you say yes here you get hardware monitoring support for + FSP/3Y-Power hot-swap power supplies. + Supported models: YH-5151E, YM-2151E + + This driver can also be built as a module. If so, the module will + be called fsp-3y. + config SENSORS_IBM_CFFPS tristate "IBM Common Form Factor Power Supply" depends on LEDS_CLASS -- cgit