#include <linux/cpufreq.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/thermal.h>
#define HI6220_TEMP0_LAG …
#define HI6220_TEMP0_TH …
#define HI6220_TEMP0_RST_TH …
#define HI6220_TEMP0_CFG …
#define HI6220_TEMP0_CFG_SS_MSK …
#define HI6220_TEMP0_CFG_HDAK_MSK …
#define HI6220_TEMP0_EN …
#define HI6220_TEMP0_INT_EN …
#define HI6220_TEMP0_INT_CLR …
#define HI6220_TEMP0_RST_MSK …
#define HI6220_TEMP0_VALUE …
#define HI3660_OFFSET(chan) …
#define HI3660_TEMP(chan) …
#define HI3660_TH(chan) …
#define HI3660_LAG(chan) …
#define HI3660_INT_EN(chan) …
#define HI3660_INT_CLR(chan) …
#define HI6220_TEMP_BASE …
#define HI6220_TEMP_RESET …
#define HI6220_TEMP_STEP …
#define HI6220_TEMP_LAG …
#define HI3660_TEMP_BASE …
#define HI3660_TEMP_STEP …
#define HI3660_TEMP_LAG …
#define HI6220_CLUSTER0_SENSOR …
#define HI6220_CLUSTER1_SENSOR …
#define HI3660_LITTLE_SENSOR …
#define HI3660_BIG_SENSOR …
#define HI3660_G3D_SENSOR …
#define HI3660_MODEM_SENSOR …
struct hisi_thermal_data;
struct hisi_thermal_sensor { … };
struct hisi_thermal_ops { … };
struct hisi_thermal_data { … };
static inline int hi6220_thermal_step_to_temp(int step)
{ … }
static inline int hi6220_thermal_temp_to_step(int temp)
{ … }
static inline int hi3660_thermal_step_to_temp(int step)
{ … }
static inline int hi3660_thermal_temp_to_step(int temp)
{ … }
static inline void hi6220_thermal_set_lag(void __iomem *addr, int value)
{ … }
static inline void hi6220_thermal_alarm_clear(void __iomem *addr, int value)
{ … }
static inline void hi6220_thermal_alarm_enable(void __iomem *addr, int value)
{ … }
static inline void hi6220_thermal_alarm_set(void __iomem *addr, int temp)
{ … }
static inline void hi6220_thermal_reset_set(void __iomem *addr, int temp)
{ … }
static inline void hi6220_thermal_reset_enable(void __iomem *addr, int value)
{ … }
static inline void hi6220_thermal_enable(void __iomem *addr, int value)
{ … }
static inline int hi6220_thermal_get_temperature(void __iomem *addr)
{ … }
static inline void hi3660_thermal_set_lag(void __iomem *addr,
int id, int value)
{ … }
static inline void hi3660_thermal_alarm_clear(void __iomem *addr,
int id, int value)
{ … }
static inline void hi3660_thermal_alarm_enable(void __iomem *addr,
int id, int value)
{ … }
static inline void hi3660_thermal_alarm_set(void __iomem *addr,
int id, int value)
{ … }
static inline int hi3660_thermal_get_temperature(void __iomem *addr, int id)
{ … }
static inline void hi6220_thermal_sensor_select(void __iomem *addr, int sensor)
{ … }
static inline void hi6220_thermal_hdak_set(void __iomem *addr, int value)
{ … }
static int hi6220_thermal_irq_handler(struct hisi_thermal_sensor *sensor)
{ … }
static int hi3660_thermal_irq_handler(struct hisi_thermal_sensor *sensor)
{ … }
static int hi6220_thermal_get_temp(struct hisi_thermal_sensor *sensor)
{ … }
static int hi3660_thermal_get_temp(struct hisi_thermal_sensor *sensor)
{ … }
static int hi6220_thermal_disable_sensor(struct hisi_thermal_sensor *sensor)
{ … }
static int hi3660_thermal_disable_sensor(struct hisi_thermal_sensor *sensor)
{ … }
static int hi6220_thermal_enable_sensor(struct hisi_thermal_sensor *sensor)
{ … }
static int hi3660_thermal_enable_sensor(struct hisi_thermal_sensor *sensor)
{ … }
static int hi6220_thermal_probe(struct hisi_thermal_data *data)
{ … }
static int hi3660_thermal_probe(struct hisi_thermal_data *data)
{ … }
static int hisi_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
{ … }
static const struct thermal_zone_device_ops hisi_of_thermal_ops = …;
static irqreturn_t hisi_thermal_alarm_irq_thread(int irq, void *dev)
{ … }
static int hisi_thermal_register_sensor(struct platform_device *pdev,
struct hisi_thermal_sensor *sensor)
{ … }
static const struct hisi_thermal_ops hi6220_ops = …;
static const struct hisi_thermal_ops hi3660_ops = …;
static const struct of_device_id of_hisi_thermal_match[] = …;
MODULE_DEVICE_TABLE(of, of_hisi_thermal_match);
static void hisi_thermal_toggle_sensor(struct hisi_thermal_sensor *sensor,
bool on)
{ … }
static int hisi_thermal_probe(struct platform_device *pdev)
{ … }
static void hisi_thermal_remove(struct platform_device *pdev)
{ … }
static int hisi_thermal_suspend(struct device *dev)
{ … }
static int hisi_thermal_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(hisi_thermal_pm_ops,
hisi_thermal_suspend, hisi_thermal_resume);
static struct platform_driver hisi_thermal_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;