How do I write a driver and how do I find out what kernel API calls do?

From: Yusuf Khan <yusisamerican_at_gmail.com>
Date: Thu, 21 Apr 2022 23:17:55 UTC
Literally just copy paste the title here.

Also where do I get documentation?