Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bfdf1402 authored by Jishnu Prakash's avatar Jishnu Prakash Committed by Gerrit - the friendly Code Review server
Browse files

thermal: adc-tm: Add support for PMIC7 ADC_TM



Add support for PMIC7 ADC_TM peripheral in ADC_TM common driver files.
Add main ADC_TM driver file for PMIC7. As register offsets and SW flows
have changed significantly for ADC_TM due to ADC architecture change,
this new driver is required for ADC_TM on PMIC7.

Change-Id: I9211552317955c503b7287876e11cd161c37f706
Signed-off-by: default avatarJishnu Prakash <jprakash@codeaurora.org>
parent 6bb0d0ab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
obj-$(CONFIG_QCOM_TSENS)	+= qcom_tsens.o
qcom_tsens-y			+= tsens.o tsens-common.o tsens-8916.o tsens-8974.o tsens-8960.o tsens-v2.o
obj-$(CONFIG_QTI_ADC_TM) += adc-tm.o adc-tm-common.o adc-tm5.o
obj-$(CONFIG_QTI_ADC_TM) += adc-tm.o adc-tm-common.o adc-tm5.o adc-tm7.o
obj-$(CONFIG_QTI_VIRTUAL_SENSOR) += qti_virtual_sensor.o
obj-$(CONFIG_QTI_QMI_SENSOR) += thermal_sensor_service_v01.o qmi_sensors.o
obj-$(CONFIG_QTI_BCL_PMIC5) += bcl_pmic5.o
+258 −0
Original line number Diff line number Diff line
@@ -47,6 +47,181 @@ static const struct adc_tm_map_pt adcmap_100k_104ef_104fb_1875_vref[] = {
	{ 46000,	125000 },
};

/*
 * Resistance to temperature table for NTCG104EF104 thermistor with
 * 100k pull-up.
 */
static const struct adc_tm_map_pt adcmap_100k_adc7[] = {
	{ 4250657, -40960 },
	{ 3962085, -39936 },
	{ 3694875, -38912 },
	{ 3447322, -37888 },
	{ 3217867, -36864 },
	{ 3005082, -35840 },
	{ 2807660, -34816 },
	{ 2624405, -33792 },
	{ 2454218, -32768 },
	{ 2296094, -31744 },
	{ 2149108, -30720 },
	{ 2012414, -29696 },
	{ 1885232, -28672 },
	{ 1766846, -27648 },
	{ 1656598, -26624 },
	{ 1553884, -25600 },
	{ 1458147, -24576 },
	{ 1368873, -23552 },
	{ 1285590, -22528 },
	{ 1207863, -21504 },
	{ 1135290, -20480 },
	{ 1067501, -19456 },
	{ 1004155, -18432 },
	{ 944935, -17408 },
	{ 889550, -16384 },
	{ 837731, -15360 },
	{ 789229, -14336 },
	{ 743813, -13312 },
	{ 701271, -12288 },
	{ 661405, -11264 },
	{ 624032, -10240 },
	{ 588982, -9216 },
	{ 556100, -8192 },
	{ 525239, -7168 },
	{ 496264, -6144 },
	{ 469050, -5120 },
	{ 443480, -4096 },
	{ 419448, -3072 },
	{ 396851, -2048 },
	{ 375597, -1024 },
	{ 355598, 0 },
	{ 336775, 1024 },
	{ 319052, 2048 },
	{ 302359, 3072 },
	{ 286630, 4096 },
	{ 271806, 5120 },
	{ 257829, 6144 },
	{ 244646, 7168 },
	{ 232209, 8192 },
	{ 220471, 9216 },
	{ 209390, 10240 },
	{ 198926, 11264 },
	{ 189040, 12288 },
	{ 179698, 13312 },
	{ 170868, 14336 },
	{ 162519, 15360 },
	{ 154622, 16384 },
	{ 147150, 17408 },
	{ 140079, 18432 },
	{ 133385, 19456 },
	{ 127046, 20480 },
	{ 121042, 21504 },
	{ 115352, 22528 },
	{ 109960, 23552 },
	{ 104848, 24576 },
	{ 100000, 25600 },
	{ 95402, 26624 },
	{ 91038, 27648 },
	{ 86897, 28672 },
	{ 82965, 29696 },
	{ 79232, 30720 },
	{ 75686, 31744 },
	{ 72316, 32768 },
	{ 69114, 33792 },
	{ 66070, 34816 },
	{ 63176, 35840 },
	{ 60423, 36864 },
	{ 57804, 37888 },
	{ 55312, 38912 },
	{ 52940, 39936 },
	{ 50681, 40960 },
	{ 48531, 41984 },
	{ 46482, 43008 },
	{ 44530, 44032 },
	{ 42670, 45056 },
	{ 40897, 46080 },
	{ 39207, 47104 },
	{ 37595, 48128 },
	{ 36057, 49152 },
	{ 34590, 50176 },
	{ 33190, 51200 },
	{ 31853, 52224 },
	{ 30577, 53248 },
	{ 29358, 54272 },
	{ 28194, 55296 },
	{ 27082, 56320 },
	{ 26020, 57344 },
	{ 25004, 58368 },
	{ 24033, 59392 },
	{ 23104, 60416 },
	{ 22216, 61440 },
	{ 21367, 62464 },
	{ 20554, 63488 },
	{ 19776, 64512 },
	{ 19031, 65536 },
	{ 18318, 66560 },
	{ 17636, 67584 },
	{ 16982, 68608 },
	{ 16355, 69632 },
	{ 15755, 70656 },
	{ 15180, 71680 },
	{ 14628, 72704 },
	{ 14099, 73728 },
	{ 13592, 74752 },
	{ 13106, 75776 },
	{ 12640, 76800 },
	{ 12192, 77824 },
	{ 11762, 78848 },
	{ 11350, 79872 },
	{ 10954, 80896 },
	{ 10574, 81920 },
	{ 10209, 82944 },
	{ 9858, 83968 },
	{ 9521, 84992 },
	{ 9197, 86016 },
	{ 8886, 87040 },
	{ 8587, 88064 },
	{ 8299, 89088 },
	{ 8023, 90112 },
	{ 7757, 91136 },
	{ 7501, 92160 },
	{ 7254, 93184 },
	{ 7017, 94208 },
	{ 6789, 95232 },
	{ 6570, 96256 },
	{ 6358, 97280 },
	{ 6155, 98304 },
	{ 5959, 99328 },
	{ 5770, 100352 },
	{ 5588, 101376 },
	{ 5412, 102400 },
	{ 5243, 103424 },
	{ 5080, 104448 },
	{ 4923, 105472 },
	{ 4771, 106496 },
	{ 4625, 107520 },
	{ 4484, 108544 },
	{ 4348, 109568 },
	{ 4217, 110592 },
	{ 4090, 111616 },
	{ 3968, 112640 },
	{ 3850, 113664 },
	{ 3736, 114688 },
	{ 3626, 115712 },
	{ 3519, 116736 },
	{ 3417, 117760 },
	{ 3317, 118784 },
	{ 3221, 119808 },
	{ 3129, 120832 },
	{ 3039, 121856 },
	{ 2952, 122880 },
	{ 2868, 123904 },
	{ 2787, 124928 },
	{ 2709, 125952 },
	{ 2633, 126976 },
	{ 2560, 128000 },
	{ 2489, 129024 },
	{ 2420, 130048 }
};

static void adc_tm_map_voltage_temp(const struct adc_tm_map_pt *pts,
				      size_t tablesize, int input, int *output)
{
@@ -140,6 +315,7 @@ int therm_fwd_scale(int64_t code, uint32_t adc_hc_vdd_ref_mv,
	volt = (s64) code * adc_hc_vdd_ref_mv;
	volt = div64_s64(volt, (data->full_scale_code_volt));

	/* Same API can be used for resistance-temperature table */
	adc_tm_map_voltage_temp(adcmap_100k_104ef_104fb_1875_vref,
				 ARRAY_SIZE(adcmap_100k_104ef_104fb_1875_vref),
				 (int) volt, &result);
@@ -148,6 +324,25 @@ int therm_fwd_scale(int64_t code, uint32_t adc_hc_vdd_ref_mv,
}
EXPORT_SYMBOL(therm_fwd_scale);

int therm_fwd_scale_adc7(int64_t code)
{
	int64_t resistance = 0;
	int result = 0;

	if (code >= RATIO_MAX_ADC7)
		return -EINVAL;

	resistance = (s64) code * R_PU_100K;
	resistance = div64_s64(resistance, (RATIO_MAX_ADC7 - code));

	adc_tm_map_voltage_temp(adcmap_100k_adc7,
				 ARRAY_SIZE(adcmap_100k_adc7),
				 (int) resistance, &result);

	return result;
}
EXPORT_SYMBOL(therm_fwd_scale_adc7);

void adc_tm_scale_therm_voltage_100k(struct adc_tm_config *param,
				const struct adc_tm_data *data)
{
@@ -188,6 +383,47 @@ void adc_tm_scale_therm_voltage_100k(struct adc_tm_config *param,
}
EXPORT_SYMBOL(adc_tm_scale_therm_voltage_100k);

void adc_tm_scale_therm_voltage_100k_adc7(struct adc_tm_config *param)
{
	int temp;
	int64_t resistance = 0;

	/* High temperature maps to lower threshold voltage */
	/* Same API can be used for resistance-temperature table */
	adc_tm_map_temp_voltage(
		adcmap_100k_adc7,
		ARRAY_SIZE(adcmap_100k_adc7),
		param->high_thr_temp, &resistance);

	param->low_thr_voltage = resistance * RATIO_MAX_ADC7;
	param->low_thr_voltage = div64_s64(param->low_thr_voltage,
						(resistance + R_PU_100K));

	temp = therm_fwd_scale_adc7(param->low_thr_voltage);
	if (temp == -EINVAL)
		return;

	if (temp < param->high_thr_temp)
		param->low_thr_voltage--;

	/* Low temperature maps to higher threshold voltage */
	/* Same API can be used for resistance-temperature table */
	adc_tm_map_temp_voltage(
		adcmap_100k_adc7,
		ARRAY_SIZE(adcmap_100k_adc7),
		param->low_thr_temp, &resistance);

	param->high_thr_voltage = resistance * RATIO_MAX_ADC7;
	param->high_thr_voltage = div64_s64(param->high_thr_voltage,
						(resistance + R_PU_100K));

	temp = therm_fwd_scale_adc7(param->high_thr_voltage);

	if (temp > param->low_thr_temp)
		param->high_thr_voltage++;
}
EXPORT_SYMBOL(adc_tm_scale_therm_voltage_100k_adc7);

int32_t adc_tm_absolute_rthr(const struct adc_tm_data *data,
			struct adc_tm_config *tm_config)
{
@@ -195,11 +431,13 @@ int32_t adc_tm_absolute_rthr(const struct adc_tm_data *data,

	low_thr =  div_s64(tm_config->low_thr_voltage, tm_config->prescal);
	low_thr *= data->full_scale_code_volt;

	low_thr = div64_s64(low_thr, ADC_HC_VDD_REF);
	tm_config->low_thr_voltage = low_thr;

	high_thr =  div_s64(tm_config->high_thr_voltage, tm_config->prescal);
	high_thr *= data->full_scale_code_volt;

	high_thr = div64_s64(high_thr, ADC_HC_VDD_REF);
	tm_config->high_thr_voltage = high_thr;

@@ -207,5 +445,25 @@ int32_t adc_tm_absolute_rthr(const struct adc_tm_data *data,
}
EXPORT_SYMBOL(adc_tm_absolute_rthr);

int32_t adc_tm_absolute_rthr_adc7(struct adc_tm_config *tm_config)
{
	int64_t low_thr = 0, high_thr = 0;

	low_thr =  div_s64(tm_config->low_thr_voltage, tm_config->prescal);
	low_thr *= MAX_CODE_VOLT;

	low_thr = div64_s64(low_thr, ADC_HC_VDD_REF);
	tm_config->low_thr_voltage = low_thr;

	high_thr =  div_s64(tm_config->high_thr_voltage, tm_config->prescal);
	high_thr *= MAX_CODE_VOLT;

	high_thr = div64_s64(high_thr, ADC_HC_VDD_REF);
	tm_config->high_thr_voltage = high_thr;

	return 0;
}
EXPORT_SYMBOL(adc_tm_absolute_rthr_adc7);

MODULE_DESCRIPTION("Qualcomm Technologies Inc. PMIC ADC_TM common driver");
MODULE_LICENSE("GPL v2");
+85 −7
Original line number Diff line number Diff line
@@ -51,6 +51,35 @@ static int adc_tm_init(struct adc_tm_chip *adc_tm, uint32_t dt_chans)
	return 0;
}

int32_t adc_tm5_channel_measure(struct adc_tm_chip *adc_tm,
					struct adc_tm_param *param)
{
	if (adc_tm->ops->channel_measure)
		return adc_tm->ops->channel_measure(adc_tm, param);

	return 0;
}
EXPORT_SYMBOL(adc_tm5_channel_measure);

int32_t adc_tm5_disable_chan_meas(struct adc_tm_chip *adc_tm,
					struct adc_tm_param *param)
{
	if (adc_tm->ops->disable_chan)
		return adc_tm->ops->disable_chan(adc_tm, param);

	return 0;
}
EXPORT_SYMBOL(adc_tm5_disable_chan_meas);

static void notify_adc_tm_fn(struct work_struct *work)
{
	struct adc_tm_sensor *adc_tm = container_of(work,
		struct adc_tm_sensor, work);

	if (adc_tm->chip->ops->notify)
		adc_tm->chip->ops->notify(adc_tm);
}

static struct thermal_zone_of_device_ops adc_tm_ops = {
	.get_temp = adc_tm_get_temp,
	.set_trips = adc_tm_set_trip_temp,
@@ -63,19 +92,24 @@ static struct thermal_zone_of_device_ops adc_tm_ops_iio = {
static int adc_tm_register_tzd(struct adc_tm_chip *adc_tm, int dt_chan_num,
					bool set_trips)
{
	unsigned int i;
	unsigned int i, channel;
	struct thermal_zone_device *tzd;

	for (i = 0; i < dt_chan_num; i++) {
		adc_tm->sensor[i].chip = adc_tm;
		if (adc_tm->data == &data_adc_tm7)
			channel = V_CHAN(adc_tm->sensor[i]);
		else
			channel = adc_tm->sensor[i].adc_ch;

		if (!adc_tm->sensor[i].non_thermal) {
			if (set_trips)
				tzd = devm_thermal_zone_of_sensor_register(
					adc_tm->dev, adc_tm->sensor[i].adc_ch,
					adc_tm->dev, channel,
					&adc_tm->sensor[i], &adc_tm_ops);
			else
				tzd = devm_thermal_zone_of_sensor_register(
					adc_tm->dev, adc_tm->sensor[i].adc_ch,
					adc_tm->dev, channel,
					&adc_tm->sensor[i], &adc_tm_ops_iio);

			if (IS_ERR(tzd)) {
@@ -136,7 +170,6 @@ struct adc_tm_chip *get_adc_tm(struct device *dev, const char *name)
	node = of_parse_phandle(dev->of_node, prop_name, 0);
	if (node == NULL)
		return ERR_PTR(-ENODEV);

	list_for_each_entry(chip, &adc_tm_device_list, list) {
		pdev = to_platform_device(chip->dev);
		if (pdev->dev.of_node == node)
@@ -165,6 +198,9 @@ static const struct of_device_id adc_tm_match_table[] = {
	{
		.compatible = "qcom,adc-tm5-iio",
		.data = &data_adc_tm5,

		.compatible = "qcom,adc-tm7",
		.data = &data_adc_tm7,
	},
	{}
};
@@ -224,7 +260,9 @@ static int adc_tm_get_dt_data(struct platform_device *pdev,
	for_each_child_of_node(node, child) {
		int channel_num, i = 0, adc_rscale_fn = 0;
		int calib_type = 0, ret, hw_settle_time = 0;
		int decimation, fast_avg_samples;
		int prescal = 0;
		u32 sid = 0;
		struct iio_channel *chan_adc;
		bool non_thermal = false;

@@ -234,6 +272,11 @@ static int adc_tm_get_dt_data(struct platform_device *pdev,
			return -EINVAL;
		}

		if (data == &data_adc_tm7) {
			sid = (channel_num >> ADC_CHANNEL_OFFSET);
			channel_num &= ADC_CHANNEL_MASK;
		}

		ret = of_property_read_u32(child, "qcom,hw-settle-time",
							&hw_settle_time);
		if (!ret) {
@@ -244,9 +287,34 @@ static int adc_tm_get_dt_data(struct platform_device *pdev,
				return ret;
			}
			hw_settle_time = ret;
		} else {
		} else
			hw_settle_time = ADC_TM_DEF_HW_SETTLE_TIME;

		ret = of_property_read_u32(child, "qcom,decimation",
							&decimation);
		if (!ret) {
			ret = adc_tm_decimation_from_dt(decimation,
					data->decimation);
			if (ret < 0) {
				dev_err(dev, "Invalid decimation value\n");
				return ret;
			}
			decimation = ret;
		} else
			decimation = ADC_TM_DECIMATION_DEFAULT;

		ret = of_property_read_u32(child, "qcom,avg-samples",
							&fast_avg_samples);
		if (!ret) {
			ret = adc_tm_avg_samples_from_dt(fast_avg_samples);
			if (ret < 0) {
				dev_err(dev, "Invalid fast average with %d\n",
						ret);
				return -EINVAL;
			}
			fast_avg_samples = ret;
		} else
			fast_avg_samples = ADC_TM_DEF_AVG_SAMPLES;

		if (of_property_read_bool(child, "qcom,ratiometric"))
			calib_type = ADC_RATIO_CAL;
@@ -271,6 +339,16 @@ static int adc_tm_get_dt_data(struct platform_device *pdev,
		/* Default to 1 second timer select */
		adc_tm->sensor[idx].timer_select = ADC_TIMER_SEL_2;
		adc_tm->sensor[idx].hw_settle_time = hw_settle_time;

		if (data == &data_adc_tm7) {
			/* Default to 1 second time select */
			adc_tm->sensor[idx].meas_time = MEAS_INT_1S;
			adc_tm->sensor[idx].fast_avg_samples = fast_avg_samples;
			adc_tm->sensor[idx].decimation = decimation;
			adc_tm->sensor[idx].sid = sid;
			adc_tm->sensor[idx].btm_ch = idx;
		}

		adc_tm->sensor[idx].adc_rscale_fn = adc_rscale_fn;
		adc_tm->sensor[idx].non_thermal = non_thermal;
		adc_tm->sensor[idx].prescaling = prescal;
+42 −4
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
#include <linux/qpnp/qpnp-revid.h>
#include <linux/adc-tm-clients.h>

#define ADC_TM_DECIMATION_DEFAULT	840
#define ADC_TM_DECIMATION_DEFAULT	2
#define ADC_TM_DECIMATION_SAMPLES_MAX	3
#define ADC_TM_DEF_AVG_SAMPLES		0 /* 1 sample */
#define ADC_TM_DEF_HW_SETTLE_TIME	0 /* 15 us */
@@ -26,6 +26,12 @@
#define ADC_TM_TIMER3			4 /* 4 second */
#define ADC_HC_VDD_REF			1875000
#define MAX_PROP_NAME_LEN		32
#define R_PU_100K			100000
#define RATIO_MAX_ADC7			0x4000
#define MAX_CODE_VOLT			0x70e4
#define ADC_CHANNEL_OFFSET		8
#define V_CHAN(x)		(((x).sid << ADC_CHANNEL_OFFSET) | (x).adc_ch)
#define ADC_CHANNEL_MASK		0xff

enum adc_cal_method {
	ADC_NO_CAL = 0,
@@ -47,6 +53,14 @@ enum adc_timer_select {
	ADC_TIMER_SEL_NONE,
};

enum adc_time_select {
	MEAS_INT_50MS = 0,
	MEAS_INT_100MS,
	MEAS_INT_1S,
	MEAS_INT_SET,
	MEAS_INT_NONE,
};

/**
 * enum adc_tm_rscale_fn_type - Scaling function used to convert the
 *	channels input voltage/temperature to corresponding ADC code that is
@@ -73,12 +87,21 @@ struct adc_tm_sensor {
	unsigned int			btm_ch;
	unsigned int			prescaling;
	unsigned int			timer_select;
	unsigned int			decimation;		/* PMIC7 */
	unsigned int			fast_avg_samples;	/* PMIC7 */
	unsigned int			sid;			/* PMIC7 */
	unsigned int			meas_time;		/* PMIC7 */
	int64_t				high_thr_voltage;	/* PMIC7 */
	int64_t				low_thr_voltage;	/* PMIC7 */
	enum adc_tm_rscale_fn_type	adc_rscale_fn;
	struct iio_channel		*adc;
	struct list_head		thr_list;
	bool				non_thermal;
	bool				high_thr_triggered;
	bool				low_thr_triggered;
	int				high_thr_en;		/* PMIC7 */
	int				low_thr_en;		/* PMIC7 */
	int				meas_en;		/* PMIC7 */
	struct workqueue_struct		*req_wq;
	struct work_struct		work;
};
@@ -108,6 +131,11 @@ struct adc_tm_ops {
	int (*init)(struct adc_tm_chip *chip, uint32_t dt_chans);
	int (*set_trips)(struct adc_tm_sensor *sensor, int low_temp,
							int high_temp);
	int32_t (*channel_measure)(struct adc_tm_chip *chip,
					struct adc_tm_param *param);
	int32_t (*disable_chan)(struct adc_tm_chip *chip,
					struct adc_tm_param *param);
	void (*notify)(struct adc_tm_sensor *adc_tm);
	int (*interrupts_reg)(struct adc_tm_chip *chip);
	int (*shutdown)(struct adc_tm_chip *chip);
};
@@ -135,6 +163,8 @@ struct adc_tm_data {
};

extern const struct adc_tm_data data_adc_tm5;
extern const struct adc_tm_data data_adc_tm7;

/**
 * Channel index for the corresponding index to adc_tm_channel_select
 */
@@ -230,6 +260,10 @@ struct adc_tm_reverse_scale_fn {
		struct adc_tm_config *tm_config);
};

struct adc_tm_reverse_scale_fn_adc7 {
	int32_t (*chan)(struct adc_tm_config *tm_config);
};

/**
 * struct adc_map_pt - Map the graph representation for ADC channel
 * @x: Represent the ADC digitized code.
@@ -265,7 +299,11 @@ void adc_tm_scale_therm_voltage_100k(struct adc_tm_config *param,
int32_t adc_tm_absolute_rthr(const struct adc_tm_data *data,
			struct adc_tm_config *tm_config);

void notify_adc_tm_fn(struct work_struct *work);
int therm_fwd_scale_adc7(int64_t code);

void adc_tm_scale_therm_voltage_100k_adc7(struct adc_tm_config *param);

int32_t adc_tm_absolute_rthr_adc7(struct adc_tm_config *tm_config);

int adc_tm_is_valid(struct adc_tm_chip *chip);

+9 −8
Original line number Diff line number Diff line
@@ -418,7 +418,8 @@ static int32_t adc_tm5_manage_thresholds(struct adc_tm_sensor *sensor)
	return 0;
}

void notify_adc_tm_fn(struct work_struct *work)
/* Used to notify non-thermal clients of threshold crossing */
void notify_adc_tm5_fn(struct adc_tm_sensor *adc_tm)
{
	struct adc_tm_client_info *client_info = NULL;
	struct adc_tm_chip *chip;
@@ -426,9 +427,6 @@ void notify_adc_tm_fn(struct work_struct *work)
	uint32_t btm_chan_num = 0, btm_chan_idx = 0;
	int ret = 0;

	struct adc_tm_sensor *adc_tm = container_of(work,
		struct adc_tm_sensor, work);

	chip = adc_tm->chip;

	btm_chan_num = adc_tm->btm_ch;
@@ -510,7 +508,8 @@ void notify_adc_tm_fn(struct work_struct *work)
	}
}

int32_t adc_tm5_channel_measure(struct adc_tm_chip *chip,
/* Used by non-thermal clients to configure an ADC_TM channel */
static int32_t adc_tm_5_channel_measure(struct adc_tm_chip *chip,
					struct adc_tm_param *param)

{
@@ -612,9 +611,9 @@ int32_t adc_tm5_channel_measure(struct adc_tm_chip *chip,
	mutex_unlock(&chip->adc_mutex_lock);
	return ret;
}
EXPORT_SYMBOL(adc_tm5_channel_measure);

int32_t adc_tm5_disable_chan_meas(struct adc_tm_chip *chip,
/* Used by non-thermal clients to release an ADC_TM channel */
static int32_t adc_tm_5_disable_chan_meas(struct adc_tm_chip *chip,
					struct adc_tm_param *param)
{
	int ret = 0, i = 0;
@@ -672,7 +671,6 @@ int32_t adc_tm5_disable_chan_meas(struct adc_tm_chip *chip,
	spin_unlock_irqrestore(&chip->adc_tm_lock, flags);
	return ret;
}
EXPORT_SYMBOL(adc_tm5_disable_chan_meas);

static int adc_tm5_set_mode(struct adc_tm_sensor *sensor,
			      enum thermal_device_mode mode)
@@ -1110,6 +1108,9 @@ static const struct adc_tm_ops ops_adc_tm5 = {
	.set_trips	= adc_tm5_set_trip_temp,
	.interrupts_reg = adc_tm5_register_interrupts,
	.get_temp	= adc_tm5_get_temp,
	.channel_measure = adc_tm_5_channel_measure,
	.disable_chan = adc_tm_5_disable_chan_meas,
	.notify = notify_adc_tm5_fn,
};

const struct adc_tm_data data_adc_tm5 = {
Loading