What happens when writing to a device driver?For example: echo some text > /proc/device_driverI'm guessing that echo has a write-call that somehow invokes the write-function in the driver. What are the steps from the echo-function to the drivers write function? 
What happens when writing to a device driver?
linux;devices;system calls
As explained in the The Linux Kernel Module Programming Guide (5.2. Read and Write a /proc File), the kernel calls a function associated with the driver during the driver's initialization to read the data from userspace into the kernel.The echo program does not know anything special about the kernel; the kernel does all of the work.Further reading:How to read/write from/to a linux /proc file from kernel space?How to write a kernel module for Linux