From 6e146f5c41da7e9601fe92fb4d06b45431dbf95b Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 27 Jul 2015 12:00:23 +0200 Subject: pwm: Add to device-drivers documentation Add a short introductory text along with API documentation generated from kerneldoc comments for the PWM framework. Signed-off-by: Thierry Reding --- Documentation/DocBook/device-drivers.tmpl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'Documentation') diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index faf09d4a0ea8..172bff8cda79 100644 --- a/Documentation/DocBook/device-drivers.tmpl +++ b/Documentation/DocBook/device-drivers.tmpl @@ -455,4 +455,31 @@ X!Ilib/fonts/fonts.c !Edrivers/hsi/hsi.c + + Pulse-Width Modulation (PWM) + + Pulse-width modulation is a modulation technique primarily used to + control power supplied to electrical devices. + + + The PWM framework provides an abstraction for providers and consumers + of PWM signals. A controller that provides one or more PWM signals is + registered as struct pwm_chip. Providers are + expected to embed this structure in a driver-specific structure. This + structure contains fields that describe a particular chip. + + + A chip exposes one or more PWM signal sources, each of which exposed + as a struct pwm_device. Operations can be + performed on PWM devices to control the period, duty cycle, polarity + and active state of the signal. + + + Note that PWM devices are exclusive resources: they can always only be + used by one consumer at a time. + +!Iinclude/linux/pwm.h +!Edrivers/pwm/core.c + + -- cgit From b0dabcc6f8b7cb08d5c81ecbc642105d67a4c1d2 Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Wed, 5 Aug 2015 23:31:47 -0300 Subject: pwm: Add NXP LPC18xx PWM/SCT DT binding documentation Add the devicetree binding document for NXP LPC18xx PWM/SCT. Signed-off-by: Ariel D'Alessandro Signed-off-by: Thierry Reding --- .../devicetree/bindings/pwm/lpc1850-sct-pwm.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/lpc1850-sct-pwm.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/pwm/lpc1850-sct-pwm.txt b/Documentation/devicetree/bindings/pwm/lpc1850-sct-pwm.txt new file mode 100644 index 000000000000..36e49d4325cd --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/lpc1850-sct-pwm.txt @@ -0,0 +1,20 @@ +* NXP LPC18xx State Configurable Timer - Pulse Width Modulator driver + +Required properties: + - compatible: Should be "nxp,lpc1850-sct-pwm" + - reg: Should contain physical base address and length of pwm registers. + - clocks: Must contain an entry for each entry in clock-names. + See ../clock/clock-bindings.txt for details. + - clock-names: Must include the following entries. + - pwm: PWM operating clock. + - #pwm-cells: Should be 3. See pwm.txt in this directory for the description + of the cells format. + +Example: + pwm: pwm@40000000 { + compatible = "nxp,lpc1850-sct-pwm"; + reg = <0x40000000 0x1000>; + clocks =<&ccu1 CLK_CPU_SCT>; + clock-names = "pwm"; + #pwm-cells = <3>; + }; -- cgit