Get the full scoop with a modern book. This is older but has basis.
https://lwn.net/Kernel/LDD3/
I think BeOS had blinky lights. You could write a driver to make the lights go on or off. Doubt it would be that easy in any of today's hardware. More than a few layers to go through.
Steps on making a driver.
One is to look at others work, for example on a NIC. They may have documented that they used this or that to get going. Having the source code of a similar device is MOST helpful. Writing from scratch is very difficult for a newbie. If you have source for some device then you can look at it and use tools to step it through or view errors. The simple changing of a chip model on a very common product is enough to make driver writers go crazy.
I'll say this but you rarely have access to it. If you have design metrics or other inside information about a device that tends to be the most help. In some cases looking at windows drivers or mac drivers helps the author create a driver.
I wish you the best of luck. Some folks seem to do much better at figuring out drivers than others. You may have a knack for it.