From: dkl Date: Tue, 12 Aug 2014 03:57:29 +0000 (+0800) Subject: rk818: disable otg and boost when in sleep mode X-Git-Tag: firefly_0821_release~4918 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4ae0521064d4475beba864d0a21e37ace27dc14e;p=firefly-linux-kernel-4.4.55.git rk818: disable otg and boost when in sleep mode --- diff --git a/drivers/mfd/rk818.c b/drivers/mfd/rk818.c index 591ff2f9016e..19f4e9df6f11 100755 --- a/drivers/mfd/rk818.c +++ b/drivers/mfd/rk818.c @@ -1146,6 +1146,16 @@ static int rk818_pre_init(struct rk818 *rk818) /**********************************/ ret = rk818_clear_bits(rk818, RK818_INT_STS_MSK_REG1,(0x3<<5)); //open rtc int when power on ret = rk818_set_bits(rk818, RK818_RTC_INT_REG,(0x1<<3),(0x1<<3)); //open rtc int when power on + + /*****disable otg and boost when in sleep mode****/ + val = rk818_reg_read(rk818, RK818_SLEEP_SET_OFF_REG1); + val |= ((0x1 << 7) | (0x1 << 4)); + ret = rk818_reg_write(rk818, RK818_SLEEP_SET_OFF_REG1, val); + if (ret < 0) { + pr_err("Unable to write RK818_SLEEP_SET_OFF_REG1 reg\n"); + return ret; + } + return 0; }