[Skiboot] [PATCH V7 5/8] sensors: occ: Send CSM_{min/max} on min/max sensor read

Shilpasri G Bhat shilpa.bhat at linux.vnet.ibm.com
Thu Jul 20 04:22:38 AEST 2017


HWMON's lowest/highest attribute is used by CSM agent, so map it to
the min/max of CSM.

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

diff --git a/hw/occ-sensor.c b/hw/occ-sensor.c
index 75f00d5..21d1722 100644
--- a/hw/occ-sensor.c
+++ b/hw/occ-sensor.c
@@ -203,9 +203,9 @@ struct occ_sensor_name {
  * @sample:				Latest sample of this sensor
  * @sample_min:				Minimum value since last OCC reset
  * @sample_max:				Maximum value since last OCC reset
- * @CSM_min:				Minimum value since last reset request
+ * @csm_min:				Minimum value since last reset request
  *					by CSM (CORAL)
- * @CSM_max:				Maximum value since last reset request
+ * @csm_max:				Maximum value since last reset request
  *					by CSM (CORAL)
  * @profiler_min:			Minimum value since last reset request
  *					by profiler (CORAL)
@@ -226,8 +226,8 @@ struct occ_sensor_record {
 	u16 sample;
 	u16 sample_min;
 	u16 sample_max;
-	u16 CSM_min;
-	u16 CSM_max;
+	u16 csm_min;
+	u16 csm_max;
 	u16 profiler_min;
 	u16 profiler_max;
 	u16 job_scheduler_min;
@@ -372,10 +372,10 @@ int occ_sensor_read(u32 handle, u32 *data)
 		*data = sensor->sample;
 		break;
 	case SENSOR_MAX:
-		*data = sensor->sample_max;
+		*data = sensor->csm_max;
 		break;
 	case SENSOR_MIN:
-		*data = sensor->sample_min;
+		*data = sensor->csm_min;
 		break;
 	default:
 		*data = 0;
-- 
1.8.3.1



More information about the Skiboot mailing list