If we write any string to the device file represented by the device and then read that file, we get the string written earlier but reversed (for eg., myDev being our device, echo “hello” >/dev/myDev cat /dev/ myDev would print “olleh”).
In this post, we would be writing a Linux device driver for a hypothetical character device which reverses any string that is given to it.