Commit graph

2 commits

Author SHA1 Message Date
Duy Truong
04e554807c Update copyright to The Linux Foundation
Change-Id: Ibead64ce2e901dede2ddd1b86088b88f2350ce92
Signed-off-by: Duy Truong <dtruong@codeaurora.org>
2013-03-15 17:07:39 -07:00
Willie Ruan
9cda9da6e2 misc: add PWM (Pulse Width Modulation) driver for pmic8058 chip
Qualcomm PM8058 chip has 8 channels of PWM, also called LPG (Light
Pulse Generator). All PWM channels can be used as simple PWM machine
or as a more advanced PWM pattern generator using programmed lookup
table. This patch supports simple PWM machine as a sub device of
pmic8058 core.

To use PWM:
1. #include <linux/pwm.h>
2. #include <linux/pmic8058-pwm.h> only when you want to do the
   configuration by yourself.
3. First call
   * pwm_request() -- to reserve a PWM chanel
4. Call these APIs to configure & start/stop a PWM waveform
   * pwm_config(period, duty) -- to configure a PWM wave
   * pwm_enable() -- to start and enable the PWM output
   * pwm_disable() -- to stop and disable the PWM output
   You can repeat above 3 calls for different PWM waveforms.
5. Last call
   * pwm_free() -- to free the PWM channel

Signed-off-by: Willie Ruan <wruan@quicinc.com>
2013-02-25 11:31:50 -08:00