Lines Matching refs:index
131 static uint32_t arbitrate_sensitivity(struct sensing_sensor *sensor, int index) in arbitrate_sensitivity() argument
139 sensor->dev->name, conn, index, in arbitrate_sensitivity()
140 conn->sensitivity[index]); in arbitrate_sensitivity()
144 if (conn->sensitivity[index] < min_sensitivity) { in arbitrate_sensitivity()
145 min_sensitivity = conn->sensitivity[index]; in arbitrate_sensitivity()
157 static int set_arbitrate_sensitivity(struct sensing_sensor *sensor, int index, uint32_t sensitivity) in set_arbitrate_sensitivity() argument
164 sensor->sensitivity[index] = sensitivity; in set_arbitrate_sensitivity()
174 static int config_sensitivity(struct sensing_sensor *sensor, int index) in config_sensitivity() argument
176 uint32_t sensitivity = arbitrate_sensitivity(sensor, index); in config_sensitivity()
179 sensor->dev->name, index, sensitivity); in config_sensitivity()
181 return set_arbitrate_sensitivity(sensor, index, sensitivity); in config_sensitivity()
443 int set_sensitivity(struct sensing_connection *conn, int8_t index, uint32_t sensitivity) in set_sensitivity() argument
450 conn->source->dev->name, index, in set_sensitivity()
453 if (index < SENSING_SENSITIVITY_INDEX_ALL || index >= conn->source->sensitivity_count) { in set_sensitivity()
454 LOG_ERR("sensor:%s sensitivity index:%d invalid", conn->source->dev->name, index); in set_sensitivity()
458 if (index == SENSING_SENSITIVITY_INDEX_ALL) { in set_sensitivity()
463 conn->sensitivity[index] = sensitivity; in set_sensitivity()
469 int get_sensitivity(struct sensing_connection *conn, int8_t index, uint32_t *sensitivity) in get_sensitivity() argument
477 if (index < SENSING_SENSITIVITY_INDEX_ALL || index >= conn->source->sensitivity_count) { in get_sensitivity()
478 LOG_ERR("sensor:%s sensitivity index:%d invalid", conn->source->dev->name, index); in get_sensitivity()
482 if (index == SENSING_SENSITIVITY_INDEX_ALL) { in get_sensitivity()
493 *sensitivity = conn->sensitivity[index]; in get_sensitivity()
497 conn->source->dev->name, index, in get_sensitivity()