[Skiboot] [PATCH] sensors: occ: Skip counter type of sensors

Shilpasri G Bhat shilpa.bhat at linux.vnet.ibm.com
Thu Oct 19 18:08:23 AEDT 2017


Don't add counter type of sensors to device-tree as they don't
fit into hwmon sensor interface.

Signed-off-by: Shilpasri G Bhat <shilpa.bhat at linux.vnet.ibm.com>
---
 hw/occ-sensor.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/occ-sensor.c b/hw/occ-sensor.c
index 1042c11..3de91a0 100644
--- a/hw/occ-sensor.c
+++ b/hw/occ-sensor.c
@@ -591,6 +591,9 @@ void occ_sensors_init(void)
 			struct cpu_thread *c = NULL;
 			u32 handler;
 
+			if (md[i].structure_type != OCC_SENSOR_READING_FULL)
+				continue;
+
 			if (!(md[i].type & HWMON_SENSORS_MASK))
 				continue;
 
-- 
1.8.3.1



More information about the Skiboot mailing list