mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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>
This commit is contained in:
committed by
Sudeep Holla
parent
d8a44fe7b5
commit
38a1bdc9ff
@@ -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)
|
||||
|
Reference in New Issue
Block a user