]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: arm_scmi: Drop async flag in sensor_ops->reading_get
authorSudeep Holla <sudeep.holla@arm.com>
Mon, 8 Jul 2019 08:40:57 +0000 (09:40 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Mon, 12 Aug 2019 11:23:00 +0000 (12:23 +0100)
commita1db3c2df6b1911e2d600b2b93291cf781ef5a3b
treef0c195e8089dc5bf928c331ff5ab4eb138b7683e
parentbc1f4958db95656a91ea64fe8e6ab07034550dd3
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: linux-hwmon@vger.kernel.org
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/sensors.c
drivers/hwmon/scmi-hwmon.c
include/linux/scmi_protocol.h