firmware: arm_scmi: Drop async flag in sensor_ops->reading_get

SENSOR_DESCRIPTION_GET provides attributes to indicate if the sensor
supports asynchronous read. Ideally we should be able to read that flag
and use asynchronous reads for any sensors with that attribute set.

In order to add that support, let's drop the async flag passed to
sensor_ops->reading_get and dynamically switch between sync and async
flags based on the attributes as provided by the firmware.

Cc: [email protected]
Acked-by: Guenter Roeck <[email protected]>
Signed-off-by: Sudeep Holla <[email protected]>
This commit is contained in:
Sudeep Holla 2019-07-08 09:40:57 +01:00
commit 6a55331c87
3 changed files with 4 additions and 4 deletions

View file

@ -72,7 +72,7 @@ static int scmi_hwmon_read(struct device *dev, enum hwmon_sensor_types type,
const struct scmi_handle *h = scmi_sensors->handle;
sensor = *(scmi_sensors->info[type] + channel);
ret = h->sensor_ops->reading_get(h, sensor->id, false, &value);
ret = h->sensor_ops->reading_get(h, sensor->id, &value);
if (ret)
return ret;