On Wed, Sep 27, 2017 at 1:31 PM, Robert Nelson <[email protected]>
wrote:

>
> Don't compare "pwmchipX's" directly, you need to dig into the symlink:
>
> root@beaglebone:/sys/class/pwm# ls -lh
> total 0
> lrwxrwxrwx 1 root root 0 Oct 13 17:14 pwmchip0 ->
> ../../devices/platform/ocp/48300000.epwmss/48300200.pwm/pwm/pwmchip0
> lrwxrwxrwx 1 root root 0 Oct 13 17:14 pwmchip2 ->
> ../../devices/platform/ocp/48300000.epwmss/48300100.ecap/pwm/pwmchip2
> lrwxrwxrwx 1 root root 0 Oct 13 17:14 pwmchip3 ->
> ../../devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip3
> lrwxrwxrwx 1 root root 0 Oct 13 17:14 pwmchip5 ->
> ../../devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip5
> lrwxrwxrwx 1 root root 0 Oct 13 17:14 pwmchip7 ->
> ../../devices/platform/ocp/48304000.epwmss/48304100.ecap/pwm/pwmchip7
>
> https://github.com/RobertCNelson/bb.org-overlays/
> blob/master/examples/cape-unversal-pwm.txt#L3-L9
>
> Regards,
>

So I get what you're saying, and get what the link is stating as well.
However, I'm not seeing how the pwmchipX value is changing at all. More to
the point, I really do not care if the underlying path changes, so long as
I do not have to completely rewrite a library in order to use the sysfs pwm
objects. Moreover, what good is loading a uboot overlay, if that overlay
does not do what it is supposed to do ?  It would be really nice to have
the pwm channels functioning before the OS is loaded.

*Jessie:*
root@wgd:~# ls -lh /sys/class/pwm
total 0
lrwxrwxrwx 1 root pwm 0 Sep 24 19:18 pwmchip0 ->
../../devices/platform/ocp/48300000.epwmss/48300200.pwm/pwm/pwmchip0
lrwxrwxrwx 1 root pwm 0 Sep 24 19:18 pwmchip2 ->
../../devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip2
lrwxrwxrwx 1 root pwm 0 Sep 24 19:18 pwmchip4 ->
../../devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip4

*Stretch:*
root@wgd:~#  ls -lh /sys/class/pwm
total 0
lrwxrwxrwx 1 root pwm 0 Sep 26 21:20 pwmchip0 ->
../../devices/platform/ocp/48300000.epwmss/48300200.pwm/pwm/pwmchip0
lrwxrwxrwx 1 root pwm 0 Sep 26 21:20 pwmchip2 ->
../../devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip2
lrwxrwxrwx 1 root pwm 0 Sep 26 21:20 pwmchip4 ->
../../devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip4

Seriously, I can run a script at boot, then run all the echo's I need in
order to populate the entire pwm subsystem for each "duel channel" pwm chip
I need to use. But it was my hope I did not have to.

With all of that said, this structure is all I care about.
root@wgd:~# uname -r
4.4.68-ti-r111
root@wgd:~# ls /sys/class/pwm/pwmchip*/ |grep pwm
/sys/class/pwm/pwmchip0/:
npwm
pwm0
pwm1
/sys/class/pwm/pwmchip2/:
npwm
pwm0
pwm1
/sys/class/pwm/pwmchip4/:
npwm
pwm0
pwm1

I would like Stretch to be the same at boot, without the need to run a
script if possible. But it's not.

root@wgd:~# uname -r
4.9.50-ti-r61
root@wgd:~# ls /sys/class/pwm/pwmchip*/ |grep pwm
/sys/class/pwm/pwmchip0/:
npwm
pwm0
/sys/class/pwm/pwmchip2/:
npwm
/sys/class/pwm/pwmchip4/:
npwm


Did I miss something in what you were saying ?

-- 
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/CALHSORriCEUtbgw9jExKFeh_ofuvDqEwCyf5Je7So-%2BWoGgcCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to