Commit fa0c3f7c authored by Eliav Farber's avatar Eliav Farber Committed by Jialin Zhang
Browse files

hwmon: (mr75203) fix multi-channel voltage reading

stable inclusion
from stable-v5.10.143
commit c9da73ae78cbed0ff3da955dc2cc637d8b72b63b
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0U6

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c9da73ae78cbed0ff3da955dc2cc637d8b72b63b



--------------------------------

[ Upstream commit 91a9e063 ]

Fix voltage allocation and reading to support all channels in all VMs.
Prior to this change allocation and reading were done only for the first
channel in each VM.
This change counts the total number of channels for allocation, and takes
into account the channel offset when reading the sample data register.

Fixes: 9d823351 ("hwmon: Add hardware monitoring driver for Moortec MR75203 PVT controller")
Signed-off-by: default avatarEliav Farber <farbere@amazon.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220908152449.35457-6-farbere@amazon.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 5f2dc418
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment