summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2013-12-09 13:23:53 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-12-24 01:27:25 +0100
commit76187654774f21989a7dca30e080d683da5a5516 (patch)
treed0f4567e60bc58595aa8bb09ace483f2620a1bd7 /drivers/mfd
parent09a518b93bf7cbe72f3ebf08f5c42ba90388682f (diff)
mfd: stmpe: add ADC block resources
In order to use the auxiliar ADC inputs of STMPE811 devices we need to add resources for the ADC block. Also move the ADC macros from the touchscreen driver to the general header file. We will need them for the ADC driver in future. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 824e28985b9cccb8906500aa20b7c33a95e6608a)
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/stmpe.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index b0c7bcdaf5df..bc261d2b163f 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -464,6 +464,25 @@ static const struct mfd_cell stmpe_ts_cell = {
};
/*
+ * ADC (STMPE811)
+ */
+
+static struct resource stmpe_adc_resources[] = {
+ {
+ .name = "STMPE_ADC",
+ .start = 0,
+ .end = 0,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct mfd_cell stmpe_adc_cell = {
+ .name = "stmpe-adc",
+ .resources = stmpe_adc_resources,
+ .num_resources = ARRAY_SIZE(stmpe_adc_resources),
+};
+
+/*
* STMPE811 or STMPE610
*/
@@ -497,6 +516,11 @@ static struct stmpe_variant_block stmpe811_blocks[] = {
.irq = STMPE811_IRQ_TOUCH_DET,
.block = STMPE_BLOCK_TOUCHSCREEN,
},
+ {
+ .cell = &stmpe_adc_cell,
+ .irq = STMPE811_IRQ_ADC,
+ .block = STMPE_BLOCK_ADC,
+ },
};
static int stmpe811_enable(struct stmpe *stmpe, unsigned int blocks,