+static void sensor_hub_fill_attr_info(I copied this function from hid/hid-sensor-hub.c as it is marked
+ struct hid_sensor_hub_attribute_info *info,
+ s32 index, s32 report_id, struct hid_field *field)
+{
+ info->index = index;
+ info->report_id = report_id;
+ info->units = field->unit;
+ info->unit_expo = field->unit_exponent;
+ info->size = (field->report_size * field->report_count)/8;
+ info->logical_minimum = field->logical_minimum;
+ info->logical_maximum = field->logical_maximum;
}
static in that file. I use it to fill attributes as I find them.
Should I create an another patch to make it non-static?
+ list_for_each_entry(report, &report_enum->report_list, list) {This is how I mange to find all possible hid reports in the parse
+ for (i = 0; i < report->maxfield; ++i) {
+ field = report->field[i];
+
+ for (j = 0; j < field->maxusage; j++) {
+ usage = &(field->usage[j]);
+
reports function. I noticed that in the other function that was used,
sensor_hub_input_get_attribute_info(), it only uses field->usage[0].
Is there a reason for this and should I change my current
implementation?