Lines Matching +full:name +full:- +full:cap

1 // SPDX-License-Identifier: GPL-2.0+
62 char name[16]; member
73 …ic int dasharo_get_feature_cap_count(struct dasharo_data *data, enum dasharo_feature feat, int cap) in dasharo_get_feature_cap_count() argument
84 obj[1].integer.value = cap; in dasharo_get_feature_cap_count()
88 handle = ACPI_HANDLE(&data->pdev->dev); in dasharo_get_feature_cap_count()
91 return -ENODEV; in dasharo_get_feature_cap_count()
104 if (feat >= ARRAY_SIZE(data->capabilities)) in dasharo_read_channel()
105 return -EINVAL; in dasharo_read_channel()
107 if (channel >= data->caps_found[feat]) in dasharo_read_channel()
108 return -EINVAL; in dasharo_read_channel()
111 obj[0].integer.value = data->capabilities[feat][channel].group; in dasharo_read_channel()
113 obj[1].integer.value = data->capabilities[feat][channel].index; in dasharo_read_channel()
117 handle = ACPI_HANDLE(&data->pdev->dev); in dasharo_read_channel()
120 return -ENODEV; in dasharo_read_channel()
150 return -ENODEV; in dasharo_hwmon_read()
164 if (channel >= data->caps_found[DASHARO_FEATURE_TEMPERATURE]) in dasharo_hwmon_read_string()
165 return -EINVAL; in dasharo_hwmon_read_string()
167 *str = data->capabilities[DASHARO_FEATURE_TEMPERATURE][channel].name; in dasharo_hwmon_read_string()
170 if (channel >= data->caps_found[DASHARO_FEATURE_FAN_TACH]) in dasharo_hwmon_read_string()
171 return -EINVAL; in dasharo_hwmon_read_string()
173 *str = data->capabilities[DASHARO_FEATURE_FAN_TACH][channel].name; in dasharo_hwmon_read_string()
176 return -EOPNOTSUPP; in dasharo_hwmon_read_string()
189 if (channel < data->caps_found[DASHARO_FEATURE_TEMPERATURE]) in dasharo_hwmon_is_visible()
193 if (channel < data->caps_found[DASHARO_FEATURE_FAN_PWM]) in dasharo_hwmon_is_visible()
197 if (channel < data->caps_found[DASHARO_FEATURE_FAN_TACH]) in dasharo_hwmon_is_visible()
300 struct dasharo_capability *cap; in dasharo_fill_feature_caps() local
310 if (cap_count >= ARRAY_SIZE(data->capabilities[feat])) in dasharo_fill_feature_caps()
313 cap = &data->capabilities[feat][cap_count]; in dasharo_fill_feature_caps()
314 cap->group = group; in dasharo_fill_feature_caps()
315 cap->index = i; in dasharo_fill_feature_caps()
316 scnprintf(cap->name, sizeof(cap->name), "%s %d", in dasharo_fill_feature_caps()
321 data->caps_found[feat] = cap_count; in dasharo_fill_feature_caps()
329 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); in dasharo_probe()
331 return -ENOMEM; in dasharo_probe()
332 data->pdev = pdev; in dasharo_probe()
337 hwmon = devm_hwmon_device_register_with_info(&pdev->dev, "dasharo_acpi", data, in dasharo_probe()
351 .name = "dasharo-acpi",