This is just a basic linux device driver which explains about the GPIO in linux device driver.
Please refer this URL for the complete tutorial of this example source code. https://embetronicx.com/tutorials/linux/device-drivers/gpio-driver-basic-using-raspberry-pi/