{
int ret,val;
printk("%s,line=%d\n", __func__,__LINE__);
+ /***********set ILIM ************/
+ val = rk808_reg_read(rk808,RK808_BUCK3_CONFIG_REG);
+ val &= (~(0x7 <<0));
+ val |= (0x2 <<0);
+ ret = rk808_reg_write(rk808,RK808_BUCK3_CONFIG_REG,val);
+ if (ret < 0) {
+ printk(KERN_ERR "Unable to write RK808_BUCK3_CONFIG_REG reg\n");
+ return ret;
+ }
+
+ val = rk808_reg_read(rk808,RK808_BUCK4_CONFIG_REG);
+ val &= (~(0x7 <<0));
+ val |= (0x3 <<0);
+ ret = rk808_reg_write(rk808,RK808_BUCK4_CONFIG_REG,val);
+ if (ret < 0) {
+ printk(KERN_ERR "Unable to write RK808_BUCK4_CONFIG_REG reg\n");
+ return ret;
+ }
+
+ val = rk808_reg_read(rk808,RK808_BOOST_CONFIG_REG);
+ val &= (~(0x7 <<0));
+ val |= (0x1 <<0);
+ ret = rk808_reg_write(rk808,RK808_BOOST_CONFIG_REG,val);
+ if (ret < 0) {
+ printk(KERN_ERR "Unable to write RK808_BOOST_CONFIG_REG reg\n");
+ return ret;
+ }
+ /*****************************************/
+ /***********set buck OTP function************/
+ ret = rk808_reg_write(rk808,0x6f,0x5a);
+ if (ret < 0) {
+ printk(KERN_ERR "Unable to write 0x6f reg\n");
+ return ret;
+ }
+
+ ret = rk808_reg_write(rk808,0x91,0x80);
+ if (ret < 0) {
+ printk(KERN_ERR "Unable to write 0x91 reg\n");
+ return ret;
+ }
+
+ ret = rk808_reg_write(rk808,0x92,0x55);
+ if (ret <0) {
+ printk(KERN_ERR "Unable to write 0x92 reg\n");
+ return ret;
+ }
+ /*****************************************/
/***********set buck 12.5mv/us ************/
val = rk808_reg_read(rk808,RK808_BUCK1_CONFIG_REG);
val &= (~(0x3 <<3));
tm->tm_sec = bcd2bin(rtc_data[0]);
tm->tm_min = bcd2bin(rtc_data[1]);
- tm->tm_hour = bcd2bin(rtc_data[2]) -8;
+ tm->tm_hour = bcd2bin(rtc_data[2]) ;
tm->tm_mday = bcd2bin(rtc_data[3]);
tm->tm_mon = bcd2bin(rtc_data[4]) - 1;
tm->tm_year = bcd2bin(rtc_data[5]) + 100;
printk( "RTC date/time %4d-%02d-%02d(%d) %02d:%02d:%02d\n",
1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday, tm->tm_wday,
- tm->tm_hour+8, tm->tm_min, tm->tm_sec);
+ tm->tm_hour, tm->tm_min, tm->tm_sec);
return ret;
tm->tm_sec = bcd2bin(rtc_data[0]);
tm->tm_min = bcd2bin(rtc_data[1]);
- tm->tm_hour = bcd2bin(rtc_data[2]) - 8;
+ tm->tm_hour = bcd2bin(rtc_data[2]) ;
tm->tm_mday = bcd2bin(rtc_data[3]);
tm->tm_mon = bcd2bin(rtc_data[4]) - 1;
tm->tm_year = bcd2bin(rtc_data[5]) + 100;
tm->tm_wday = bcd2bin(rtc_data[6]);
dev_dbg(dev, "RTC date/time %4d-%02d-%02d(%d) %02d:%02d:%02d\n",
- 1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday, tm->tm_wday,tm->tm_hour + 8, tm->tm_min, tm->tm_sec);
+ 1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday, tm->tm_wday,tm->tm_hour , tm->tm_min, tm->tm_sec);
#endif
return 0;
rtc_data[0] = bin2bcd(tm->tm_sec);
rtc_data[1] = bin2bcd(tm->tm_min);
- rtc_data[2] = bin2bcd(tm->tm_hour + 8);
+ rtc_data[2] = bin2bcd(tm->tm_hour );
rtc_data[3] = bin2bcd(tm->tm_mday);
rtc_data[4] = bin2bcd(tm->tm_mon + 1);
rtc_data[5] = bin2bcd(tm->tm_year - 100);
rtc_data[6] = bin2bcd(tm->tm_wday);
dev_dbg(dev, "set RTC date/time %4d-%02d-%02d(%d) %02d:%02d:%02d\n",
- 1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday, tm->tm_wday,tm->tm_hour + 8, tm->tm_min, tm->tm_sec);
+ 1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday, tm->tm_wday,tm->tm_hour , tm->tm_min, tm->tm_sec);
/*Dummy read*/
ret = rk808_reg_read(rk808, RK808_RTC_CTRL_REG);
/* some of these fields may be wildcard/"match all" */
alrm->time.tm_sec = bcd2bin(alrm_data[0]);
alrm->time.tm_min = bcd2bin(alrm_data[1]);
- alrm->time.tm_hour = bcd2bin(alrm_data[2]) -8;
+ alrm->time.tm_hour = bcd2bin(alrm_data[2]);
alrm->time.tm_mday = bcd2bin(alrm_data[3]);
alrm->time.tm_mon = bcd2bin(alrm_data[4]) - 1;
alrm->time.tm_year = bcd2bin(alrm_data[5]) + 100;
return ret;
}
dev_dbg(dev,"alrm read RTC date/time %4d-%02d-%02d(%d) %02d:%02d:%02d\n",
- 1900 + alrm->time.tm_year, alrm->time.tm_mon + 1, alrm->time.tm_mday, alrm->time.tm_wday, alrm->time.tm_hour +8, alrm->time.tm_min, alrm->time.tm_sec);
+ 1900 + alrm->time.tm_year, alrm->time.tm_mon + 1, alrm->time.tm_mday, alrm->time.tm_wday, alrm->time.tm_hour, alrm->time.tm_min, alrm->time.tm_sec);
return ret;
}
- printk("alrm set RTC date/time %4d-%02d-%02d(%d) %02d:%02d:%02d\n",
- 1900 + alrm->time.tm_year, alrm->time.tm_mon + 1, alrm->time.tm_mday, alrm->time.tm_wday, alrm->time.tm_hour +8, alrm->time.tm_min, alrm->time.tm_sec);
+ dev_dbg(dev,"alrm set RTC date/time %4d-%02d-%02d(%d) %02d:%02d:%02d\n",
+ 1900 + alrm->time.tm_year, alrm->time.tm_mon + 1, alrm->time.tm_mday, alrm->time.tm_wday, alrm->time.tm_hour, alrm->time.tm_min, alrm->time.tm_sec);
alrm_data[0] = bin2bcd(alrm->time.tm_sec);
alrm_data[1] = bin2bcd(alrm->time.tm_min);
- alrm_data[2] = bin2bcd(alrm->time.tm_hour + 8);
+ alrm_data[2] = bin2bcd(alrm->time.tm_hour );
alrm_data[3] = bin2bcd(alrm->time.tm_mday);
alrm_data[4] = bin2bcd(alrm->time.tm_mon + 1);
alrm_data[5] = bin2bcd(alrm->time.tm_year - 100);