#include <linux/delay.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/math.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
#include <linux/thermal.h>
#include <linux/units.h>
#include "../thermal_hwmon.h"
#define CTEMP_MASK …
#define SW_CALIB0_VAL …
#define SW_CALIB1_VAL …
#define TSU_SM …
#define TSU_ST …
#define TSU_SAD …
#define TSU_SS …
#define OTPTSUTRIM_REG(n) …
#define OTPTSUTRIM_EN_MASK …
#define OTPTSUTRIM_MASK …
#define TSU_SM_EN_TS …
#define TSU_SM_ADC_EN_TS …
#define TSU_SM_NORMAL_MODE …
#define TSU_ST_START …
#define TSU_SS_CONV_RUNNING …
#define TS_CODE_AVE_SCALE(x) …
#define MCELSIUS(temp) …
#define TS_CODE_CAP_TIMES …
#define RZG2L_THERMAL_GRAN …
#define RZG2L_TSU_SS_TIMEOUT_US …
#define CURVATURE_CORRECTION_CONST …
struct rzg2l_thermal_priv { … };
static inline u32 rzg2l_thermal_read(struct rzg2l_thermal_priv *priv, u32 reg)
{ … }
static inline void rzg2l_thermal_write(struct rzg2l_thermal_priv *priv, u32 reg,
u32 data)
{ … }
static int rzg2l_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
{ … }
static const struct thermal_zone_device_ops rzg2l_tz_of_ops = …;
static int rzg2l_thermal_init(struct rzg2l_thermal_priv *priv)
{ … }
static void rzg2l_thermal_reset_assert_pm_disable_put(struct platform_device *pdev)
{ … }
static void rzg2l_thermal_remove(struct platform_device *pdev)
{ … }
static int rzg2l_thermal_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id rzg2l_thermal_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, rzg2l_thermal_dt_ids);
static struct platform_driver rzg2l_thermal_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;