From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Tue, 3 May 2011 05:28:00 -0700 Subject: looking for simple module/driver programming examples in source tree In-Reply-To: References: Message-ID: <20110503122800.GA24483@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Tue, May 03, 2011 at 07:45:54AM -0400, Robert P. J. Day wrote: > once you see that living, breathing example, what more would you > need to know about how to have your module/driver create a simple > read-only proc file? You need to know that if your module/driver ever creates a simple read-only proc file, they will be flamed to a crisp on lkml when they submit it :) Seriously, don't ever create a new proc file, it's not anything anyone should ever be doing anymore. > i'm also interesting in collecting examples of documentation for > basic kernel programming concepts. sometimes, there are excellent > examples in the source Documentation/ directory, sometimes not. The kobject documentation should be good, and there are examples in the samples/ directory in the kernel that should be a great place to start. Also look at drivers/usb/usb-skeleton.c for an example usb driver. It is a bit complex, but then again, it's a real-world one so that's needed in places. hope this helps, greg k-h