summaryrefslogtreecommitdiff
path: root/include/linux/mfd/max77660
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2013-07-01 16:25:07 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 13:32:40 -0700
commitfc4579f0d5da36a087fe45f5472fd7ecf982e083 (patch)
treeb8f589db2e5081f097e58567eb455adafbcaa3e4 /include/linux/mfd/max77660
parent652b5d9bb8e4619d43936388b45d2278ec89b8bd (diff)
iio: staging: adc: max77660: add wakeup support from ADC
During suspend, ADC is put in continuous conversion with proper lower/ higher threshold and when the channel ADC conversion value cross these threshold, it generates interrupt which cause the system to be wakeup. This configuration is platform configuration and only be enabled when proper data is passed from platform. bug 1301017 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/243861 (cherry picked from commit 38c03f0e8520e86bb3e2f34540624a9f7cd41164) Change-Id: Ief7d994bf79beb34efa687866ce9ba210fddd03d Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/251676 Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'include/linux/mfd/max77660')
-rw-r--r--include/linux/mfd/max77660/max77660-core.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/mfd/max77660/max77660-core.h b/include/linux/mfd/max77660/max77660-core.h
index 1cf887596b0e..611e068a2867 100644
--- a/include/linux/mfd/max77660/max77660-core.h
+++ b/include/linux/mfd/max77660/max77660-core.h
@@ -1028,6 +1028,20 @@ struct max77660_charger_platform_data {
};
/*
+ * ADC wakeup property: Wakup the system from suspend when threshold crossed.
+ * @adc_channel_number: ADC channel number for monitoring.
+ * @adc_avg_sample: Average number of ADC samples.
+ * @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 max77660_adc_wakeup_property {
+ int adc_channel_number;
+ int adc_avg_sample;
+ int adc_high_threshold;
+ int adc_low_threshold;
+};
+
+/*
* max77660_adc_platform_data: Platform data for ADC.
* @adc_current_uA: ADC current source in uA.
* @adc_avg_sample: Average ADC sample. 0 Means 1 sample.
@@ -1038,6 +1052,7 @@ struct max77660_adc_platform_data {
int adc_avg_sample;
unsigned adc_ref_enabled:1;
struct iio_map *channel_mapping;
+ struct max77660_adc_wakeup_property *adc_wakeup_data;
};
/*