Lines Matching full:handle
90 static int scmi_sensor_attributes_get(const struct scmi_handle *handle, in scmi_sensor_attributes_get() argument
97 ret = scmi_xfer_get_init(handle, PROTOCOL_ATTRIBUTES, in scmi_sensor_attributes_get()
104 ret = scmi_do_xfer(handle, t); in scmi_sensor_attributes_get()
113 scmi_xfer_put(handle, t); in scmi_sensor_attributes_get()
117 static int scmi_sensor_description_get(const struct scmi_handle *handle, in scmi_sensor_description_get() argument
126 ret = scmi_xfer_get_init(handle, SENSOR_DESCRIPTION_GET, in scmi_sensor_description_get()
137 ret = scmi_do_xfer(handle, t); in scmi_sensor_description_get()
145 dev_err(handle->dev, "No. of sensors can't exceed %d", in scmi_sensor_description_get()
170 scmi_reset_rx_to_maxsz(handle, t); in scmi_sensor_description_get()
177 scmi_xfer_put(handle, t); in scmi_sensor_description_get()
181 static int scmi_sensor_trip_point_notify(const struct scmi_handle *handle, in scmi_sensor_trip_point_notify() argument
189 ret = scmi_xfer_get_init(handle, SENSOR_TRIP_POINT_NOTIFY, in scmi_sensor_trip_point_notify()
198 ret = scmi_do_xfer(handle, t); in scmi_sensor_trip_point_notify()
200 scmi_xfer_put(handle, t); in scmi_sensor_trip_point_notify()
205 scmi_sensor_trip_point_config(const struct scmi_handle *handle, u32 sensor_id, in scmi_sensor_trip_point_config() argument
213 ret = scmi_xfer_get_init(handle, SENSOR_TRIP_POINT_CONFIG, in scmi_sensor_trip_point_config()
224 ret = scmi_do_xfer(handle, t); in scmi_sensor_trip_point_config()
226 scmi_xfer_put(handle, t); in scmi_sensor_trip_point_config()
230 static int scmi_sensor_reading_get(const struct scmi_handle *handle, in scmi_sensor_reading_get() argument
236 struct sensors_info *si = handle->sensor_priv; in scmi_sensor_reading_get()
239 ret = scmi_xfer_get_init(handle, SENSOR_READING_GET, in scmi_sensor_reading_get()
250 ret = scmi_do_xfer_with_response(handle, t); in scmi_sensor_reading_get()
256 ret = scmi_do_xfer(handle, t); in scmi_sensor_reading_get()
261 scmi_xfer_put(handle, t); in scmi_sensor_reading_get()
266 scmi_sensor_info_get(const struct scmi_handle *handle, u32 sensor_id) in scmi_sensor_info_get() argument
268 struct sensors_info *si = handle->sensor_priv; in scmi_sensor_info_get()
273 static int scmi_sensor_count_get(const struct scmi_handle *handle) in scmi_sensor_count_get() argument
275 struct sensors_info *si = handle->sensor_priv; in scmi_sensor_count_get()
287 static int scmi_sensor_set_notify_enabled(const struct scmi_handle *handle, in scmi_sensor_set_notify_enabled() argument
292 ret = scmi_sensor_trip_point_notify(handle, src_id, enable); in scmi_sensor_set_notify_enabled()
300 static void *scmi_sensor_fill_custom_report(const struct scmi_handle *handle, in scmi_sensor_fill_custom_report() argument
334 static int scmi_sensors_protocol_init(struct scmi_handle *handle) in scmi_sensors_protocol_init() argument
339 scmi_version_get(handle, SCMI_PROTOCOL_SENSOR, &version); in scmi_sensors_protocol_init()
341 dev_dbg(handle->dev, "Sensor Version %d.%d\n", in scmi_sensors_protocol_init()
344 sinfo = devm_kzalloc(handle->dev, sizeof(*sinfo), GFP_KERNEL); in scmi_sensors_protocol_init()
348 scmi_sensor_attributes_get(handle, sinfo); in scmi_sensors_protocol_init()
350 sinfo->sensors = devm_kcalloc(handle->dev, sinfo->num_sensors, in scmi_sensors_protocol_init()
355 scmi_sensor_description_get(handle, sinfo); in scmi_sensors_protocol_init()
357 scmi_register_protocol_events(handle, in scmi_sensors_protocol_init()
364 handle->sensor_ops = &sensor_ops; in scmi_sensors_protocol_init()
365 handle->sensor_priv = sinfo; in scmi_sensors_protocol_init()