Lines Matching +full:chg +full:- +full:int
1 /* SPDX-License-Identifier: GPL-2.0 */
17 /* Max ADC code represents full-scale range of 1.8V */
35 /* Default decimation - 1024 for rev2, 840 for pmic5 */
48 #define PMI_CHG_SCALE_1 -138890
69 * struct vadc_linear_graph - Represent ADC characteristics.
84 * enum vadc_scale_fn_type - Scaling function to convert ADC code to
91 * SCALE_PMI_CHG_TEMP: Conversion for PMI CHG temp
131 unsigned int *decimation;
132 unsigned int *hw_settle_1;
133 unsigned int *hw_settle_2;
136 int qcom_vadc_scale(enum vadc_scale_fn_type scaletype,
140 u16 adc_code, int *result_mdec);
143 int (*scale_fn)(const struct u32_fract *prescale,
144 const struct adc5_data *data, u16 adc_code, int *result);
147 int qcom_adc5_hw_scale(enum vadc_scale_fn_type scaletype,
148 unsigned int prescale_ratio,
150 u16 adc_code, int *result_mdec);
152 u16 qcom_adc_tm5_temp_volt_scale(unsigned int prescale_ratio,
153 u32 full_scale_code_volt, int temp);
155 u16 qcom_adc_tm5_gen2_temp_res_scale(int temp);
157 int qcom_adc5_prescaling_from_dt(u32 num, u32 den);
159 int qcom_adc5_hw_settle_time_from_dt(u32 value, const unsigned int *hw_settle);
161 int qcom_adc5_avg_samples_from_dt(u32 value);
163 int qcom_adc5_decimation_from_dt(u32 value, const unsigned int *decimation);
165 int qcom_vadc_decimation_from_dt(u32 value);