1 1
hjoe

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.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1 1