AnsweredAssumed Answered

How to configure QE port B pins as gpios in p1021

Question asked by Amanaganti VinodKumar on Sep 19, 2015
Latest reply on Sep 21, 2015 by Amanaganti VinodKumar

Hi All,

 

I am working on p1021rdb. I need to configure PB10 as gpio pin, I wrote gpios property as

 

gpios = <&qe_pio_b 42 0>; inside a device node.

then used following functions

of_gpio_count(),

of_get_gpio_flags(),

gpio_request(),

 

Here I am getting error in the of_get_gpio_flags() function call..

When I started debugging the this I came to know that QE gpio controller chip is added to the list of gpio chip controllers with only 32 gpios .

Ddue to this of_gpio_simple_xlate() is throwing error while comparing the below condition

if(gpiospec->args[0] >= gc->ngpio)

return -EINVAL;

 

 

what is the number that should be passed in the device tree to configure PB10 as gpio, is there any document that explains pin numbers and their corresponding gpio numbers in the QE gpio chip controller?

As the driver code supports only 32 gpios at max, how to port map pins? it is not like PA0 pin maps to 0, PB0 maps to 32 ??

 

 

Your help is appreciated.

Outcomes