This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to identify GPIO no.

Hi

      How can we identify the GPIO number of particular GPIO bank pin. For example GPIO bank(7), pin no 4. I would like to know the gpio no for requesting the status of gpio. I am using gpio_get_value(gpio no) function.

  • Vasu,

    It appears that the gpio_get_value function is a linux function. Am I correct? Please also provide basic information such as device, software version, etc.

    regards,

    Paul

  • The board files (board-da830-evm.c, board-da850-evm.c, etc.) use a macro call GPIO_TO_PIN to map from bank/pin to ordinal pin. In your example, GPIO_TO_PIN(7,4). The macro is defined in the arch/arm/mach-davinci/include/mach/gpio.h. Including linux/gpio.h should eventually include the other gpio.h. All this might not apply to your processor. Check your specific board.c for examples.