From: Tony O. <to...@gm...> - 2010-02-25 17:58:49
|
Dave, thanks for taking interest in this matter. Regarding your: > It sounds like maybe your probe routine isn't being called. The string > > passed to the driver register MUST exactly match the string in the > > board file. > in board-overo.c I declared .modalias="adc1278". According to the documentation spi-summary this declaration should bind the ADC driver, adc1278.c (which is a copy of ads7846.c to be tweaked later-on), when the initialization code (like scripts in /etc/init.d and rc.d) runs at boot. This should take care of the first problem, the detection problem: the probe routine in adc1278.c should be called. (like the probe routine in ads7846.c was called; that's why I am using 7846 as a working model on how s) See the declaration and registration done in board-overo.c, below: ... #if 1 static struct spi_board_info overo_spi_board_info[] __initdata = { { .modalias = "adc1278", // .modalias = "ads7846", .bus_num = 1, // .chip_select = 1, .chip_select = 0, // .max_speed_hz = 27000000, .max_speed_hz = 1500000, .controller_data = &ads7846_mcspi_config, // .irq = 31, .irq = OMAP_GPIO_IRQ(OVERO_GPIO_PENDOWN), // .platform_data = &ads7846_config, .platform_data = &ad1278_config, }, #endif /* Ion 4.4 change */ #if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \ defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE) { .modalias = "lgphilips_lb035q02_panel-spi", .bus_num = 1, .chip_select = 1, .max_speed_hz = 500000, .mode = SPI_MODE_3, }, #endif }; static int __init overo_spi_init(void) { overo_ads7846_init(); spi_register_board_info(overo_spi_board_info, ARRAY_SIZE(overo_spi_board_info)); return 0; } ... Regarding your: >It also sounds like you aren't updating the modules, which are found > > in /lib/modules/2.6.xx.xx/ (replace 2.6.xx.xx with your kernel > > version). > > > > Since your driver is being compiled as a module, replacing the kernel > > isn't enough. You must update the modules as well. > In the log of the boot file you see messages written by me, like Ion's test 9: SPI clock is enabled here. which is a change I made (a printk(...)) in omap2_mcspi.c. Why would this change be updated and changes I make similarly in ads7846.c aren't? What do I need to do, in commands to update all my changes? Finally for now, regarding the second issue, driver that I am making, adc1278.c, once again, does the controller driver omap2_mcspi.c apply to a 3-wire ADC 1278, or it applies only to 4-wire SPI? Ion A. Beza. On Wed, Feb 24, 2010 at 6:11 PM, Dave Hylands <dhy...@gm...> wrote: > Hi Tony, > > On Wed, Feb 24, 2010 at 4:45 PM, Tony Oxendahl <to...@gm...> wrote: >> Dave, Steve, once again, I am talking about: >> >> 1.) detection of 1278 (like 7846); >> >> 2.) 1278 driver. >> >> Regarding 1.), the messages: >> >> ads7846 spi1.0: touchscreen, irq 274 >> input: ADS7846 Touchscreen as >> /devices/platform/omap2_mcspi.1/spi1.0/input/input0 >> >> don't come from ads7846.c, don't come from a development computer that >> doesn't do the booting, >> because words 'Touchscreen as', 'touchscreen, irq' aren't found. > > That's because the word touchscreen comes in as part of a %s > > i.e. printk( "input: %s as foo\n", argument ); > > where argument points to the string touchscreen. If you're searching > for "touchscreen as" you'll never find it. Try searching for " as ". > > It sounds like maybe your probe routine isn't being called. The string > passed to the driver register MUST exactly match the string in the > board file. > > It also sounds like you aren't updating the modules, which are found > in /lib/modules/2.6.xx.xx/ (replace 2.6.xx.xx with your kernel > version). > > Since your driver is being compiled as a module, replacing the kernel > isn't enough. You must update the modules as well. > > -- > Dave Hylands > Shuswap, BC, Canada > http://www.DaveHylands.com/ > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > |