Loading drivers/hwmon/qpnp-adc-common.c +2 −2 Original line number Diff line number Diff line /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2019, 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 @@ -1830,7 +1830,7 @@ int32_t qpnp_adc_scale_default(struct qpnp_vadc_chip *vadc, } else { qpnp_adc_scale_with_calib_param(adc_code, adc_properties, chan_properties, &scale_voltage); if (!chan_properties->calib_type == CALIB_ABSOLUTE) if (!(chan_properties->calib_type == CALIB_ABSOLUTE)) scale_voltage *= 1000; } Loading drivers/hwmon/qpnp-adc-voltage.c +8 −8 Original line number Diff line number Diff line /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2019, 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 @@ -521,7 +521,7 @@ static int qpnp_vadc_hc_pre_configure_usb_in(struct qpnp_vadc_chip *vadc, /* Setup dig params for USB_IN_V */ conv.decimation = DECIMATION_TYPE2; conv.cal_val = ADC_HC_ABS_CAL; conv.cal_val = (enum qpnp_adc_cal_val)ADC_HC_ABS_CAL; conv.calib_type = vadc->adc->adc_channels[dt_index].calib_type; qpnp_vadc_hc_update_adc_dig_param(vadc, &conv, &dig_param); Loading Loading @@ -1630,7 +1630,7 @@ int32_t qpnp_vadc_calib_vref(struct qpnp_vadc_chip *vadc, conv.mode_sel = ADC_OP_NORMAL_MODE << QPNP_VADC_OP_MODE_SHIFT; conv.hw_settle_time = ADC_CHANNEL_HW_SETTLE_DELAY_0US; conv.fast_avg_setup = ADC_FAST_AVG_SAMPLE_1; conv.cal_val = calib_type; conv.cal_val = (enum qpnp_adc_cal_val)calib_type; if (vadc->vadc_hc) { rc = qpnp_vadc_hc_configure(vadc, &conv); Loading Loading @@ -1703,7 +1703,7 @@ int32_t qpnp_vadc_calib_gnd(struct qpnp_vadc_chip *vadc, conv.mode_sel = ADC_OP_NORMAL_MODE << QPNP_VADC_OP_MODE_SHIFT; conv.hw_settle_time = ADC_CHANNEL_HW_SETTLE_DELAY_0US; conv.fast_avg_setup = ADC_FAST_AVG_SAMPLE_1; conv.cal_val = calib_type; conv.cal_val = (enum qpnp_adc_cal_val)calib_type; if (vadc->vadc_hc) { rc = qpnp_vadc_hc_configure(vadc, &conv); Loading Loading @@ -1821,10 +1821,10 @@ static int32_t qpnp_vadc_calib_device(struct qpnp_vadc_chip *vadc) (calib_read_1 - calib_read_2); vadc->adc->amux_prop->chan_prop->adc_graph[CALIB_RATIOMETRIC].dx = vadc->adc->adc_prop->adc_vdd_reference; vadc->adc->amux_prop->chan_prop->adc_graph[CALIB_RATIOMETRIC].adc_vref = calib_read_1; vadc->adc->amux_prop->chan_prop->adc_graph[CALIB_RATIOMETRIC].adc_gnd = calib_read_2; vadc->adc->amux_prop->chan_prop->adc_graph[CALIB_RATIOMETRIC].adc_vref = calib_read_1; vadc->adc->amux_prop->chan_prop->adc_graph[CALIB_RATIOMETRIC].adc_gnd = calib_read_2; calib_fail: return rc; Loading Loading
drivers/hwmon/qpnp-adc-common.c +2 −2 Original line number Diff line number Diff line /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2019, 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 @@ -1830,7 +1830,7 @@ int32_t qpnp_adc_scale_default(struct qpnp_vadc_chip *vadc, } else { qpnp_adc_scale_with_calib_param(adc_code, adc_properties, chan_properties, &scale_voltage); if (!chan_properties->calib_type == CALIB_ABSOLUTE) if (!(chan_properties->calib_type == CALIB_ABSOLUTE)) scale_voltage *= 1000; } Loading
drivers/hwmon/qpnp-adc-voltage.c +8 −8 Original line number Diff line number Diff line /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2019, 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 @@ -521,7 +521,7 @@ static int qpnp_vadc_hc_pre_configure_usb_in(struct qpnp_vadc_chip *vadc, /* Setup dig params for USB_IN_V */ conv.decimation = DECIMATION_TYPE2; conv.cal_val = ADC_HC_ABS_CAL; conv.cal_val = (enum qpnp_adc_cal_val)ADC_HC_ABS_CAL; conv.calib_type = vadc->adc->adc_channels[dt_index].calib_type; qpnp_vadc_hc_update_adc_dig_param(vadc, &conv, &dig_param); Loading Loading @@ -1630,7 +1630,7 @@ int32_t qpnp_vadc_calib_vref(struct qpnp_vadc_chip *vadc, conv.mode_sel = ADC_OP_NORMAL_MODE << QPNP_VADC_OP_MODE_SHIFT; conv.hw_settle_time = ADC_CHANNEL_HW_SETTLE_DELAY_0US; conv.fast_avg_setup = ADC_FAST_AVG_SAMPLE_1; conv.cal_val = calib_type; conv.cal_val = (enum qpnp_adc_cal_val)calib_type; if (vadc->vadc_hc) { rc = qpnp_vadc_hc_configure(vadc, &conv); Loading Loading @@ -1703,7 +1703,7 @@ int32_t qpnp_vadc_calib_gnd(struct qpnp_vadc_chip *vadc, conv.mode_sel = ADC_OP_NORMAL_MODE << QPNP_VADC_OP_MODE_SHIFT; conv.hw_settle_time = ADC_CHANNEL_HW_SETTLE_DELAY_0US; conv.fast_avg_setup = ADC_FAST_AVG_SAMPLE_1; conv.cal_val = calib_type; conv.cal_val = (enum qpnp_adc_cal_val)calib_type; if (vadc->vadc_hc) { rc = qpnp_vadc_hc_configure(vadc, &conv); Loading Loading @@ -1821,10 +1821,10 @@ static int32_t qpnp_vadc_calib_device(struct qpnp_vadc_chip *vadc) (calib_read_1 - calib_read_2); vadc->adc->amux_prop->chan_prop->adc_graph[CALIB_RATIOMETRIC].dx = vadc->adc->adc_prop->adc_vdd_reference; vadc->adc->amux_prop->chan_prop->adc_graph[CALIB_RATIOMETRIC].adc_vref = calib_read_1; vadc->adc->amux_prop->chan_prop->adc_graph[CALIB_RATIOMETRIC].adc_gnd = calib_read_2; vadc->adc->amux_prop->chan_prop->adc_graph[CALIB_RATIOMETRIC].adc_vref = calib_read_1; vadc->adc->amux_prop->chan_prop->adc_graph[CALIB_RATIOMETRIC].adc_gnd = calib_read_2; calib_fail: return rc; Loading