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

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

Merge "drivers: hwmon: Fix compilation errors in ADC for kernel 4.9"

parents 6fde3c2d a5f6af2b
Loading
Loading
Loading
Loading
+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
@@ -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;
	}

+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
@@ -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);
@@ -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);
@@ -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);
@@ -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;