|
关于spi ioctr函数问题,求教
发表于 2016-1-20 10:15:13
浏览:7931
|
回复:3
打印
只看该作者
[复制链接]
楼主
现象:
我在spi驱动中的 file_operations s中有如下定义:
static const struct file_operations spidev_fops = {
.owner = THIS_MODULE,
/* REVISIT switch to aio primitives, so that userspace
* gets more complete API coverage. It'll simplify things
* too, except for the locking.
*/
.write = spidev_write,
.read = spidev_read,
.unlocked_ioctl = spidev_ioctl,
.compat_ioctl = spidev_compat_ioctl,
.open = spidev_open,
.release = spidev_release,
.llseek = no_llseek,
};
应用程序中调用:
compat_ioctl(handle_spi1dev, SPI_IOC_WR_BITS_PER_WORD,&cmd)
在编译时出现: linux/spi/spi.h:没有那个文件或目录?
请问,我如何才能调用驱动中定义的compat_ioctl? |
|