pwm: qpnp: Fix qcom HW known issue

Bug: 62311944
Add 1ms delay to fix pwm abnormal HW known issue.
Change-ID: Ied6ca9caf659844655379f0df1b30b5b1c7aea87
Signed-off-by: matt_huang <matt_huang@htc.com>
This commit is contained in:
matt_huang 2017-06-07 18:25:57 +08:00 committed by codeworkx
parent b5207a48fe
commit 82ba692ded

View file

@ -28,6 +28,7 @@
#include <linux/of_address.h>
#include <linux/radix-tree.h>
#include <linux/qpnp/pwm.h>
#include <linux/delay.h>
#define QPNP_LPG_DRIVER_NAME "qcom,qpnp-pwm"
#define QPNP_LPG_CHANNEL_BASE "qpnp-lpg-channel-base"
@ -1119,6 +1120,9 @@ static int qpnp_lpg_configure_lut_state(struct qpnp_pwm_chip *chip,
addr = SPMI_LPG_REG_ADDR(lpg_config->base_addr,
QPNP_ENABLE_CONTROL);
// Add 1mS delay to fix qcom known HW issue
mdelay(1);
if (chip->in_test_mode) {
test_enable = (state == QPNP_LUT_ENABLE) ? 1 : 0;
rc = qpnp_dtest_config(chip, test_enable);