summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatil, Rachna <rachna@ti.com>2013-01-23 22:45:05 -0500
committerSebastian Andrzej Siewior <bigeasy@linutronix.de>2013-06-12 12:03:55 -0400
commitabeccee40320245a2a6a006dc8466a703cbd1d5e (patch)
tree1c6709c2d53fd65f77a226abab9a552e5ce73fb5 /include
parenta9bce1b03c2199e66d36cda8aac675338bc074a7 (diff)
input: ti_am33x_tsc: Step enable bits made configurable
Current code has hard coded value written to step enable bits. Now the bits are updated based on how many steps are needed to be configured got from platform data. The user needs to take care not to exceed the count more than 16. While using ADC and TSC one should take care to set this parameter correctly. Sebastian added the common lock and moved the code, that manipulates the steps, from into the mfd module. Signed-off-by: Patil, Rachna <rachna@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/ti_am335x_tscadc.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
index 8114e4e8b91b..4258627d076a 100644
--- a/include/linux/mfd/ti_am335x_tscadc.h
+++ b/include/linux/mfd/ti_am335x_tscadc.h
@@ -46,8 +46,6 @@
46/* Step Enable */ 46/* Step Enable */
47#define STEPENB_MASK (0x1FFFF << 0) 47#define STEPENB_MASK (0x1FFFF << 0)
48#define STEPENB(val) ((val) << 0) 48#define STEPENB(val) ((val) << 0)
49#define STPENB_STEPENB STEPENB(0x1FFFF)
50#define STPENB_STEPENB_TC STEPENB(0x1FFF)
51 49
52/* IRQ enable */ 50/* IRQ enable */
53#define IRQENB_HW_PEN BIT(0) 51#define IRQENB_HW_PEN BIT(0)
@@ -141,6 +139,8 @@ struct ti_tscadc_dev {
141 void __iomem *tscadc_base; 139 void __iomem *tscadc_base;
142 int irq; 140 int irq;
143 struct mfd_cell cells[TSCADC_CELLS]; 141 struct mfd_cell cells[TSCADC_CELLS];
142 u32 reg_se_cache;
143 spinlock_t reg_lock;
144 144
145 /* tsc device */ 145 /* tsc device */
146 struct titsc *tsc; 146 struct titsc *tsc;
@@ -156,4 +156,8 @@ static inline struct ti_tscadc_dev *ti_tscadc_dev_get(struct platform_device *p)
156 return *tscadc_dev; 156 return *tscadc_dev;
157} 157}
158 158
159void am335x_tsc_se_update(struct ti_tscadc_dev *tsadc);
160void am335x_tsc_se_set(struct ti_tscadc_dev *tsadc, u32 val);
161void am335x_tsc_se_clr(struct ti_tscadc_dev *tsadc, u32 val);
162
159#endif 163#endif