In data domenica 25 aprile 2010 04:26:51, Dale Larson ha scritto: : > Fabio Giovagnini wrote: > > I'm working with ADS7843 and I have some troubles to get only the push > > event on the screen. > > If any of you knows a better place where to talk about this argument it > > will be appreciated very much to tell me. > > > > Best regards > > Hi Fabio, > > I've dealt with that chip for our 7760 board. The key is to provide a pen > poll function so pen up can be detected. Here's the way I defined it in the > platform bsp stuff: > > > > #include <linux/spi/spi.h> > #include <linux/spi/ads7846.h> > > > /* SPI devices - Touch Screen */ > > static int ads7843_pendown_state(void) > { > return (ctrl_inb(PGDR) & 0x40) ? 0 : 1; > } Is this the pin where is connected the INT line of the ADS7843?
Thanks > > static struct ads7846_platform_data ads_info = { > .model = 7843, > .x_min = 150, > .x_max = 3830, > .y_min = 190, > .y_max = 3830, > .vref_delay_usecs = 100, > .keep_vref_on = 1, > .x_plate_ohms = 576, > .y_plate_ohms = 366, > .pressure_max = 15000, /* Generally nonsense on the 7843 */ > .debounce_max = 1, > .debounce_rep = 0, > .debounce_tol = (~0), > .get_pendown_state = ads7843_pendown_state, > }; > > static struct spi_board_info jcinap_spi_devices[] = { > { > /* Touchscreen controller */ > .modalias = "ads7846", > .chip_select = 0, > .bus_num = 0, > .max_speed_hz = 1000000, /* 1Mhz */ > .platform_data = &ads_info, > .irq = 11 > }, > }; > > > > In the init code: > > > > /* Register the SPI devices */ > spi_register_board_info(jcinap_spi_devices, > ARRAY_SIZE(jcinap_spi_devices)); > > > > Dale Larson > Johnson Controls, Inc > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-sh" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Fabio Giovagnini Aurion s.r.l. P.I e C.F. 00885711200 Tel. +39.051.594.78.24 Cell. +39.335.83.50.919 _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev