Hi,

I am using C blacklib to handle some i2c and spi devices. Also I have few 
PWM's  P9_14 and 16 let's say.

I learned the hard way that P9_14 and P9_16 are to be    found in 
'48302200'. For P9_14 for example

/sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchipX  



which is a link from

/sys/class/pwm/pwmchip3/ 



became available as pwm0 after echoing 0 to  /sys/class/pwm/pwmchip3/export

as

root@beaglebone:/sys/class/pwm/pwmchip3/pwm0# pwd
/sys/class/pwm/pwmchip3/pwm0
root@beaglebone:/sys/class/pwm/pwmchip3/pwm0# ls -l
total 0
-rw-rw-r-- 1 root pwm 4096 Feb 22 03:14 capture
-rw-rw-r-- 1 root pwm 4096 Feb 22 03:14 duty_cycle
-rw-rw-r-- 1 root pwm 4096 Feb 22 03:14 enable
-rw-rw-r-- 1 root pwm 4096 Feb 22 03:14 period
-rw-rw-r-- 1 root pwm 4096 Feb 22 03:14 polarity
drwxrwxr-x 2 root pwm    0 Feb 22 03:14 power
-rw-rw-r-- 1 root pwm 4096 Feb 22 03:14 uevent
root@beaglebone:/sys/class/pwm/pwmchip3/pwm0# 



The blacklib still doing old slot way of finding out which /sys/... files 
are  matching  for P9_14 pwm, going
from symbolic links to some hardcoded PXY->1,2,3 mapping finally to find 
out the /sys/class/.../pwm/period.. and such...

My question is: 

   How do I determine which X,Y from /sys/class/pwm/pwmchip*X*/pwm*Y*  maps 
to (X,Y) of a pwm pin P*X*_*Y*  

Thank you

 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/d5b9c014-303d-4556-80fb-315feb1ed1c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to