Lines Matching refs:type
87 enum sensors type; member
111 if (sdata->type == TEMP) in show_sensor()
114 else if (sdata->type == POWER_INPUT) in show_sensor()
205 static const char *convert_opal_attr_name(enum sensors type, in convert_opal_attr_name() argument
215 if (type == TEMP) in convert_opal_attr_name()
217 else if (type == FAN) in convert_opal_attr_name()
231 enum sensors type, u32 *index) in parse_opal_node_name() argument
241 attr_name = convert_opal_attr_name(type, attr_suffix); in parse_opal_node_name()
250 enum sensors type; in get_sensor_type() local
253 for (type = 0; type < ARRAY_SIZE(legacy_compatibles); type++) { in get_sensor_type()
254 if (of_device_is_compatible(np, legacy_compatibles[type])) in get_sensor_type()
255 return type; in get_sensor_type()
267 for (type = 0; type < MAX_SENSOR_TYPE; type++) in get_sensor_type()
268 if (!strcmp(str, sensor_groups[type].name)) in get_sensor_type()
269 return type; in get_sensor_type()
285 sdata_table[i].type == sdata->type) in get_sensor_hwmon_index()
288 return ++sensor_groups[sdata->type].hwmon_index; in get_sensor_hwmon_index()
296 enum sensors type; in populate_attr_groups() local
305 type = get_sensor_type(np); in populate_attr_groups()
306 if (type == MAX_SENSOR_TYPE) in populate_attr_groups()
309 sensor_groups[type].attr_count++; in populate_attr_groups()
315 sensor_groups[type].attr_count++; in populate_attr_groups()
317 sensor_groups[type].attr_count++; in populate_attr_groups()
319 sensor_groups[type].attr_count++; in populate_attr_groups()
324 for (type = 0; type < MAX_SENSOR_TYPE; type++) { in populate_attr_groups()
325 sensor_groups[type].group.attrs = devm_kzalloc(&pdev->dev, in populate_attr_groups()
327 (sensor_groups[type].attr_count + 1), in populate_attr_groups()
329 if (!sensor_groups[type].group.attrs) in populate_attr_groups()
332 pgroups[type] = &sensor_groups[type].group; in populate_attr_groups()
333 pdata->sensors_count += sensor_groups[type].attr_count; in populate_attr_groups()
334 sensor_groups[type].attr_count = 0; in populate_attr_groups()
346 sensor_groups[sdata->type].name, sdata->hwmon_index, in create_hwmon_attr()
356 const char *attr_name, enum sensors type, in populate_sensor() argument
363 sdata->type = type; in populate_sensor()
367 pgroup->attrs[sensor_groups[type].attr_count++] = &sdata->dev_attr.attr; in populate_sensor()
370 static char *get_max_attr(enum sensors type) in get_max_attr() argument
372 switch (type) { in get_max_attr()
380 static char *get_min_attr(enum sensors type) in get_min_attr() argument
382 switch (type) { in get_min_attr()
403 enum sensors type; in create_device_attrs() local
423 type = get_sensor_type(np); in create_device_attrs()
424 if (type == MAX_SENSOR_TYPE) in create_device_attrs()
440 sdata[count].type = type; in create_device_attrs()
448 attr_name = parse_opal_node_name(np->name, type, &opal_index); in create_device_attrs()
460 pgroups[type]->attrs[sensor_groups[type].attr_count++] = in create_device_attrs()
474 sensor_id, "label", type, pgroups[type], in create_device_attrs()
480 attr_name = get_max_attr(type); in create_device_attrs()
483 sensor_id, attr_name, type, in create_device_attrs()
484 pgroups[type], show_sensor); in create_device_attrs()
489 attr_name = get_min_attr(type); in create_device_attrs()
492 sensor_id, attr_name, type, in create_device_attrs()
493 pgroups[type], show_sensor); in create_device_attrs()