[Skiboot] [PATCH v2 13/13] sensor: return OPAL_UNSUPPORTED when no sensors are supported

Cédric Le Goater clg at fr.ibm.com
Sat Feb 21 01:27:36 AEDT 2015


The OPAL_SENSOR_READ call in Linux currently only tests for
OPAL_ASYNC_COMPLETION value. It is safe to change this return value to
give some extra information on the platform sensor support.

Signed-off-by: Cédric Le Goater <clg at fr.ibm.com>
---
 core/sensor.c                        |    2 +-
 doc/opal-api/opal-sensor-read-88.txt |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/core/sensor.c b/core/sensor.c
index e0088fe5bce9..d58b04be45c6 100644
--- a/core/sensor.c
+++ b/core/sensor.c
@@ -33,7 +33,7 @@ static int64_t opal_sensor_read(uint32_t sensor_hndl, int token,
 	if (platform.sensor_read)
 		return platform.sensor_read(sensor_hndl, token, sensor_data);
 
-	return OPAL_PARAMETER;
+	return OPAL_UNSUPPORTED;
 }
 
 void sensor_init(void)
diff --git a/doc/opal-api/opal-sensor-read-88.txt b/doc/opal-api/opal-sensor-read-88.txt
index d0b1a08ca5c9..f6c62e1570ee 100644
--- a/doc/opal-api/opal-sensor-read-88.txt
+++ b/doc/opal-api/opal-sensor-read-88.txt
@@ -20,6 +20,7 @@ Parameters:
 Return values:
 	OPAL_SUCCESS
 	OPAL_PARAMETER - invalid sensor handler
+	OPAL_UNSUPPORTED - plateform does not support reading sensors.
 
 in case of communication with the FSP on IBM systems
 
-- 
1.7.10.4



More information about the Skiboot mailing list