Qualcomm PM8xxx chips, such as PM8058 and PM8921, have 8 channels of PWM, also called LPG (Light Pulse Generator) in HW specs. 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 all APIs listed in <linux/pwm.h> with a small difference. The two parameters (duty_ns and period_ns) in pwm_config() are used as values in microseconds instead of nanoseconds. Otherwise a 32-bit integer can't fit for a range of 7 us to 300+ seconds. Change-Id: Ic8f59e96360ea3dabef591e0b257a4ffe0796d9b Signed-off-by: Willie Ruan <wruan@codeaurora.org>