1 // SPDX-License-Identifier: GPL-2.0+
3 * Core driver model support for ACPI table generation
5 * Copyright 2019 Google LLC
6 * Written by Simon Glass <sjg@chromium.org>
9 #define LOG_CATEOGRY LOGC_ACPI
16 int acpi_copy_name(char *out_name, const char *name)
18 strncpy(out_name, name, ACPI_NAME_LEN);
19 out_name[ACPI_NAME_LEN] = '\0';
24 int acpi_get_name(const struct udevice *dev, char *out_name)
26 struct acpi_ops *aops;
28 aops = device_get_acpi_ops(dev);
29 if (aops && aops->get_name)
30 return aops->get_name(dev, out_name);