feat(reimaden): add platform support kernel module

This commit is contained in:
514fpv 2024-02-14 03:23:48 +08:00
parent b3d50a3180
commit 6c52d98c54
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw
26 changed files with 2071 additions and 0 deletions

View file

@ -0,0 +1,35 @@
// SPDX-License-Identifier: GPL-2.0
#include "pr.h"
#include <linux/init.h>
#include <linux/moduleparam.h>
#include <linux/types.h>
#include <uapi/asm-generic/errno-base.h>
#include "hwmon_fan.h"
#include "hwmon_pwm.h"
/* ========================================================================== */
static bool nohwmon;
module_param(nohwmon, bool, 0444);
MODULE_PARM_DESC(nohwmon, "do not report to the hardware monitoring subsystem (default=false)");
/* ========================================================================== */
int __init ac71_hwmon_setup(void)
{
if (nohwmon)
return -ENODEV;
(void) ac71_hwmon_fan_setup();
(void) ac71_hwmon_pwm_setup();
return 0;
}
void ac71_hwmon_cleanup(void)
{
(void) ac71_hwmon_fan_cleanup();
(void) ac71_hwmon_pwm_cleanup();
}