Skip to content

Commit 24271a7

Browse files
committed
applesmc: Do not probe for T2 Macbooks
T2 Macbooks must use the applesmc-t2 module because applesmc.c doesn't provide the necessary features. Signed-off-by: Eric Naim <dnaim@cachyos.org>
1 parent 5b0cce0 commit 24271a7

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

drivers/hwmon/applesmc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
1919

20+
#include <linux/cachy-t2.h>
2021
#include <linux/delay.h>
2122
#include <linux/platform_device.h>
2223
#include <linux/input.h>
@@ -1310,7 +1311,7 @@ static int __init applesmc_init(void)
13101311
{
13111312
int ret;
13121313

1313-
if (!dmi_check_system(applesmc_whitelist)) {
1314+
if (!dmi_check_system(applesmc_whitelist) || apple_is_t2_mac()) {
13141315
pr_warn("supported laptop not found!\n");
13151316
ret = -ENODEV;
13161317
goto out;

include/linux/cachy-t2.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef CACHYOS_T2_H
2+
#define CACHYOS_T2_H
3+
4+
#include <linux/types.h>
5+
6+
bool apple_is_t2_mac(void);
7+
8+
#endif

0 commit comments

Comments
 (0)