Skip to content

Commit 24a7dc6

Browse files
lumagjic23
authored andcommitted
iio: adc: qcom-vadc-common: scale adcmap_100k_104ef_104fb
Scale adcmap_100k_104ef_104fb temp values by the factor of 1000 to remove extra multiplication in qcom_vadc_scale_therm(). Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 48d2e2f commit 24a7dc6

File tree

1 file changed

+34
-36
lines changed

1 file changed

+34
-36
lines changed

drivers/iio/adc/qcom-vadc-common.c

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,40 +23,40 @@ struct vadc_map_pt {
2323

2424
/* Voltage to temperature */
2525
static const struct vadc_map_pt adcmap_100k_104ef_104fb[] = {
26-
{1758, -40},
27-
{1742, -35},
28-
{1719, -30},
29-
{1691, -25},
30-
{1654, -20},
31-
{1608, -15},
32-
{1551, -10},
33-
{1483, -5},
34-
{1404, 0},
35-
{1315, 5},
36-
{1218, 10},
37-
{1114, 15},
38-
{1007, 20},
39-
{900, 25},
40-
{795, 30},
41-
{696, 35},
42-
{605, 40},
43-
{522, 45},
44-
{448, 50},
45-
{383, 55},
46-
{327, 60},
47-
{278, 65},
48-
{237, 70},
49-
{202, 75},
50-
{172, 80},
51-
{146, 85},
52-
{125, 90},
53-
{107, 95},
54-
{92, 100},
55-
{79, 105},
56-
{68, 110},
57-
{59, 115},
58-
{51, 120},
59-
{44, 125}
26+
{1758, -40000 },
27+
{1742, -35000 },
28+
{1719, -30000 },
29+
{1691, -25000 },
30+
{1654, -20000 },
31+
{1608, -15000 },
32+
{1551, -10000 },
33+
{1483, -5000 },
34+
{1404, 0 },
35+
{1315, 5000 },
36+
{1218, 10000 },
37+
{1114, 15000 },
38+
{1007, 20000 },
39+
{900, 25000 },
40+
{795, 30000 },
41+
{696, 35000 },
42+
{605, 40000 },
43+
{522, 45000 },
44+
{448, 50000 },
45+
{383, 55000 },
46+
{327, 60000 },
47+
{278, 65000 },
48+
{237, 70000 },
49+
{202, 75000 },
50+
{172, 80000 },
51+
{146, 85000 },
52+
{125, 90000 },
53+
{107, 95000 },
54+
{92, 100000 },
55+
{79, 105000 },
56+
{68, 110000 },
57+
{59, 115000 },
58+
{51, 120000 },
59+
{44, 125000 }
6060
};
6161

6262
/*
@@ -418,8 +418,6 @@ static int qcom_vadc_scale_therm(const struct vadc_linear_graph *calib_graph,
418418
if (ret)
419419
return ret;
420420

421-
*result_mdec *= 1000;
422-
423421
return 0;
424422
}
425423

0 commit comments

Comments
 (0)