简体   繁体   English

我如何知道设备驱动程序是否在Linux中工作?

[英]How do I know whether a device driver works in Linux?

For a mouse, if I issue the command cat /dev/input/mouse1 and then move the mouse, there will be outputs in the console. 对于鼠标,如果发出命令cat /dev/input/mouse1然后移动鼠标,则控制台中将有输出。 From this I know that the mouse works. 由此我知道鼠标可以工作。

But for the touchpad of my laptop, which is mouse0 , I see no output when I issue /dev/input/mouse0 and touch the pad. 但是对于我的笔记本电脑的触摸板,即mouse0 ,发出/dev/input/mouse0并触摸该板时,看不到任何输出。

Then how do I know whether drivers of devices like my touchpad are really working? 那么我如何知道诸如触摸板之类的设备的驱动程序是否真正起作用? Whether they can really communicate with the operating system? 他们是否真的可以与操作系统通信?

this depends upon how your driver wishes to communicate with the device and provide a response to you. 这取决于您的驾驶员希望如何与设备通信并向您提供响应。

your driver needs to create a procfs or a sysfs interface like your mouse did. 您的驱动程序需要像鼠标一样创建procfssysfs接口。 so if your driver creates such an interface you can surely see but you have to look for them, sometimes they are not easy to find with their terminologies. 因此,如果您的驱动程序创建了这样的界面,您肯定可以看到,但是您必须寻找它们,有时有时很难用它们的术语找到它们。

needless to say, they exist and they are communicating with your OS if they are working, but have they provided a procfs or sysfs interface, that is driver specific and could not be said just right away, some documentation or code would be required. 毋庸置疑,它们存在并且正在与您的OS通信(如果它们正在工作),但是如果它们提供了procfssysfs接口,该接口特定于驱动程序,不能马上说出来,则需要一些文档或代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Linux:我怎么知道导出设备节点的模块? - Linux: how do i know the module that exports a device node? 我如何知道Linux中的下一个设备映射器? - How do I know the next device mapper in Linux? 在 Linux 设备驱动程序函数中,如何知道次要编号或此驱动程序函数已被调用的特定设备? - In Linux device driver function, how to know the minor number or for which particular device this driver function has been invoked? 如何为i2c设备编写新的Linux驱动程序? - How do I write a new Linux driver for an i2c device? 如何知道是否有一个(嵌入式/内核模块)设备驱动程序来控制运行中的Linux上的设备? - How to know if there is a (compiled in/kernel module) device driver controlling a device on a running linux? 我怎么知道linux系统调用是否是线程安全的? - how can i know whether a linux syscall is thread safe? Pci驱动程序如何在Linux中运行 - How Pci driver works in Linux 我如何在Linux虚拟设备驱动程序中检索数据? - How i can retrieve data in my linux virtual device driver? 在Linux设备驱动程序中使用do_mmap() - Use do_mmap() in Linux device driver 如何知道Linux进程是否正在运行 - How to get to know whether the Linux process is running
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM