• Home
  • Raw
  • Download

Lines Matching refs:type

77 	enum sensors type;  member
114 if (sdata->type == TEMP) in show_sensor()
117 else if (sdata->type == POWER_INPUT) in show_sensor()
248 static const char *convert_opal_attr_name(enum sensors type, in convert_opal_attr_name() argument
258 if (type == TEMP) in convert_opal_attr_name()
260 else if (type == FAN) in convert_opal_attr_name()
274 enum sensors type, u32 *index) in parse_opal_node_name() argument
284 attr_name = convert_opal_attr_name(type, attr_suffix); in parse_opal_node_name()
293 enum sensors type; in get_sensor_type() local
296 for (type = 0; type < ARRAY_SIZE(legacy_compatibles); type++) { in get_sensor_type()
297 if (of_device_is_compatible(np, legacy_compatibles[type])) in get_sensor_type()
298 return type; in get_sensor_type()
310 for (type = 0; type < MAX_SENSOR_TYPE; type++) in get_sensor_type()
311 if (!strcmp(str, sensor_groups[type].name)) in get_sensor_type()
312 return type; in get_sensor_type()
328 sdata_table[i].type == sdata->type) in get_sensor_hwmon_index()
331 return ++sensor_groups[sdata->type].hwmon_index; in get_sensor_hwmon_index()
340 enum sensors type; in init_sensor_group_data() local
347 type = get_sensor_type(sgrp); in init_sensor_group_data()
348 if (type != MAX_SENSOR_TYPE) in init_sensor_group_data()
365 type = get_sensor_type(sgrp); in init_sensor_group_data()
366 if (type == MAX_SENSOR_TYPE) in init_sensor_group_data()
375 sensor_groups[type].attr_count++; in init_sensor_group_data()
402 enum sensors type; in get_sensor_group() local
404 type = get_sensor_type(sgrp); in get_sensor_group()
405 if (type != gtype) in get_sensor_group()
437 enum sensors type; in populate_attr_groups() local
448 type = get_sensor_type(np); in populate_attr_groups()
449 if (type == MAX_SENSOR_TYPE) in populate_attr_groups()
452 sensor_groups[type].attr_count++; in populate_attr_groups()
458 sensor_groups[type].attr_count++; in populate_attr_groups()
460 sensor_groups[type].attr_count++; in populate_attr_groups()
462 sensor_groups[type].attr_count++; in populate_attr_groups()
467 for (type = 0; type < MAX_SENSOR_TYPE; type++) { in populate_attr_groups()
468 sensor_groups[type].group.attrs = devm_kcalloc(&pdev->dev, in populate_attr_groups()
469 sensor_groups[type].attr_count + 1, in populate_attr_groups()
472 if (!sensor_groups[type].group.attrs) in populate_attr_groups()
475 pgroups[type] = &sensor_groups[type].group; in populate_attr_groups()
476 pdata->sensors_count += sensor_groups[type].attr_count; in populate_attr_groups()
477 sensor_groups[type].attr_count = 0; in populate_attr_groups()
492 sensor_groups[sdata->type].name, sdata->hwmon_index, in create_hwmon_attr()
507 const char *attr_name, enum sensors type, in populate_sensor() argument
518 sdata->type = type; in populate_sensor()
522 pgroup->attrs[sensor_groups[type].attr_count++] = &sdata->dev_attr.attr; in populate_sensor()
526 static char *get_max_attr(enum sensors type) in get_max_attr() argument
528 switch (type) { in get_max_attr()
536 static char *get_min_attr(enum sensors type) in get_min_attr() argument
538 switch (type) { in get_min_attr()
574 enum sensors type; in create_device_attrs() local
576 type = get_sensor_type(np); in create_device_attrs()
577 if (type == MAX_SENSOR_TYPE) in create_device_attrs()
593 sdata[count].type = type; in create_device_attrs()
601 attr_name = parse_opal_node_name(np->name, type, &opal_index); in create_device_attrs()
608 sgrp_data = get_sensor_group(pdata, np, type); in create_device_attrs()
610 attr_name, type, pgroups[type], sgrp_data, in create_device_attrs()
624 sensor_id, "label", type, pgroups[type], in create_device_attrs()
630 attr_name = get_max_attr(type); in create_device_attrs()
632 sensor_id, attr_name, type, in create_device_attrs()
633 pgroups[type], sgrp_data, show_sensor, in create_device_attrs()
639 attr_name = get_min_attr(type); in create_device_attrs()
641 sensor_id, attr_name, type, in create_device_attrs()
642 pgroups[type], sgrp_data, show_sensor, in create_device_attrs()
649 hw_id = ++group_attr_id[type]; in create_device_attrs()
651 sgrp_data->gid, "enable", type, in create_device_attrs()
652 pgroups[type], sgrp_data, show_enable, in create_device_attrs()