diff mbox

[v3,10/11] sensor: return OPAL_UNSUPPORTED when no sensors are supported

Message ID 1425934582-7556-11-git-send-email-clg@fr.ibm.com
State Accepted
Headers show

Commit Message

Cédric Le Goater March 9, 2015, 8:56 p.m. UTC
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@fr.ibm.com>
---
 core/sensor.c                        |    2 +-
 doc/opal-api/opal-sensor-read-88.txt |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

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