1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <acpi/acpigen.h>
4 #include <device/device.h>
7 #define TGL_PMC_MUX_HID "INTC105C"
9 static const char *mux_acpi_name(const struct device
*dev
)
14 static void mux_fill_ssdt(const struct device
*dev
)
16 const char *scope
= acpi_device_scope(dev
);
17 const char *name
= acpi_device_name(dev
);
22 acpigen_write_scope(scope
);
23 acpigen_write_device(name
);
25 acpigen_write_name_string("_HID", TGL_PMC_MUX_HID
);
26 acpigen_write_name_string("_DDN", dev
->chip_ops
->name
);
28 acpigen_pop_len(); /* Device */
29 acpigen_pop_len(); /* Scope */
32 static struct device_operations mux_dev_ops
= {
33 .read_resources
= noop_read_resources
,
34 .set_resources
= noop_set_resources
,
35 .acpi_name
= mux_acpi_name
,
36 .acpi_fill_ssdt
= mux_fill_ssdt
,
37 .scan_bus
= scan_static_bus
,
40 static void mux_enable(struct device
*dev
)
42 dev
->ops
= &mux_dev_ops
;
45 struct chip_operations drivers_intel_pmc_mux_ops
= {
46 .name
= "Intel PMC MUX Driver",
47 .enable_dev
= mux_enable
,