mtk spi 报错

[    4.055088] <6>.(6)[1:swapper/0]mt-spi 1100a000.spi: cs2 >= max 2
[    4.055882] <6>.(6)[1:swapper/0]mt-spi 1100a000.spi: can't create new device for sunwave-fp

int spi_add_device(struct spi_device *spi)
{
    static DEFINE_MUTEX(spi_add_lock);
    struct spi_master *master = spi->master;
    struct device *dev = master->dev.parent;
    int status;

    /* Chipselects are numbered 0..max; validate. */
    if (spi->chip_select >= master->num_chipselect) {
        dev_err(dev, "cs%d >= max %d\n",
            spi->chip_select,
            master->num_chipselect);
        return -EINVAL;
    }

static void spi_match_master_to_boardinfo(struct spi_master *master,
                struct spi_board_info *bi)
{
    struct spi_device *dev;

    if (master->bus_num != bi->bus_num)
        return;

    dev = spi_new_device(master, bi);
    if (!dev)
        dev_err(master->dev.parent, "can't create new device for %s\n",
            bi->modalias);
}

猜你喜欢

转载自blog.csdn.net/Internet_t/article/details/96101834
MTK
SPI