Question about ndk and linux kernel (Tiny210)

Jason2382
I have done some research on NDK. 
Can it really  directly translate the c file to be a driver in the kernel
layer???  
In fact, I am doing a project to make a robot using Tiny210.
I need to use the I2C, GPIO and PWM output of the core board.
I need to write the driver for  I2C, GPIO and PWM .
Should I use NDK to compile the driver or I need to access the linux kernel
 
???

I still don't know how to access the GPIO ????
Any one can give me some idea or keywords ???