Lines Matching refs:dev
33 static ssize_t chromeos_attr_show_gpio_##_num(struct device *dev, \
43 return chromeos_acpi_evaluate_method(dev, _num, num, name, buf); \
70 static int chromeos_acpi_handle_package(struct device *dev, union acpi_object *obj, in chromeos_acpi_handle_package() argument
119 dev_info_once(dev, "truncating sysfs content for %s\n", name); in chromeos_acpi_handle_package()
124 dev_err(dev, "element type %d not supported\n", element->type); in chromeos_acpi_handle_package()
129 static int chromeos_acpi_evaluate_method(struct device *dev, int pkg_num, int sub_pkg_num, in chromeos_acpi_evaluate_method() argument
136 status = acpi_evaluate_object(ACPI_HANDLE(dev), name, NULL, &output); in chromeos_acpi_evaluate_method()
138 dev_err(dev, "failed to retrieve %s. %s\n", name, acpi_format_exception(status)); in chromeos_acpi_evaluate_method()
143 ret = chromeos_acpi_handle_package(dev, output.pointer, pkg_num, sub_pkg_num, in chromeos_acpi_evaluate_method()
160 static ssize_t chromeos_first_level_attr_show(struct device *dev, struct device_attribute *attr, in chromeos_first_level_attr_show() argument
169 return chromeos_acpi_evaluate_method(dev, attr_num, 0, attr_name, buf); in chromeos_first_level_attr_show()
172 static unsigned int get_gpio_pkg_num(struct device *dev) in get_gpio_pkg_num() argument
180 status = acpi_evaluate_object(ACPI_HANDLE(dev), name, NULL, &output); in get_gpio_pkg_num()
182 dev_err(dev, "failed to retrieve %s. %s\n", name, acpi_format_exception(status)); in get_gpio_pkg_num()
255 chromeos_acpi_gpio_groups = get_gpio_pkg_num(&pdev->dev); in chromeos_acpi_device_probe()
262 dev_warn(&pdev->dev, "Only %zu GPIO attr groups supported by the driver out of total %u.\n", in chromeos_acpi_device_probe()