diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2013-11-06 09:56:33 +0100 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2013-11-06 09:59:49 +0100 |
commit | 070a7cfa1463b2d97fbc99abb5d5c7010bcc1e44 (patch) | |
tree | 6ebf89035565e7ec22ad57724362e567583ba4e3 /drivers | |
parent | e5cb84471bc3d38ef5d8070abbdf0bc0ceb9d2bf (diff) |
colibri-vf50-ts: Use complete feature table
In order to configure the ADC correctly, a complete feature table
is required. Also note that those features were not set corretly
due to some bugs in mvf_adc which are fixed by commit
e5cb84471bc3d38ef5d8070abbdf0bc0ceb9d2bf
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/touchscreen/colibri-vf50-ts.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/drivers/input/touchscreen/colibri-vf50-ts.c b/drivers/input/touchscreen/colibri-vf50-ts.c index be34e4865225..5b0a796d3f54 100644 --- a/drivers/input/touchscreen/colibri-vf50-ts.c +++ b/drivers/input/touchscreen/colibri-vf50-ts.c @@ -160,13 +160,26 @@ static void adc_ts_work(struct work_struct *ts_work) int val_x, val_y, val_z1, val_z2, val_p = 0; struct adc_feature feature = { - .channel = 0, + .channel = ADC0, .clk_sel = ADCIOC_BUSCLK_SET, .clk_div_num = 1, -// .res_mode = 12, - .ha_sam = 32, - .sam_time = 24, - .hs_oper = ADCIOC_HSOFF_SET + .res_mode = 12, + .sam_time = 6, + .lp_con = ADCIOC_LPOFF_SET, + .hs_oper = ADCIOC_HSOFF_SET, + .vol_ref = ADCIOC_VR_VREF_SET, + .tri_sel = ADCIOC_SOFTTS_SET, + .ha_sel = ADCIOC_HA_SET, + .ha_sam = 8, + .do_ena = ADCIOC_DOEOFF_SET, + .ac_ena = ADCIOC_ADACKENOFF_SET, + .dma_ena = ADCIDC_DMAOFF_SET, + .cc_ena = ADCIOC_CCEOFF_SET, + .compare_func_ena = ADCIOC_ACFEOFF_SET, + .range_ena = ADCIOC_ACRENOFF_SET, + .greater_ena = ADCIOC_ACFGTOFF_SET, + .result0 = 0, + .result1 = 0, }; mvf_adc_initiate(0); |