The linux sources seem to be organized in a deliberately confusing manner and you need to jump between what seens to be an endless list of directories to gather all the information related to a single topic (such as a driver). The configuration process causes yet more trouble, and along with symbolic links and a wild arrangement of include files, things can get extremely confusing.
My usual method is to use grep and perhaps grep -r to make my way around other peoples source code. For any number of reasons this fails with the linux sources. At the least, it is slow and awkward.
But there are better ways. I have some notes here from years gone by:
The first step is to go to the base directory of whatever linux source snapshot you intend to study and type this command:
ctags -R .This will take a while (given that linux is a bit project) and will produce a file named "tags" in the current directory. There may already be a tags file, but don't let that stop you.
Type Control-] with the cursor on some name, and you will go to where that name is defined.
Type Control-t to return (go back) to whereever you came from.
Just these two commands are enough to change your life!
The above may make a decision for you on which of several definition it goes to. To see a menu of all the possibilities, place the cursor over the thing of interest and type "g]". You then have to type a number and hit return.
This has nothing to do with ctags, it is plain old Vim, but very handy. Put the cursor on a name of interest and hit "*" and you go to the next occurence of that name in the same file.
Kyu / [email protected]