hwmon: (pmbus/fsp-3y) Fix functionality bitmask in FSP-3Y YM-2151E
authorTomáš Pecka <tomas.pecka@cesnet.cz>
Thu, 20 Apr 2023 17:19:39 +0000 (19:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:16 +0000 (23:03 +0900)
commitaefea3016a150ec3c10cc3b77b8a00631cc2b40b
tree9e06be4f6e8fbd893b45129ad8b3c0ca24492627
parentd29faefa8d21ec57c58d71020343ddf21e27ffa3
hwmon: (pmbus/fsp-3y) Fix functionality bitmask in FSP-3Y YM-2151E

[ Upstream commit 93822f5161a2dc57a60b95b35b3cb8589f53413e ]

The bit flags in pmbus_driver_info functionality for YM-2151E chip were
joined with a comma operator instead of a bitwise OR. This means that
the last constant PMBUS_HAVE_IIN was not OR-ed with the other
PM_BUS_HAVE_* constants for this page but it initialized the next element
of the func array (which was not accessed from anywhere because of the
number of pages).

However, there is no need for setting PMBUS_HAVE_IIN in the 5Vsb page
because this command does not seem to be paged. Obviously, the device
only has one IIN sensor, so it doesn't make sense to query it again from
the second page.

Fixes: 1734b4135a62 ("hwmon: Add driver for fsp-3y PSUs and PDUs")
Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Signed-off-by: Tomáš Pecka <tomas.pecka@cesnet.cz>
Link: https://lore.kernel.org/r/20230420171939.212040-1-tomas.pecka@cesnet.cz
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/pmbus/fsp-3y.c