Commit a08e1a37 authored by Jingoo Han's avatar Jingoo Han Committed by Linus Torvalds

drivers/video/backlight/ltv350qv.c: use usleep_range() instead of msleep() for small sleeps

Since msleep() might not sleep for the desired amount when less than 20ms,
use usleep_range().
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5333e254
...@@ -75,7 +75,7 @@ static int ltv350qv_power_on(struct ltv350qv *lcd) ...@@ -75,7 +75,7 @@ static int ltv350qv_power_on(struct ltv350qv *lcd)
/* Power On Reset Display off State */ /* Power On Reset Display off State */
if (ltv350qv_write_reg(lcd, LTV_PWRCTL1, 0x0000)) if (ltv350qv_write_reg(lcd, LTV_PWRCTL1, 0x0000))
goto err; goto err;
msleep(15); usleep_range(15000, 16000);
/* Power Setting Function 1 */ /* Power Setting Function 1 */
if (ltv350qv_write_reg(lcd, LTV_PWRCTL1, LTV_VCOM_DISABLE)) if (ltv350qv_write_reg(lcd, LTV_PWRCTL1, LTV_VCOM_DISABLE))
...@@ -153,7 +153,7 @@ static int ltv350qv_power_on(struct ltv350qv *lcd) ...@@ -153,7 +153,7 @@ static int ltv350qv_power_on(struct ltv350qv *lcd)
err_power2: err_power2:
err_power1: err_power1:
ltv350qv_write_reg(lcd, LTV_PWRCTL2, 0x0000); ltv350qv_write_reg(lcd, LTV_PWRCTL2, 0x0000);
msleep(1); usleep_range(1000, 1100);
err: err:
ltv350qv_write_reg(lcd, LTV_PWRCTL1, LTV_VCOM_DISABLE); ltv350qv_write_reg(lcd, LTV_PWRCTL1, LTV_VCOM_DISABLE);
return -EIO; return -EIO;
...@@ -175,7 +175,7 @@ static int ltv350qv_power_off(struct ltv350qv *lcd) ...@@ -175,7 +175,7 @@ static int ltv350qv_power_off(struct ltv350qv *lcd)
ret |= ltv350qv_write_reg(lcd, LTV_PWRCTL2, 0x0000); ret |= ltv350qv_write_reg(lcd, LTV_PWRCTL2, 0x0000);
/* Wait at least 1 ms */ /* Wait at least 1 ms */
msleep(1); usleep_range(1000, 1100);
/* Power down setting 2 */ /* Power down setting 2 */
ret |= ltv350qv_write_reg(lcd, LTV_PWRCTL1, LTV_VCOM_DISABLE); ret |= ltv350qv_write_reg(lcd, LTV_PWRCTL1, LTV_VCOM_DISABLE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment