thermal/drivers/tsens: Drop single-cell code for mdm9607
There is no dtsi file for mdm9607 in the kernel sources. Drop the compatibility with unofficial dtsi and remove support for handling the single-cell calibration data on mdm9607. Cc: Konrad Dybcio <konrad.dybcio@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20230101194034.831222-13-dmitry.baryshkov@linaro.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
This commit is contained in:
parent
913d32e278
commit
51d78b8b1b
1 changed files with 7 additions and 31 deletions
|
@ -267,30 +267,6 @@ static int calibrate_8974(struct tsens_priv *priv)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int calibrate_9607(struct tsens_priv *priv)
|
|
||||||
{
|
|
||||||
u32 p1[5], p2[5];
|
|
||||||
u32 *qfprom_cdata;
|
|
||||||
int mode, ret;
|
|
||||||
|
|
||||||
ret = tsens_calibrate_common(priv);
|
|
||||||
if (!ret)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
qfprom_cdata = (u32 *)qfprom_read(priv->dev, "calib");
|
|
||||||
if (IS_ERR(qfprom_cdata))
|
|
||||||
return PTR_ERR(qfprom_cdata);
|
|
||||||
|
|
||||||
mode = tsens_read_calibration_legacy(priv, &tsens_9607_nvmem,
|
|
||||||
p1, p2,
|
|
||||||
qfprom_cdata, NULL);
|
|
||||||
|
|
||||||
compute_intercept_slope(priv, p1, p2, mode);
|
|
||||||
kfree(qfprom_cdata);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int __init init_8939(struct tsens_priv *priv) {
|
static int __init init_8939(struct tsens_priv *priv) {
|
||||||
priv->sensor[0].slope = 2911;
|
priv->sensor[0].slope = 2911;
|
||||||
priv->sensor[1].slope = 2789;
|
priv->sensor[1].slope = 2789;
|
||||||
|
@ -355,6 +331,12 @@ static const struct reg_field tsens_v0_1_regfields[MAX_REGFIELDS] = {
|
||||||
[TRDY] = REG_FIELD(TM_TRDY_OFF, 0, 0),
|
[TRDY] = REG_FIELD(TM_TRDY_OFF, 0, 0),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct tsens_ops ops_v0_1 = {
|
||||||
|
.init = init_common,
|
||||||
|
.calibrate = tsens_calibrate_common,
|
||||||
|
.get_temp = get_temp_common,
|
||||||
|
};
|
||||||
|
|
||||||
static const struct tsens_ops ops_8916 = {
|
static const struct tsens_ops ops_8916 = {
|
||||||
.init = init_common,
|
.init = init_common,
|
||||||
.calibrate = calibrate_8916,
|
.calibrate = calibrate_8916,
|
||||||
|
@ -398,15 +380,9 @@ struct tsens_plat_data data_8974 = {
|
||||||
.fields = tsens_v0_1_regfields,
|
.fields = tsens_v0_1_regfields,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct tsens_ops ops_9607 = {
|
|
||||||
.init = init_common,
|
|
||||||
.calibrate = calibrate_9607,
|
|
||||||
.get_temp = get_temp_common,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct tsens_plat_data data_9607 = {
|
struct tsens_plat_data data_9607 = {
|
||||||
.num_sensors = 5,
|
.num_sensors = 5,
|
||||||
.ops = &ops_9607,
|
.ops = &ops_v0_1,
|
||||||
.feat = &tsens_v0_1_feat,
|
.feat = &tsens_v0_1_feat,
|
||||||
.fields = tsens_v0_1_regfields,
|
.fields = tsens_v0_1_regfields,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue