11 Replies Latest reply on Apr 7, 2015 7:35 AM by Frederick Blais

    How can I creat a module to control the GPIO in kernel?

    cer1991

      Hi,

      I want to creat a module to control the GPIO in kernel.

      The module has following functions:

      1.when I open the device in userspace,the module will set some GPIO's value 'High'

      2.whne I close the device in userspace,the module will set the same GPIO's value "LOW".

       

      Can anyone tell me how to code it?

       

      I think I should inclued <linux/gpio.h> and some other headers.

      But I can not find some functions which can control GPIO in kernel.

       

      Are there some functions that are similar with "s3c_gpio_cfgpin"  in edison's kernel?

       

      Thank you