Jump to content

configuring gpio pins within a driver module


Recommended Posts

I found the CAN device driver sources in  

sun7i_can.c - CAN bus controller driver for sun7i


to configure the gpio pins for the special case of acting as TX and RX for CAN, the following function calls are used:

sw_gpio_setcfg(GPIOA(16), 3); 

I try to use this code to implement the can4linux module an a BananaPi M2-Berry using Armbian stretch but are not able to find any prototype of such a function sw_gpio_setcfg(); nor the definitions of the gpio ports like GPIOA.

What ist the correct way of accessing the gpio ports from within the kernel?

Thanks for helping.


Link to comment
Share on other sites

Armbian Linux community supported weekly builds download

This topic is now closed to further replies.

  • Create New...