Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

sysfs-gpio: expose pins found in /sys/class/pwm and reconcile with gpio #358

Closed
chmorgan opened this issue Dec 20, 2018 · 10 comments
Closed
Milestone

Comments

@chmorgan
Copy link

I may intend to submit a pull request to add this support but I'm currently using gobot for pwm support.

@maruel
Copy link
Contributor

maruel commented Dec 20, 2018

Can you expand on what you mean exactly?

@chmorgan
Copy link
Author

It looks like hardware PWM support isn't provided via sysfs:

https://github.com/google/periph/blob/master/host/sysfs/gpio.go#L307

@maruel
Copy link
Contributor

maruel commented Dec 20, 2018

Do you ask about using /sys/class/pwm/ or something else?

@chmorgan
Copy link
Author

Hi @maruel, yep, isn't /sys/xxx sysfs or am I confused there?

@maruel
Copy link
Contributor

maruel commented Dec 20, 2018

What kind of board are you looking for to leverage native PWM on?

@chmorgan
Copy link
Author

Hi @maruel, in this csae an Omega2+ board.

I apologize if the support is already present, I combed the codebase, searched etc but I'm still a bit new to sysfs with PWM. I wouldn't want to waste anyones time.

@maruel
Copy link
Contributor

maruel commented Dec 20, 2018

I see http://blog.oddbit.com/2017/09/26/some-notes-on-pwm-on-the-raspberry-pi/

I hadn't realize that newer kernels exposed it. That looks totally doable.

@maruel maruel changed the title Any plans to implement sysfs pwm support? sysfs-gpio: expose pins found in /sys/class/pwm and reconcile with gpio Dec 20, 2018
@maruel
Copy link
Contributor

maruel commented Dec 20, 2018

Independent of Omega or RPi, this is doable, just need someone to add the enumeration and reconciliation with the GPIO pin numbers.

@chmorgan
Copy link
Author

@maruel yep, I was thinking it would be relatively transparent with respect to the hardware itself. I'm not at the point with periph that I could help contributing anything here yet.

@maruel
Copy link
Contributor

maruel commented Sep 20, 2023

Ported to periph/host#40.

@maruel maruel closed this as completed Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants