Blame view
include/linux/apple-gmux.h
918 Bytes
caab277b1 treewide: Replace... |
1 |
/* SPDX-License-Identifier: GPL-2.0-only */ |
2413306c2 apple-gmux: Add h... |
2 3 4 |
/* * apple-gmux.h - microcontroller built into dual GPU MacBook Pro & Mac Pro * Copyright (C) 2015 Lukas Wunner <lukas@wunner.de> |
2413306c2 apple-gmux: Add h... |
5 6 7 8 9 10 11 12 |
*/ #ifndef LINUX_APPLE_GMUX_H #define LINUX_APPLE_GMUX_H #include <linux/acpi.h> #define GMUX_ACPI_HID "APP000B" |
b71721197 apple-gmux: Fix b... |
13 |
#if IS_ENABLED(CONFIG_APPLE_GMUX) |
2413306c2 apple-gmux: Add h... |
14 15 16 17 18 19 20 21 22 23 24 |
/** * apple_gmux_present() - detect if gmux is built into the machine * * Drivers may use this to activate quirks specific to dual GPU MacBook Pros * and Mac Pros, e.g. for deferred probing, runtime pm and backlight. * * Return: %true if gmux is present and the kernel was configured * with CONFIG_APPLE_GMUX, %false otherwise. */ static inline bool apple_gmux_present(void) { |
c68ae33e7 ACPI / utils: Ren... |
25 |
return acpi_dev_found(GMUX_ACPI_HID); |
2413306c2 apple-gmux: Add h... |
26 |
} |
b71721197 apple-gmux: Fix b... |
27 28 29 30 31 32 33 34 |
#else /* !CONFIG_APPLE_GMUX */ static inline bool apple_gmux_present(void) { return false; } #endif /* !CONFIG_APPLE_GMUX */ |
2413306c2 apple-gmux: Add h... |
35 |
#endif /* LINUX_APPLE_GMUX_H */ |