Loading drivers/hwmon/qpnp-adc-voltage.c +22 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -701,6 +701,8 @@ static int32_t qpnp_vadc_version_check(struct qpnp_vadc_chip *dev) #define QPNP_VBAT_COEFF_48 2190 #define QPNP_VBAT_COEFF_49 4180 #define QPNP_VBAT_COEFF_50 27800000 #define QPNP_VBAT_COEFF_51 5110 #define QPNP_VBAT_COEFF_52 34444000 static int32_t qpnp_ocv_comp(int64_t *result, struct qpnp_vadc_chip *vadc, int64_t die_temp) Loading Loading @@ -873,6 +875,13 @@ static int32_t qpnp_ocv_comp(int64_t *result, break; } break; case QPNP_REV_ID_8909_1_1: switch (vadc->id) { case COMP_ID_SMIC: temp_var = (QPNP_VBAT_COEFF_52); break; } break; default: temp_var = 0; break; Loading Loading @@ -1056,6 +1065,18 @@ static int32_t qpnp_vbat_sns_comp(int64_t *result, break; } break; case QPNP_REV_ID_8909_1_1: switch (vadc->id) { case COMP_ID_SMIC: if (die_temp < 30000) temp_var = (QPNP_VBAT_COEFF_52); else if (die_temp > 30000) temp_var = (((die_temp - 30000) * (-QPNP_VBAT_COEFF_51)) + (QPNP_VBAT_COEFF_52)); break; } break; default: temp_var = 0; break; Loading Loading
drivers/hwmon/qpnp-adc-voltage.c +22 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -701,6 +701,8 @@ static int32_t qpnp_vadc_version_check(struct qpnp_vadc_chip *dev) #define QPNP_VBAT_COEFF_48 2190 #define QPNP_VBAT_COEFF_49 4180 #define QPNP_VBAT_COEFF_50 27800000 #define QPNP_VBAT_COEFF_51 5110 #define QPNP_VBAT_COEFF_52 34444000 static int32_t qpnp_ocv_comp(int64_t *result, struct qpnp_vadc_chip *vadc, int64_t die_temp) Loading Loading @@ -873,6 +875,13 @@ static int32_t qpnp_ocv_comp(int64_t *result, break; } break; case QPNP_REV_ID_8909_1_1: switch (vadc->id) { case COMP_ID_SMIC: temp_var = (QPNP_VBAT_COEFF_52); break; } break; default: temp_var = 0; break; Loading Loading @@ -1056,6 +1065,18 @@ static int32_t qpnp_vbat_sns_comp(int64_t *result, break; } break; case QPNP_REV_ID_8909_1_1: switch (vadc->id) { case COMP_ID_SMIC: if (die_temp < 30000) temp_var = (QPNP_VBAT_COEFF_52); else if (die_temp > 30000) temp_var = (((die_temp - 30000) * (-QPNP_VBAT_COEFF_51)) + (QPNP_VBAT_COEFF_52)); break; } break; default: temp_var = 0; break; Loading