Hi, I am an engineering graduate and have been working with microcontrollers for the past 3 years. Recently I had started learning linux programming with gcc for embedded based applications on an ARM based SOC. I now want to learn linux device driver implementation. Are there some good online courses that I can use. What kind of projects can I do for learning purpose.
kernel - Learning Linux driver development with Raspberry Pi - Raspberry Pi Stack Exchange
Linux drivers development
Is it worth learning linux kernel/device drivers?
how difficult it actually is to write a Linux driver?
Videos
It can be hard to learn writing drivers when interfacing with complicated devices and/or complicated buses. Because of that I would recommend either using some simple and well known devices (ignoring existing implementation of their drivers in the kernel) like I²C/SPI devices that are usually used with microcontrollers. For example you could find any device that is "supported" by Arduino community (meaning there is a library/documentation for it) and try using it with RaspberryPi.
If that's not enough or you don't want to buy too much hardware, you can create one yourself. Just get some microcontroller (like atmega or something), create a program for it to become some device and then try interfacing with it using Linux drivers. This way you can easily create programs that will emulate different classes of devices. And since you will write your "firmware" yourself, it will help you debug problems.
You need some microcontroller programming skills for that but it's not hard to learn programming with Arduino and I believe it's useful knowledge for driver programmer anyway.
Personally I would start with a very simple device, such as one or more LEDs connected directly to GPIO pins.
You could either buy a device ready to plug in, or wire your own one.
The reason I would suggest this is that debugging drivers is generally much more difficult then a normal program, therefore a simple challenge to get started is useful, also you can then use that code as a method of debug for more complex devices (status out to a GPIO pin to attach to an oscilloscope) where timing is important.
If it is of interest there is a kernel driver for LedBorg available here, the source should be a reasonably simple example for driving GPIO pins at a regular interval.