简体   繁体   中英

Testing Linux kernel drivers

i am newbie to linux kernel and all, is there any way to check the entry points of linux kernel drivers from command line? say for leds-lp5523?

i have seen t his document says we can run some sample LED patterns by running the echo commands by running

cd /sys/class/leds/lp5523:channel2/device   echo "load" > engine3_mode echo "9d80400004ff05ff437f0000" > engine3_load   echo "111111111" > engine3_leds   echo "run" > engine3_mode

But i cant find this /sys/class/leds/lp5523:channel2/device directory in my Ubuntu x86-64 PC. Can anyone help me on this. Thanks in advance..

This file will not be created until you actually have an LP5523 connected. I doubt this is the case on your PC as this is an i2c chip.

Else, you found the correct documentation. You can usually find two different interfaces for drivers, either device files (usually found in /dev) that are using the usually syscalls (open, read, write, ioctl) or a sysfs interface (found in /sys), the documentation is then found in Documentation/ABI/ .

The best way to find whch interface the driver is using is still to read the source code for that driver.

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