On Wed, 3 Oct 2012 22:18:43 +0200, Baruch Siach wrote: > > Therefore the whole idea of writing a "generic template kernel driver" > > is doomed to fail, as it is simply not possible. > > To me the significance of this template driver is not as a demonstration of > IO > operations that are, as you correctly point out, subsystem specific. This > driver uses the concepts of file operations and platform driver, I guess, > because they are easy to emulate. But these are only means to demonstrate > common driver programming patterns and mechanisms like interrupt handling, > tasklets, workqueues, completion, etc. Details like DT binding, deprecated > /proc use, as well as some other issues, are fixable in my opinion.
Still it doesn't make this driver really useful as a template. The best templates are quite certainly the existing drivers in drivers/<foo>/, where <foo> in the subsystem you are writing a driver for. Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com _______________________________________________ Celinux-dev mailing list [email protected] https://lists.celinuxforum.org/mailman/listinfo/celinux-dev
