linux/drivers/thermal/imx8mm_thermal.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright 2020 NXP.
 *
 * Author: Anson Huang <[email protected]>
 */

#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/nvmem-consumer.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/thermal.h>

#include "thermal_hwmon.h"

#define TER
#define TPS
#define TRITSR
/* TMU calibration data registers */
#define TASR
#define TASR_BUF_SLOPE_MASK
#define TASR_BUF_VREF_MASK
#define TASR_BUF_VERF_SEL_MASK
#define TCALIV(n)
#define TCALIV_EN
#define TCALIV_HR_MASK
#define TCALIV_RT_MASK
#define TCALIV_SNSR105C_MASK
#define TCALIV_SNSR25C_MASK
#define TRIM
#define TRIM_BJT_CUR_MASK
#define TRIM_BGR_MASK
#define TRIM_VLSB_MASK
#define TRIM_EN_CH

#define TER_ADC_PD
#define TER_EN
#define TRITSR_TEMP0_VAL_MASK
#define TRITSR_TEMP1_VAL_MASK

#define PROBE_SEL_ALL

#define probe_status_offset(x)
#define SIGN_BIT
#define TEMP_VAL_MASK

/* TMU OCOTP calibration data bitfields */
#define ANA0_EN
#define ANA0_BUF_VREF_MASK
#define ANA0_BUF_SLOPE_MASK
#define ANA0_HR_MASK
#define ANA0_RT_MASK
#define TRIM2_VLSB_MASK
#define TRIM2_BGR_MASK
#define TRIM2_BJT_CUR_MASK
#define TRIM2_BUF_SLOP_SEL_MASK
#define TRIM2_BUF_VERF_SEL_MASK
#define TRIM3_TCA25_0_LSB_MASK
#define TRIM3_TCA40_0_MASK
#define TRIM4_TCA40_1_MASK
#define TRIM4_TCA105_0_MASK
#define TRIM4_TCA25_0_MSB_MASK
#define TRIM5_TCA105_1_MASK
#define TRIM5_TCA25_1_MASK

#define VER1_TEMP_LOW_LIMIT
#define VER2_TEMP_LOW_LIMIT
#define VER2_TEMP_HIGH_LIMIT

#define TMU_VER1
#define TMU_VER2

struct thermal_soc_data {};

struct tmu_sensor {};

struct imx8mm_tmu {};

static int imx8mm_tmu_get_temp(void *data, int *temp)
{}

static int imx8mp_tmu_get_temp(void *data, int *temp)
{}

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

static const struct thermal_zone_device_ops tmu_tz_ops =;

static void imx8mm_tmu_enable(struct imx8mm_tmu *tmu, bool enable)
{}

static void imx8mm_tmu_probe_sel_all(struct imx8mm_tmu *tmu)
{}

static int imx8mm_tmu_probe_set_calib_v1(struct platform_device *pdev,
					 struct imx8mm_tmu *tmu)
{}

static int imx8mm_tmu_probe_set_calib_v2(struct platform_device *pdev,
					 struct imx8mm_tmu *tmu)
{}

static int imx8mm_tmu_probe_set_calib(struct platform_device *pdev,
				      struct imx8mm_tmu *tmu)
{}

static int imx8mm_tmu_probe(struct platform_device *pdev)
{}

static void imx8mm_tmu_remove(struct platform_device *pdev)
{}

static struct thermal_soc_data imx8mm_tmu_data =;

static struct thermal_soc_data imx8mp_tmu_data =;

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

static struct platform_driver imx8mm_tmu =;
module_platform_driver();

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