From: tanhua1 Date: Wed, 13 Feb 2019 11:57:37 +0000 (+0800) Subject: modify backlight chip configration for black screen X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=74a0e6c399aefc77efadba0e88f9f703a2e41ab7;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git modify backlight chip configration for black screen Modify Backlight driver PWM hysteresis from 4LSBs to 3LSBs. Fix the backlight can not be turned on after resume. Change-Id: I8cfbc450f9920085ccdd79c42fa949a0369ea99d Signed-off-by: xingbin Reviewed-on: https://gerrit.mot.com/1308605 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- diff --git a/drivers/video/backlight/lm36923.c b/drivers/video/backlight/lm36923.c index 2395472e1b1c..7ce4c37d0b38 100755 --- a/drivers/video/backlight/lm36923.c +++ b/drivers/video/backlight/lm36923.c @@ -256,6 +256,16 @@ static int lm36923_resume(struct lm36923_data *dev_data) pr_err("%s: kzalloc error\n",__func__); return -ENOMEM; } + if(mutex_trylock(&dev_data->lock)==0){ + pr_err("%s: lm36923 dev is busy\n",__func__); + goto exit; + } + ret = backlight_i2c_write(dev_data, LM_PWMCTL_REG, 0xEE); + if(ret < 0) { + pr_err("%s: write new value[0xEE] to reg[0x%x] error\n", __func__, LM_PWMCTL_REG); + } + mutex_unlock(&dev_data->lock); + pr_info("%s:now write mode to %d\n",__func__,dev_data->mode); if(1 == dev_data->mode){ if(mutex_trylock(&dev_data->lock)==0){ @@ -393,6 +403,10 @@ static int lm36923_probe(struct i2c_client *client, if(ret < 0){ pr_err("%s:NR mode:write lm chip MSB error\n",__func__); } + ret = backlight_i2c_write(lm, LM_PWMCTL_REG, 0xEE); + if(ret < 0) { + pr_err("%s: write new value[0xEE] to reg[0x%x] error\n", __func__, LM_PWMCTL_REG); + } mutex_unlock(&lm->lock); } else{