PWM mappong between gpio# P9/8 rail and pwm/pwmchip#/pwm#

Hi,

Beaglebone black.

Is there a way to find the mapping /association between let’s say

gpio7 <-> P9_42<->` pwnchip0/pwm0 (aka: finding that 0 has to go in /pwmchip0/export)

`

just from the sys/ filesystem by looking a the symlinks and devices,
without consulting the manual ?

I even used the config-pin and I cannot find a way to associate it with the chip#

`
root@s2w10l:/sys/devices/platform/ocp/48300000.epwmss/48300100.ecap/pwm/pwmchip0# config-pin -q P9.42
P9_42 Mode: pwm
root@s2w10l:/sys/devices/platform/ocp/48300000.epwmss/48300100.ecap/pwm/pwmchip0# config-pin -l P9.42
default gpio gpio_pu gpio_pd gpio_input spi_cs spi_sclk uart pwm pru_ecap
root@s2w10l:/sys/devices/platform/ocp/48300000.epwmss/48300100.ecap/pwm/pwmchip0# config-pin -i P9.42
Pin name: P9_42
Function if no cape loaded: gpio
Function if cape loaded: default gpio gpio_pu gpio_pd gpio_input spi_cs spi_sclk uart pwm pru_ecap
Function information: gpio0_7 default gpio0_7 gpio0_7 gpio0_7 gpio0_7 spi1_cs1 spi1_sclk uart3_txd ecap0_in_pwm0_out pru_ecap
Kernel GPIO id: 7
PRU GPIO id: 39

`

Thank you