1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * apple-gmux.h - microcontroller built into dual GPU MacBook Pro & Mac Pro
4 * Copyright (C) 2015 Lukas Wunner <lukas@wunner.de>
7 #ifndef LINUX_APPLE_GMUX_H
8 #define LINUX_APPLE_GMUX_H
10 #include <linux/acpi.h>
12 #define GMUX_ACPI_HID "APP000B"
14 #if IS_ENABLED(CONFIG_APPLE_GMUX)
17 * apple_gmux_present() - detect if gmux is built into the machine
19 * Drivers may use this to activate quirks specific to dual GPU MacBook Pros
20 * and Mac Pros, e.g. for deferred probing, runtime pm and backlight.
22 * Return: %true if gmux is present and the kernel was configured
23 * with CONFIG_APPLE_GMUX, %false otherwise.
25 static inline bool apple_gmux_present(void)
27 return acpi_dev_found(GMUX_ACPI_HID);
30 #else /* !CONFIG_APPLE_GMUX */
32 static inline bool apple_gmux_present(void)
37 #endif /* !CONFIG_APPLE_GMUX */
39 #endif /* LINUX_APPLE_GMUX_H */