Describe the process of writing a character device driver from scratch. What are the essential entry points?