简体   繁体   中英

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. 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.

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM