diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2013-09-30 09:33:07 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2013-09-30 09:33:07 +0200 |
commit | 2b3164d35a9eda538e6dc1fcbf3eca5bcc4f526b (patch) | |
tree | 1010eef19ccbf11c9b9bf6a526b531d64c7bc139 /arch | |
parent | 426b5e3157b00f34986116c2dcf93f50ea061565 (diff) |
mvf_adc: Initial touchscreen support
The Vybrid VF50 support 4-wire touchscreens using FETs and
ADC inputs. This drivers extends the ADC driver to deliver
initial support for this interface.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mvf/board-colibri_vf50.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mvf/devices-mvf.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-mvf-adc.c | 13 | ||||
-rwxr-xr-x | arch/arm/plat-mxc/include/mach/devices-common.h | 5 |
4 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-mvf/board-colibri_vf50.c b/arch/arm/mach-mvf/board-colibri_vf50.c index 622aad8bf7aa..de76b3612ce1 100644 --- a/arch/arm/mach-mvf/board-colibri_vf50.c +++ b/arch/arm/mach-mvf/board-colibri_vf50.c @@ -392,6 +392,7 @@ static void __init mvf_init_adc(void) { mvf_add_adc(0); mvf_add_adc(1); + mvf_add_adc_touch(0); } /*! diff --git a/arch/arm/mach-mvf/devices-mvf.h b/arch/arm/mach-mvf/devices-mvf.h index c434834ba0b2..29949074cf44 100644 --- a/arch/arm/mach-mvf/devices-mvf.h +++ b/arch/arm/mach-mvf/devices-mvf.h @@ -148,6 +148,10 @@ extern const struct mvf_adc_data mvfa5_adc_data[] __initconst; #define mvf_add_adc(id) \ mvf_add_adcdev(&mvfa5_adc_data[id]) +extern const struct mvf_adc_touch mvfa5_adc_touch[] __initconst; +#define mvf_add_adc_touch(id) \ + mvf_add_adc_touchdev(&mvfa5_adc_touch[id]) + extern const struct imx_imx2_wdt_data fsl_imx2_wdt_data[] __initconst; #define mvf_add_wdt(id) \ imx_add_imx2_wdt(&fsl_imx2_wdt_data[id]) diff --git a/arch/arm/plat-mxc/devices/platform-mvf-adc.c b/arch/arm/plat-mxc/devices/platform-mvf-adc.c index 029e8e3a39ae..259251c91fb8 100644 --- a/arch/arm/plat-mxc/devices/platform-mvf-adc.c +++ b/arch/arm/plat-mxc/devices/platform-mvf-adc.c @@ -28,6 +28,12 @@ const struct mvf_adc_data mvfa5_adc_data[] __initconst = { mvf_adc_data_entry(MVF, 0, SZ_4K), mvf_adc_data_entry(MVF, 1, SZ_4K), }; + +const struct mvf_adc_touch mvfa5_adc_touch[] __initconst = { + [0] = { + .id = 0 + } +}; #endif struct platform_device *__init mvf_add_adcdev( @@ -49,3 +55,10 @@ struct platform_device *__init mvf_add_adcdev( return imx_add_platform_device("mvf-adc", data->id, res, ARRAY_SIZE(res), NULL, 0); } + +struct platform_device *__init mvf_add_adc_touchdev( + const struct mvf_adc_touch *data) +{ + return imx_add_platform_device("mvf-adc-ts", data->id, NULL, 0, + NULL, 0); +} diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h index 0e2a2a1d13e9..0de55332cff6 100755 --- a/arch/arm/plat-mxc/include/mach/devices-common.h +++ b/arch/arm/plat-mxc/include/mach/devices-common.h @@ -97,6 +97,11 @@ struct mvf_adc_data { }; struct platform_device *__init mvf_add_adcdev( const struct mvf_adc_data *data); +struct mvf_adc_touch { + int id; +}; +struct platform_device *__init mvf_add_adc_touchdev( + const struct mvf_adc_touch *data); struct imx_imxdi_rtc_data { resource_size_t iobase; |