]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (mr75203) fix multi-channel voltage reading
authorEliav Farber <farbere@amazon.com>
Thu, 8 Sep 2022 15:24:33 +0000 (15:24 +0000)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 8 Sep 2022 18:56:03 +0000 (11:56 -0700)
commitb746766dc916d075a3869c920524f665180d1a96
tree63d2b4376349df782faa82aa76385c39780de2c3
parentb024658dba89d2adfbfd2bc25b29532c1d89f156
hwmon: (mr75203) fix multi-channel voltage reading

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: e6dc6d6dd8bd ("hwmon: Add hardware monitoring driver for Moortec MR75203 PVT controller")
Signed-off-by: Eliav Farber <farbere@amazon.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220908152449.35457-6-farbere@amazon.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/mr75203.c