summaryrefslogtreecommitdiffstats
path: root/include/linux/scpi_protocol.h
diff options
context:
space:
mode:
authorPunit Agrawal <punit.agrawal@arm.com>2015-06-19 15:31:46 +0100
committerSudeep Holla <sudeep.holla@arm.com>2015-10-09 11:05:52 +0100
commit38a1bdc9ff9f6c8cfad228eac5c1ce31ce038b25 (patch)
tree18bfb9a2c8161a624f25838a27a2adf9e74bc547 /include/linux/scpi_protocol.h
parentd8a44fe7b51d250c5b7a6ff85eb652f1f49f496a (diff)
downloadlinux-38a1bdc9ff9f6c8cfad228eac5c1ce31ce038b25.tar.gz
linux-38a1bdc9ff9f6c8cfad228eac5c1ce31ce038b25.tar.bz2
linux-38a1bdc9ff9f6c8cfad228eac5c1ce31ce038b25.zip
firmware: arm_scpi: Extend to support sensors
ARM System Control Processor (SCP) provides an API to query and use the sensors available in the system. Extend the SCPI driver to support sensor messages. Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'include/linux/scpi_protocol.h')
-rw-r--r--include/linux/scpi_protocol.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/scpi_protocol.h b/include/linux/scpi_protocol.h
index e7169cd54e19..80af3cd35ae4 100644
--- a/include/linux/scpi_protocol.h
+++ b/include/linux/scpi_protocol.h
@@ -28,6 +28,20 @@ struct scpi_dvfs_info {
struct scpi_opp *opps;
};
+enum scpi_sensor_class {
+ TEMPERATURE,
+ VOLTAGE,
+ CURRENT,
+ POWER,
+};
+
+struct scpi_sensor_info {
+ u16 sensor_id;
+ u8 class;
+ u8 trigger_type;
+ char name[20];
+} __packed;
+
/**
* struct scpi_ops - represents the various operations provided
* by SCP through SCPI message protocol
@@ -52,6 +66,9 @@ struct scpi_ops {
int (*dvfs_get_idx)(u8);
int (*dvfs_set_idx)(u8, u8);
struct scpi_dvfs_info *(*dvfs_get_info)(u8);
+ int (*sensor_get_capability)(u16 *sensors);
+ int (*sensor_get_info)(u16 sensor_id, struct scpi_sensor_info *);
+ int (*sensor_get_value)(u16, u32 *);
};
#if IS_ENABLED(CONFIG_ARM_SCPI_PROTOCOL)