[PATCH kernel-hwmon-occ 09/10] output temp*_input in millidegree Celsius

OpenBMC Patches openbmc-patches at stwcx.xyz
Thu Nov 12 21:20:11 AEDT 2015


From: adamliyi <adamliyi at msn.com>

---
 occ.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/occ.c b/occ.c
index 7ae59e6..8b74c8c 100644
--- a/occ.c
+++ b/occ.c
@@ -632,7 +632,8 @@ static ssize_t show_occ_temp_input(struct device *dev, struct device_attribute *
 
 	//printk("block_id: %d, sensor: %d\n", data->occ_resp->temp_block_id, n -1);	
 	sensor = &data->occ_resp->data.blocks[data->occ_resp->temp_block_id].sensor[n - 1];
-	val = sensor->value;
+	/* in millidegree Celsius */
+	val = sensor->value * 1000;
 	//printk("temp%d sensor value: %d\n", n, val);
 
 	//printk("------------- above are debug message, bellow is real output------------\n");	
-- 
2.6.3




More information about the openbmc mailing list