Re: [PATCH 2/2] pwm: Add GPIO PWM driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Vincent,

On 15-09-2020 16:02, Vincent Whitchurch wrote:
On Thu, Sep 03, 2020 at 11:15:31AM +0200, Olliver Schinagl wrote:
On 14-08-2020 17:55, Vincent Whitchurch wrote:
Add a software PWM which toggles a GPIO from a high-resolution timer.

This will naturally not be as accurate or as efficient as a hardware
PWM, but it is useful in some cases.  I have for example used it for
evaluating LED brightness handling (via leds-pwm) on a board where the
LED was just hooked up to a GPIO, and for a simple verification of the
timer frequency on another platform.

Since high-resolution timers are used, sleeping gpio chips are not
supported and are rejected in the probe function.

Signed-off-by: Vincent Whitchurch <vincent.whitchurch@xxxxxxxx>
---
While preparing this driver for posting, I found a pwm-gpio driver posted to
the lists way back in 2015 by Olliver Schinagl:

   https://lore.kernel.org/linux-pwm/1445895161-2317-8-git-send-email-o.schinagl@xxxxxxxxxxxxx/

Thanks for reminding me there :) As I think I still use this driver, I
don't mind migrating to this one (if merged) but how do you suggests to
proceed with regards to multiple PWM's, as this is how I am using it
currently. E.g. how do we merge them? I'm fine with 'taking the simpler
code method' for a start point, but i guess I solved that part
(somewhat) in 2015 :p

Since this is just a software construct, the simplest way would just be
to create multiple instances in the device tree if you want multiple
PWMs, wouldn't it?

Not entirely, as they are no longer 'logically grouped'?

Olliver



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux