leds: wled: unlock secure register before writing the AMOLED type

The AMOLED type register is PMIC locked and needs secure access before
being written to. Unlock the register before writing it to.

Change-Id: Ifdc97c887724a2444a720fdc5a335ed007a0d87f
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
This commit is contained in:
Himanshu Aggarwal 2015-06-08 14:07:24 +05:30 committed by Gerrit - the friendly Code Review server
parent 0dcd2def74
commit 7cd2d376e3
1 changed files with 5 additions and 0 deletions

View File

@ -739,6 +739,11 @@ static int qpnp_wled_set_disp(struct qpnp_wled *wled, u16 base_addr)
reg &= QPNP_WLED_DISP_SEL_MASK;
reg |= (wled->disp_type_amoled << QPNP_WLED_DISP_SEL_SHIFT);
rc = qpnp_wled_sec_access(wled, base_addr);
if (rc)
return rc;
rc = qpnp_wled_write_reg(wled, &reg,
QPNP_WLED_DISP_SEL_REG(base_addr));
if (rc)