diff options
| author | Siddartha Mohanadoss <smohanad@codeaurora.org> | 2016-07-15 11:16:42 -0700 |
|---|---|---|
| committer | Siddartha Mohanadoss <smohanad@codeaurora.org> | 2016-07-26 18:18:07 -0700 |
| commit | b1b5d0af4690335d2b440ed83fc0ac04f12f2a5f (patch) | |
| tree | 62cabd2ccb5302ca481f12b04d698e23db85a2ce /include/linux | |
| parent | d1313a37fe6bafccfff7f33d07ebfbdf178c35cf (diff) | |
thermal: qpnp-adc-tm: Update reverse threshold and notification
Add support to scale reverse thresholds on VADC_TM refresh
peripheral for voltage measurements such as vbatt, vph_pwr,
thermistor channels, PMIC die temperature.
VADC_TM refresh uses one interrupt for high and low threshold
notification. Update the sequence to check the respective
sensors status for high/low threshold crossing for the VADC_TM
refresh and notify the clients on a threshold crossing.
Change-Id: I070b537e14b505bc247f2f5e6a0e125f1d0fbb81
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/qpnp/qpnp-adc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/qpnp/qpnp-adc.h b/include/linux/qpnp/qpnp-adc.h index 8d51ddcd4246..af25f0c01369 100644 --- a/include/linux/qpnp/qpnp-adc.h +++ b/include/linux/qpnp/qpnp-adc.h @@ -242,6 +242,7 @@ enum qpnp_iadc_channels { #define QPNP_ADC_HWMON_NAME_LENGTH 64 #define QPNP_MAX_PROP_NAME_LEN 32 #define QPNP_THERMALNODE_NAME_LENGTH 25 +#define QPNP_ADC_1P25_UV 1250000 /* Structure device for qpnp vadc */ struct qpnp_vadc_chip; @@ -950,6 +951,7 @@ enum qpnp_state_request { * @low_temp: Low temperature threshold for which notification is requested. * @high_thr_voltage: High voltage for which notification is requested. * @low_thr_voltage: Low voltage for which notification is requested. + * @adc_tm_hc: Represents the refreshed BTM register design. * @state_request: Enable/disable the corresponding high and low temperature * thresholds. * @timer_interval1: Select polling rate from qpnp_adc_meas_timer_1 type. @@ -972,6 +974,7 @@ struct qpnp_adc_tm_btm_param { int32_t low_thr; int32_t gain_num; int32_t gain_den; + bool adc_tm_hc; enum qpnp_vadc_channels channel; enum qpnp_state_request state_request; enum qpnp_adc_meas_timer_1 timer_interval; |
