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

Commit f3c6a856 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hwmon: qpnp-adc: Update temperature to voltage table" into msm-4.9

parents 9223e46e 73f4f4ec
Loading
Loading
Loading
Loading
+99 −99
Original line number Diff line number Diff line
@@ -392,78 +392,78 @@ static const struct qpnp_vadc_map_pt adcmap_qrd_skut1_btm_threshold[] = {

/* Voltage to temperature */
static const struct qpnp_vadc_map_pt adcmap_100k_104ef_104fb[] = {
	{1758,	-40},
	{1742,	-35},
	{1719,	-30},
	{1691,	-25},
	{1654,	-20},
	{1608,	-15},
	{1551,	-10},
	{1483,	-5},
	{1758,	-40000},
	{1742,	-35000},
	{1719,	-30000},
	{1691,	-25000},
	{1654,	-20000},
	{1608,	-15000},
	{1551,	-10000},
	{1483,	-5000},
	{1404,	0},
	{1315,	5},
	{1218,	10},
	{1114,	15},
	{1007,	20},
	{900,	25},
	{795,	30},
	{696,	35},
	{605,	40},
	{522,	45},
	{448,	50},
	{383,	55},
	{327,	60},
	{278,	65},
	{237,	70},
	{202,	75},
	{172,	80},
	{146,	85},
	{125,	90},
	{107,	95},
	{92,	100},
	{79,	105},
	{68,	110},
	{59,	115},
	{51,	120},
	{44,	125}
	{1315,	5000},
	{1218,	10000},
	{1114,	15000},
	{1007,	20000},
	{900,	25000},
	{795,	30000},
	{696,	35000},
	{605,	40000},
	{522,	45000},
	{448,	50000},
	{383,	55000},
	{327,	60000},
	{278,	65000},
	{237,	70000},
	{202,	75000},
	{172,	80000},
	{146,	85000},
	{125,	90000},
	{107,	95000},
	{92,	100000},
	{79,	105000},
	{68,	110000},
	{59,	115000},
	{51,	120000},
	{44,	125000}
};

/* Voltage to temperature */
static const struct qpnp_vadc_map_pt adcmap_150k_104ef_104fb[] = {
	{1738,	-40},
	{1714,	-35},
	{1682,	-30},
	{1641,	-25},
	{1589,	-20},
	{1526,	-15},
	{1451,	-10},
	{1363,	-5},
	{1738,	-40000},
	{1714,	-35000},
	{1682,	-30000},
	{1641,	-25000},
	{1589,	-20000},
	{1526,	-15000},
	{1451,	-10000},
	{1363,	-5000},
	{1266,	0},
	{1159,	5},
	{1048,	10},
	{936,	15},
	{825,	20},
	{720,	25},
	{622,	30},
	{533,	35},
	{454,	40},
	{385,	45},
	{326,	50},
	{275,	55},
	{232,	60},
	{195,	65},
	{165,	70},
	{139,	75},
	{118,	80},
	{100,	85},
	{85,	90},
	{73,	95},
	{62,	100},
	{53,	105},
	{46,	110},
	{40,	115},
	{34,	120},
	{30,	125}
	{1159,	5000},
	{1048,	10000},
	{936,	15000},
	{825,	20000},
	{720,	25000},
	{622,	30000},
	{533,	35000},
	{454,	40000},
	{385,	45000},
	{326,	50000},
	{275,	55000},
	{232,	60000},
	{195,	65000},
	{165,	70000},
	{139,	75000},
	{118,	80000},
	{100,	85000},
	{85,	90000},
	{73,	95000},
	{62,	100000},
	{53,	105000},
	{46,	110000},
	{40,	115000},
	{34,	120000},
	{30,	125000}
};

static const struct qpnp_vadc_map_pt adcmap_smb_batt_therm[] = {
@@ -595,40 +595,40 @@ static const struct qpnp_vadc_map_pt adcmap_ncp03wf683[] = {
 * 1.875V reference.
 */
static const struct qpnp_vadc_map_pt adcmap_100k_104ef_104fb_1875_vref[] = {
	{ 1831,	-40 },
	{ 1814,	-35 },
	{ 1791,	-30 },
	{ 1761,	-25 },
	{ 1723,	-20 },
	{ 1675,	-15 },
	{ 1616,	-10 },
	{ 1545,	-5 },
	{ 1831,	-40000 },
	{ 1814,	-35000 },
	{ 1791,	-30000 },
	{ 1761,	-25000 },
	{ 1723,	-20000 },
	{ 1675,	-15000 },
	{ 1616,	-10000 },
	{ 1545,	-5000 },
	{ 1463,	0 },
	{ 1370,	5 },
	{ 1268,	10 },
	{ 1160,	15 },
	{ 1049,	20 },
	{ 937,	25 },
	{ 828,	30 },
	{ 726,	35 },
	{ 630,	40 },
	{ 544,	45 },
	{ 467,	50 },
	{ 399,	55 },
	{ 340,	60 },
	{ 290,	65 },
	{ 247,	70 },
	{ 209,	75 },
	{ 179,	80 },
	{ 153,	85 },
	{ 130,	90 },
	{ 112,	95 },
	{ 96,	100 },
	{ 82,	105 },
	{ 71,	110 },
	{ 62,	115 },
	{ 53,	120 },
	{ 46,	125 },
	{ 1370,	5000 },
	{ 1268,	10000 },
	{ 1160,	15000 },
	{ 1049,	20000 },
	{ 937,	25000 },
	{ 828,	30000 },
	{ 726,	35000 },
	{ 630,	40000 },
	{ 544,	45000 },
	{ 467,	50000 },
	{ 399,	55000 },
	{ 340,	60000 },
	{ 290,	65000 },
	{ 247,	70000 },
	{ 209,	75000 },
	{ 179,	80000 },
	{ 153,	85000 },
	{ 130,	90000 },
	{ 112,	95000 },
	{ 96,	100000 },
	{ 82,	105000 },
	{ 71,	110000 },
	{ 62,	115000 },
	{ 53,	120000 },
	{ 46,	125000 },
};

static int32_t qpnp_adc_map_voltage_temp(const struct qpnp_vadc_map_pt *pts,