diff mbox

[V7,2/4] sensors: occ: Send CSM_{min/max} on min/max sensor read

Message ID 1498820345-1486-3-git-send-email-shilpa.bhat@linux.vnet.ibm.com
State Superseded
Headers show

Commit Message

Shilpasri G Bhat June 30, 2017, 10:59 a.m. UTC
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@linux.vnet.ibm.com>
---
- No changes from V6

 hw/occ-sensor.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox

Patch

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;