diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2013-12-09 13:23:53 +0100 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2013-12-09 13:23:53 +0100 |
commit | ab4394e2139726bae54941474e3d8d94c6894f99 (patch) | |
tree | 6fe5a9fb92093238c0c2d32489f148f686b17c26 /drivers/mfd/stmpe.c | |
parent | b152ee75889e65175e78fa3e46b45f8468bf9684 (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.
Diffstat (limited to 'drivers/mfd/stmpe.c')
-rw-r--r-- | drivers/mfd/stmpe.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c index 2963689cf45c..0c556fa65dd2 100644 --- a/drivers/mfd/stmpe.c +++ b/drivers/mfd/stmpe.c @@ -350,6 +350,25 @@ static 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 */ @@ -381,6 +400,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, |