mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
pwm: gpio: Add a generic gpio based PWM driver
From: Olliver Schinagl <oliver@schinagl.nl> This patch adds a bit-banging gpio PWM driver. It makes use of hrtimers, to allow nano-second resolution, though it obviously strongly depends on the switching speed of the gpio pins, hrtimer and system load. Each pwm node can have 1 or more "pwm-gpio" entries, which will be treated as pwm's as part of a pwm chip. Change-Id: Idd42bf6d79f8ce52275a15965b02af470f28da7c Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
This commit is contained in:
18
Documentation/devicetree/bindings/pwm/pwm-gpio.txt
Normal file
18
Documentation/devicetree/bindings/pwm/pwm-gpio.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
Generic GPIO bit-banged PWM driver
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "pwm-gpio"
|
||||
- #pwm-cells: should be 3, see pwm.txt in this directory for a general
|
||||
description of the cells format.
|
||||
- pwm-gpios: one or more gpios describing the used gpio, see the gpio
|
||||
bindings for the used gpio driver.
|
||||
|
||||
Example:
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
pwm: pwm@0 {
|
||||
compatible = "pwm-gpio";
|
||||
#pwm-cells = 3;
|
||||
pwm-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>;
|
||||
pwm-gpios = <&pio 7 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
Reference in New Issue
Block a user