mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] hwmon: intel-m10-bmc-hwmon: fix multiplier for N6000 board power sensor
@ 2024-05-21 18:12 Peter Colberg
  2024-05-29 22:49 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Colberg @ 2024-05-21 18:12 UTC (permalink / raw)
  To: Xu Yilun, Tom Rix, Jean Delvare, Guenter Roeck, Tianfei zhang,
	linux-hwmon, linux-kernel
  Cc: Russ Weight, Marco Pagani, Matthew Gerlach, Peter Colberg

The Intel N6000 BMC outputs the board power value in milliwatt, whereas
the hwmon sysfs interface must provide power values in microwatt.

Fixes: e1983220ae14 ("hwmon: intel-m10-bmc-hwmon: Add N6000 sensors")
Signed-off-by: Peter Colberg <peter.colberg@intel.com>
Reviewed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
---
Incorrect `sensors` output on Intel N6001 with v6.9:

Board Power:                                   36.03 mW 

Correct `sensors` output on Intel N6001 with v6.9 and this patch:

Board Power:                                   35.79 W  
---
 drivers/hwmon/intel-m10-bmc-hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/intel-m10-bmc-hwmon.c b/drivers/hwmon/intel-m10-bmc-hwmon.c
index 6500ca548f9c..ca2dff158925 100644
--- a/drivers/hwmon/intel-m10-bmc-hwmon.c
+++ b/drivers/hwmon/intel-m10-bmc-hwmon.c
@@ -429,7 +429,7 @@ static const struct m10bmc_sdata n6000bmc_curr_tbl[] = {
 };
 
 static const struct m10bmc_sdata n6000bmc_power_tbl[] = {
-	{ 0x724, 0x0, 0x0, 0x0, 0x0, 1, "Board Power" },
+	{ 0x724, 0x0, 0x0, 0x0, 0x0, 1000, "Board Power" },
 };
 
 static const struct hwmon_channel_info * const n6000bmc_hinfo[] = {
-- 
2.45.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-29 22:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-21 18:12 [PATCH] hwmon: intel-m10-bmc-hwmon: fix multiplier for N6000 board power sensor Peter Colberg
2024-05-29 22:49 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®