#define pr_fmt(fmt) …
#include <linux/bitfield.h>
#include <linux/module.h>
#include <linux/scmi_protocol.h>
#include "protocols.h"
#include "notify.h"
#define SCMI_PROTOCOL_SUPPORTED_VERSION …
#define SCMI_MAX_NUM_SENSOR_AXIS …
#define SCMIv2_SENSOR_PROTOCOL …
enum scmi_sensor_protocol_cmd { … };
struct scmi_msg_resp_sensor_attributes { … };
#define SUPPORTS_UPDATE_NOTIFY(x) …
#define SENSOR_TSTAMP_EXP(x) …
#define SUPPORTS_TIMESTAMP(x) …
#define SUPPORTS_EXTEND_ATTRS(x) …
#define SENSOR_UPDATE_BASE(x) …
#define SENSOR_UPDATE_SCALE(x) …
#define SENSOR_AXIS_NUMBER(x) …
#define SUPPORTS_AXIS(x) …
#define SENSOR_RES(x) …
#define SENSOR_RES_EXP(x) …
struct scmi_msg_resp_attrs { … };
struct scmi_msg_sensor_description { … };
struct scmi_msg_resp_sensor_description { … };
#define SCMI_MSG_RESP_SENS_DESCR_BASE_SZ …
#define S32_EXT(v) …
struct scmi_msg_sensor_axis_description_get { … };
struct scmi_msg_resp_sensor_axis_description { … };
struct scmi_msg_resp_sensor_axis_names_description { … };
#define SCMI_MSG_RESP_AXIS_DESCR_BASE_SZ …
struct scmi_msg_sensor_list_update_intervals { … };
struct scmi_msg_resp_sensor_list_update_intervals { … };
struct scmi_msg_sensor_request_notify { … };
struct scmi_msg_set_sensor_trip_point { … };
struct scmi_msg_sensor_config_set { … };
struct scmi_msg_sensor_reading_get { … };
struct scmi_resp_sensor_reading_complete { … };
struct scmi_sensor_reading_resp { … };
struct scmi_resp_sensor_reading_complete_v3 { … };
struct scmi_sensor_trip_notify_payld { … };
struct scmi_sensor_update_notify_payld { … };
struct sensors_info { … };
static int scmi_sensor_attributes_get(const struct scmi_protocol_handle *ph,
struct sensors_info *si)
{ … }
static inline void scmi_parse_range_attrs(struct scmi_range_attrs *out,
const struct scmi_msg_resp_attrs *in)
{ … }
struct scmi_sens_ipriv { … };
static void iter_intervals_prepare_message(void *message,
unsigned int desc_index,
const void *p)
{ … }
static int iter_intervals_update_state(struct scmi_iterator_state *st,
const void *response, void *p)
{ … }
static int
iter_intervals_process_response(const struct scmi_protocol_handle *ph,
const void *response,
struct scmi_iterator_state *st, void *p)
{ … }
static int scmi_sensor_update_intervals(const struct scmi_protocol_handle *ph,
struct scmi_sensor_info *s)
{ … }
struct scmi_apriv { … };
static void iter_axes_desc_prepare_message(void *message,
const unsigned int desc_index,
const void *priv)
{ … }
static int
iter_axes_desc_update_state(struct scmi_iterator_state *st,
const void *response, void *priv)
{ … }
static int
iter_axes_desc_process_response(const struct scmi_protocol_handle *ph,
const void *response,
struct scmi_iterator_state *st, void *priv)
{ … }
static int
iter_axes_extended_name_update_state(struct scmi_iterator_state *st,
const void *response, void *priv)
{ … }
static int
iter_axes_extended_name_process_response(const struct scmi_protocol_handle *ph,
const void *response,
struct scmi_iterator_state *st,
void *priv)
{ … }
static int
scmi_sensor_axis_extended_names_get(const struct scmi_protocol_handle *ph,
struct scmi_sensor_info *s)
{ … }
static int scmi_sensor_axis_description(const struct scmi_protocol_handle *ph,
struct scmi_sensor_info *s,
u32 version)
{ … }
static void iter_sens_descr_prepare_message(void *message,
unsigned int desc_index,
const void *priv)
{ … }
static int iter_sens_descr_update_state(struct scmi_iterator_state *st,
const void *response, void *priv)
{ … }
static int
iter_sens_descr_process_response(const struct scmi_protocol_handle *ph,
const void *response,
struct scmi_iterator_state *st, void *priv)
{ … }
static int scmi_sensor_description_get(const struct scmi_protocol_handle *ph,
struct sensors_info *si)
{ … }
static inline int
scmi_sensor_request_notify(const struct scmi_protocol_handle *ph, u32 sensor_id,
u8 message_id, bool enable)
{ … }
static int scmi_sensor_trip_point_notify(const struct scmi_protocol_handle *ph,
u32 sensor_id, bool enable)
{ … }
static int
scmi_sensor_continuous_update_notify(const struct scmi_protocol_handle *ph,
u32 sensor_id, bool enable)
{ … }
static int
scmi_sensor_trip_point_config(const struct scmi_protocol_handle *ph,
u32 sensor_id, u8 trip_id, u64 trip_value)
{ … }
static int scmi_sensor_config_get(const struct scmi_protocol_handle *ph,
u32 sensor_id, u32 *sensor_config)
{ … }
static int scmi_sensor_config_set(const struct scmi_protocol_handle *ph,
u32 sensor_id, u32 sensor_config)
{ … }
static int scmi_sensor_reading_get(const struct scmi_protocol_handle *ph,
u32 sensor_id, u64 *value)
{ … }
static inline void
scmi_parse_sensor_readings(struct scmi_sensor_reading *out,
const struct scmi_sensor_reading_resp *in)
{ … }
static int
scmi_sensor_reading_get_timestamped(const struct scmi_protocol_handle *ph,
u32 sensor_id, u8 count,
struct scmi_sensor_reading *readings)
{ … }
static const struct scmi_sensor_info *
scmi_sensor_info_get(const struct scmi_protocol_handle *ph, u32 sensor_id)
{ … }
static int scmi_sensor_count_get(const struct scmi_protocol_handle *ph)
{ … }
static const struct scmi_sensor_proto_ops sensor_proto_ops = …;
static bool scmi_sensor_notify_supported(const struct scmi_protocol_handle *ph,
u8 evt_id, u32 src_id)
{ … }
static int scmi_sensor_set_notify_enabled(const struct scmi_protocol_handle *ph,
u8 evt_id, u32 src_id, bool enable)
{ … }
static void *
scmi_sensor_fill_custom_report(const struct scmi_protocol_handle *ph,
u8 evt_id, ktime_t timestamp,
const void *payld, size_t payld_sz,
void *report, u32 *src_id)
{ … }
static int scmi_sensor_get_num_sources(const struct scmi_protocol_handle *ph)
{ … }
static const struct scmi_event sensor_events[] = …;
static const struct scmi_event_ops sensor_event_ops = …;
static const struct scmi_protocol_events sensor_protocol_events = …;
static int scmi_sensors_protocol_init(const struct scmi_protocol_handle *ph)
{ … }
static const struct scmi_protocol scmi_sensors = …;
DEFINE_SCMI_PROTOCOL_REGISTER_UNREGISTER(sensors, scmi_sensors)