irqchip/gicv2/3: add gic_retrigger
[firefly-linux-kernel-4.4.55.git] / drivers / adc / adc_priv.h
index 078bf75dd1b481e6c0860cf958e39f563e0c430f..9a1189226fcef446ad63598926ac4809be184dc6 100755 (executable)
 #include <linux/time.h>\r
 #include <linux/err.h>\r
 #include <linux/io.h>\r
+#include <linux/mutex.h>\r
 #include <linux/clk.h>\r
 #include <linux/workqueue.h>\r
 #include <linux/interrupt.h>\r
 #include <mach/board.h>\r
+#ifdef CONFIG_ADC_RK28\r
+#include "plat/rk28_adc.h"\r
+#endif\r
+#ifdef CONFIG_ADC_RK29\r
+#include "plat/rk29_adc.h"\r
+#endif\r
+#ifdef CONFIG_ADC_RK30\r
+#include "plat/rk30_adc.h"\r
+#endif\r
 \r
 #define ADC_READ_TMO    100 // ms\r
 \r
@@ -53,14 +63,17 @@ struct adc_ops {
 struct adc_host {\r
         struct list_head entry;\r
         struct list_head req_head;\r
+        struct list_head callback_head;\r
         unsigned int is_suspended;\r
         enum host_chn_mask mask;\r
         struct device *dev;\r
         unsigned int chn;\r
         spinlock_t lock;\r
+        struct mutex m_lock;\r
         unsigned int client_count;\r
        const struct adc_ops *ops;\r
-        struct work_struct work;\r
+        struct adc_client *base_client;\r
+        struct adc_platform_data *pdata;\r
         unsigned long priv[0];\r
 };\r
 \r
@@ -68,10 +81,9 @@ static inline void *adc_priv(struct adc_host *adc)
 {\r
        return adc->priv;\r
 }\r
-       \r
+extern struct adc_host *g_adc;\r
 struct adc_host *adc_alloc_host(struct device *dev, int extra, enum host_chn_mask mask);\r
 void adc_free_host(struct adc_host *adc);\r
 void adc_core_irq_handle(struct adc_host *adc);\r
-\r
 #endif\r
 \r