]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: arm_scmi: Fix SENSOR_AXIS_NAME_GET behaviour when unsupported
authorCristian Marussi <cristian.marussi@arm.com>
Wed, 8 Jun 2022 16:40:51 +0000 (17:40 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Fri, 10 Jun 2022 16:50:29 +0000 (17:50 +0100)
commit7b59b7ae5100510b4197a3688c2ea58273a5dda0
treea82a8322fda5456129931da842a8993b268f0093
parent601813b3cb6998ae7ecd30f4475c6d6722441f43
firmware: arm_scmi: Fix SENSOR_AXIS_NAME_GET behaviour when unsupported

Avoid to invoke SENSOR_AXIS_NAME_GET on sensors that have not declared at
least one of their axes as supporting extended names.

Since the returned list of axes supporting extended names is not
necessarily comprising all the existing axes of the specified sensor,
take care also to properly pick the axis descriptor from the ID embedded
in the response.

Link: https://lore.kernel.org/r/20220608164051.2326087-1-cristian.marussi@arm.com
Fixes: f806de688203 ("firmware: arm_scmi: Add SCMI v3.1 SENSOR_AXIS_NAME_GET support")
Cc: Peter Hilber <peter.hilber@opensynergy.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Peter Hilber <peter.hilber@opensynergy.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/sensors.c