This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Touchscreen input device not appearing in /dev/input/

Other Parts Discussed in Thread: ADS7846, TSC2046, DA8XX

Dear All,

I trying to enable montavista ads7846 touchscreen driver for Montavista linux (pro 5.0 demo) for OMAP L137.
I compiled kernel with following options in "menuconfig":
"Device Drivers/Input Device Support"
- "Mouse interface": disable
- "Touchscreen interface": enable *
- "Event interface": enable *
- "Touchscreens": enable *
-- "ADS 7846 based touchscreens" : enable *
(ADS7836 chip is compartible with TSC2046).

Also, I changed da8xx_spi_board_info1[] structure in my device specific spi driver "arch/arm/mash-da8xx/spi.c" :
static struct spi_board_info da8xx_spi_board_info1[] = {
    [0] = {
        .modalias = "tsc2046_ts",
        .platform_data = &tsc2046IPWR_place_holder,
        .controller_data = &tsc2046IPWR_spi_cfg,
        .mode = SPI_MODE_0,
        .irq = 0,
        .max_speed_hz = 2 * 1000 * 1000  ,
        .bus_num = 1,
        .chip_select = 2,
    },
};

I supposed that a new device should appear under /dev/input. But there is no neither new device, nor even /dev/input directory.
Though ads7846.c driver is registered in /sys/devices/platform/dm_spi.1/ :

root@192.168.0.4:~# cat /sys/devices/platform/dm_spi.1/spi1.2/modalias
tsc2046_ts.

So, please help me, how to include touchscreen device in /dev/input/ ?

thanks
Eugene Bogdanov

  • This was solved. I found that device modalias in bus driver's table of devices :
    // file (arch/arm/mach-da8xx/spi.c)

    static struct spi_board_info da8xx_spi_board_info1[] = {
        [0] = {
            .modalias = "ads7846" /*was "tsc2046"*/,
            .platform_data = &ads7846_ts_data,
            .controller_data = &ads7846_spi_cfg,
            .mode = SPI_MODE_0,
            .irq = 159,
            .max_speed_hz = 31250*26  ,
            .bus_num = 1,
            .chip_select = 2,
        },
    };

    and driver name should match:
    //file ads7846.c

    static struct spi_driver ads7846_driver = {
        .driver = {
            .name    = "ads7846",
            .bus    = &spi_bus_type,
            .owner    = THIS_MODULE,
        },
        .probe        = ads7846_probe,
        .remove        = __devexit_p(ads7846_remove),
        .suspend    = ads7846_suspend,
        .resume        = ads7846_resume,
    };

    after fields correction,  I receive "/dev/input/event0" node after inserting my ads7846 driver.