AnsweredAssumed Answered

how open spidev on imx28 platform?

Question asked by yongki min on Dec 9, 2013
Latest reply on Aug 14, 2014 by Monica CHIOSA

Hi I developing on imx28 platform. I'm using ltib version is L2.6.35_10.12.01.

I did my effort to open spidev I did study on this community. But in my case not opened.

 

I did

  1. I modify the name to spidev my code mx28evk.c in /arch/arm/mach-mx28 directory
    static struct spi_board_info spi_board_info[] __initdata = {
    #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
      {
      /* the modalias must be the same as spi device driver name */
      .modalias = "spidev", /* Name of spi_driver for this device */
      .max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */

      .bus_num = 1, /* Framework bus number */
      .chip_select = 0, /* Framework chip select. */
      .platform_data = &mx28_spi_flash_data,
      },
    #endif
    };

  2. configuration of spi is
    ./config/platform/imx/imx28evk_defconfig.dev:1053:CONFIG_SPI_SPIDEV=m
  3. in terminal of my device
    root@freescale /module_test$ cat /sys/bus/spi/devices/spi1.0/modalias
    spidev

  4. my application try open "/dev/spidev1.0"
    error return is can't open spidev device,(-1),(No such file or directory)

Who can tell me how open it?

Outcomes