linux/drivers/thermal/loongson2_thermal.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Author: zhanghongchen <[email protected]>
 *         Yinbo Zhu <[email protected]>
 * Copyright (C) 2022-2023 Loongson Technology Corporation Limited
 */

#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/minmax.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/thermal.h>
#include <linux/units.h>

#include "thermal_hwmon.h"

#define LOONGSON2_MAX_SENSOR_SEL_NUM

#define LOONGSON2_THSENS_CTRL_HI_REG
#define LOONGSON2_THSENS_CTRL_LOW_REG
#define LOONGSON2_THSENS_STATUS_REG
#define LOONGSON2_THSENS_OUT_REG

#define LOONGSON2_THSENS_INT_LO
#define LOONGSON2_THSENS_INT_HIGH
#define LOONGSON2_THSENS_INT_EN
#define LOONGSON2_THSENS_OUT_MASK

/*
 * This flag is used to indicate the temperature reading
 * method of the Loongson-2K2000
 */
#define LS2K2000_THSENS_OUT_FLAG

struct loongson2_thermal_chip_data {};

struct loongson2_thermal_data {};

static void loongson2_set_ctrl_regs(struct loongson2_thermal_data *data,
				    int ctrl_data, bool low, bool enable)
{}

static int loongson2_thermal_set(struct loongson2_thermal_data *data,
				 int low, int high, bool enable)
{}

static int loongson2_2k1000_get_temp(struct thermal_zone_device *tz, int *temp)
{}

static int loongson2_2k2000_get_temp(struct thermal_zone_device *tz, int *temp)
{}

static irqreturn_t loongson2_thermal_irq_thread(int irq, void *dev)
{}

static int loongson2_thermal_set_trips(struct thermal_zone_device *tz, int low, int high)
{}

static struct thermal_zone_device_ops loongson2_of_thermal_ops =;

static int loongson2_thermal_probe(struct platform_device *pdev)
{}

static const struct loongson2_thermal_chip_data loongson2_thermal_ls2k1000_data =;

static const struct loongson2_thermal_chip_data loongson2_thermal_ls2k2000_data =;

static const struct of_device_id of_loongson2_thermal_match[] =;
MODULE_DEVICE_TABLE(of, of_loongson2_thermal_match);

static struct platform_driver loongson2_thermal_driver =;
module_platform_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();