diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2013-07-21 13:26:22 +0530 |
---|---|---|
committer | Harry Hong <hhong@nvidia.com> | 2013-12-01 22:12:24 -0800 |
commit | e6e80952aec097507dae95ceb632c299787d9cf1 (patch) | |
tree | dfeaaa2338f9b4b7ccf2020ff7cdffa47113c8b3 /include | |
parent | 7e1310fe604028c838013393bd71361c4c5da9e4 (diff) |
iio: staging: adc: palmas: add support for auto conversion during sleep
Add support of continuous ADC conversion and threshold configuration for
ADC channel so that if the channel data crosses the threshold value, it
can wakeup system from suspend.
bug 1301017
bug 1366274
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/243914
(cherry picked from commit 8cf130a684131e528734c435ed837a297ffb3908)
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/251674
(cherry picked from commit 16c693bf69b1ea0a09731caf0b175b4cb9ddc5e5)
Change-Id: If1ab0753431761918e71623d19aadfd2bb55db08
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/336845
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mfd/palmas.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h index c7cc54bbbf75..9d294ca573ec 100644 --- a/include/linux/mfd/palmas.h +++ b/include/linux/mfd/palmas.h @@ -207,6 +207,18 @@ struct palmas_rtc_platform_data { unsigned charging_current_ua; }; +/* + * ADC wakeup property: Wakup the system from suspend when threshold crossed. + * @adc_channel_number: ADC channel number for monitoring. + * @adc_high_threshold: ADC High raw data for upper threshold to generate int. + * @adc_low_threshold: ADC low raw data for lower threshold to generate int. + */ +struct palmas_adc_wakeup_property { + int adc_channel_number; + int adc_high_threshold; + int adc_low_threshold; +}; + struct palmas_gpadc_platform_data { int ch0_current_uA; /* 0uA, 5uA, 15uA, 20uA */ int ch3_current_uA; /* 0uA, 10uA, 400uA, 800uA */ @@ -214,6 +226,9 @@ struct palmas_gpadc_platform_data { bool extended_delay; struct iio_map *iio_maps; + int auto_conversion_period_ms; + struct palmas_adc_wakeup_property *adc_wakeup1_data; + struct palmas_adc_wakeup_property *adc_wakeup2_data; }; struct palmas_pinctrl_config { |