From 9a17ca2628430a2bc86d7ab0cca820d76a893d6d Mon Sep 17 00:00:00 2001 From: CTCaer Date: Fri, 15 Oct 2021 16:19:16 +0300 Subject: [PATCH] bdk: disable fan control on Hoag and Aula TODO: Add support for them. These use a different way to init/control fan. --- bdk/thermal/fan.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bdk/thermal/fan.c b/bdk/thermal/fan.c index 14379e3..ad1998c 100644 --- a/bdk/thermal/fan.c +++ b/bdk/thermal/fan.c @@ -1,7 +1,7 @@ /* * Fan driver for Nintendo Switch * - * Copyright (c) 2018-2020 CTCaer + * Copyright (c) 2018-2021 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -31,6 +32,12 @@ void set_fan_duty(u32 duty) if (curr_duty == duty) return; + //! TODO: Add HOAG/AULA support. + u32 hw_type = fuse_read_hw_type(); + if (hw_type != FUSE_NX_HW_TYPE_ICOSA && + hw_type != FUSE_NX_HW_TYPE_IOWA) + return; + if (!fan_init) { // Fan tachometer.