diff options
| author | Patil, Rachna <rachna@ti.com> | 2012-10-16 03:25:44 -0400 |
|---|---|---|
| committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-11-05 17:50:27 -0500 |
| commit | 2b99bafab19145a72e2c557326fc4662a864a162 (patch) | |
| tree | d70c833c0b64297439f5b44568754e4fcc592d49 /include/linux/mfd | |
| parent | 01636eb970a029897b06fb96026941429212ddd9 (diff) | |
input: TSC: ti_tsc: Convert TSC into a MFDevice
This patch converts touchscreen into a MFD client.
All the register definitions, clock initialization,
etc has been moved to MFD core driver.
Signed-off-by: Patil, Rachna <rachna@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd')
| -rw-r--r-- | include/linux/mfd/ti_am335x_tscadc.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h index b7232b15706..fc18b2ef753 100644 --- a/include/linux/mfd/ti_am335x_tscadc.h +++ b/include/linux/mfd/ti_am335x_tscadc.h | |||
| @@ -47,6 +47,7 @@ | |||
| 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) | 49 | #define STPENB_STEPENB STEPENB(0x1FFFF) |
| 50 | #define STPENB_STEPENB_TC STEPENB(0x1FFF) | ||
| 50 | 51 | ||
| 51 | /* IRQ enable */ | 52 | /* IRQ enable */ |
| 52 | #define IRQENB_HW_PEN BIT(0) | 53 | #define IRQENB_HW_PEN BIT(0) |
| @@ -120,7 +121,11 @@ | |||
| 120 | #define ADC_CLK 3000000 | 121 | #define ADC_CLK 3000000 |
| 121 | #define MAX_CLK_DIV 7 | 122 | #define MAX_CLK_DIV 7 |
| 122 | 123 | ||
| 123 | #define TSCADC_CELLS 0 | 124 | #define TSCADC_CELLS 1 |
| 125 | |||
| 126 | enum tscadc_cells { | ||
| 127 | TSC_CELL, | ||
| 128 | }; | ||
| 124 | 129 | ||
| 125 | struct mfd_tscadc_board { | 130 | struct mfd_tscadc_board { |
| 126 | struct tsc_data *tsc_init; | 131 | struct tsc_data *tsc_init; |
| @@ -132,6 +137,9 @@ struct ti_tscadc_dev { | |||
| 132 | void __iomem *tscadc_base; | 137 | void __iomem *tscadc_base; |
| 133 | int irq; | 138 | int irq; |
| 134 | struct mfd_cell cells[TSCADC_CELLS]; | 139 | struct mfd_cell cells[TSCADC_CELLS]; |
| 140 | |||
| 141 | /* tsc device */ | ||
| 142 | struct titsc *tsc; | ||
| 135 | }; | 143 | }; |
| 136 | 144 | ||
| 137 | #endif | 145 | #endif |
