I'm reading through the Linux Kernel Module programming guide and I am a bit onfused about how device drivers work.
I tried following along and making a basic device driver, which shows up in /proc/devices, which is great. According to the guide, to interface with the driver in Linux, a userspace program can interact with that device's device file in /dev/. Right now though, the module I've written doesn't generate a device file. What manages the generation of new files? Is that something I'm supposed to do in module_init?
And assuming I've gone and gotten a device file made, is interacting with the driver, in say a C++ program, just opening up an fstream and reading or writing that file, or are there specific libraries used to interact with device files in userspace?