pwm: pwm-qti-lpg: Disable PWM output during probe
Currently, LED breath mode will not run if breath mode is the first LED operation. Disable the PWM output so that when the breath mode request comes from TRI_LED driver, it would be processed properly. Change-Id: I4a6e40e9244890bca359ba4ae706ac3fca8b1331 Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
This commit is contained in:
parent
9f7f9a0412
commit
35b2a64a03
@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "%s: " fmt, __func__
|
||||
@ -2038,6 +2038,14 @@ static int qpnp_lpg_probe(struct platform_device *pdev)
|
||||
for (i = 0; i < chip->num_lpgs; i++) {
|
||||
lpg = &chip->lpgs[i];
|
||||
lpg->output_type = PWM_OUTPUT_FIXED;
|
||||
|
||||
rc = qpnp_lpg_pwm_src_enable(lpg, false);
|
||||
if (rc < 0) {
|
||||
dev_err(chip->dev, "Disable PWM output failed for channel %d, rc=%d\n",
|
||||
lpg->lpg_idx, rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (lpg->enable_pfm) {
|
||||
rc = qpnp_lpg_write(lpg, REG_PWM_FM_MODE,
|
||||
FM_MODE_ENABLE);
|
||||
|
Loading…
Reference in New Issue
Block a user