.. | .. |
---|
170 | 170 | struct wake_lock wake_lock; |
---|
171 | 171 | struct notifier_block fb_nb; |
---|
172 | 172 | struct timer_list caltimer; |
---|
173 | | - time_t rtc_base; |
---|
| 173 | + time64_t rtc_base; |
---|
174 | 174 | int bat_res; |
---|
175 | 175 | int chrg_status; |
---|
176 | 176 | bool is_initialized; |
---|
.. | .. |
---|
262 | 262 | |
---|
263 | 263 | static u64 get_boot_sec(void) |
---|
264 | 264 | { |
---|
265 | | - struct timespec ts; |
---|
| 265 | + struct timespec64 ts; |
---|
266 | 266 | |
---|
267 | | - get_monotonic_boottime(&ts); |
---|
| 267 | + ktime_get_boottime_ts64(&ts); |
---|
268 | 268 | |
---|
269 | 269 | return ts.tv_sec; |
---|
270 | 270 | } |
---|
.. | .. |
---|
1206 | 1206 | struct rk818_battery *di; |
---|
1207 | 1207 | struct fb_event *evdata = data; |
---|
1208 | 1208 | |
---|
1209 | | - if (event != FB_EARLY_EVENT_BLANK && event != FB_EVENT_BLANK) |
---|
1210 | | - return NOTIFY_OK; |
---|
| 1209 | + if (event != FB_EVENT_BLANK) |
---|
| 1210 | + return NOTIFY_DONE; |
---|
1211 | 1211 | |
---|
1212 | 1212 | di = container_of(nb, struct rk818_battery, fb_nb); |
---|
1213 | 1213 | di->fb_blank = *(int *)evdata->data; |
---|
1214 | 1214 | |
---|
1215 | | - return 0; |
---|
| 1215 | + return NOTIFY_OK; |
---|
1216 | 1216 | } |
---|
1217 | 1217 | |
---|
1218 | 1218 | static int rk818_bat_register_fb_notify(struct rk818_battery *di) |
---|
.. | .. |
---|
1740 | 1740 | di->zero_linek = 1200; |
---|
1741 | 1741 | else |
---|
1742 | 1742 | di->zero_linek = 800; |
---|
1743 | | - DBG("ZERO-new: zero_linek adjust step6...\n"); |
---|
| 1743 | + DBG("ZERO-new: zero_linek adjust step6...\n"); |
---|
1744 | 1744 | } |
---|
1745 | 1745 | } else { |
---|
1746 | 1746 | /* xsoc < 0 */ |
---|
.. | .. |
---|
3127 | 3127 | SAMPLE_RES_DIV1 : SAMPLE_RES_DIV2; |
---|
3128 | 3128 | } |
---|
3129 | 3129 | |
---|
3130 | | -static time_t rk818_get_rtc_sec(void) |
---|
| 3130 | +static time64_t rk818_get_rtc_sec(void) |
---|
3131 | 3131 | { |
---|
3132 | 3132 | int err; |
---|
3133 | 3133 | struct rtc_time tm; |
---|
3134 | | - struct timespec tv = { .tv_nsec = NSEC_PER_SEC >> 1, }; |
---|
3135 | 3134 | struct rtc_device *rtc = rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE); |
---|
3136 | | - time_t sec; |
---|
3137 | 3135 | |
---|
3138 | 3136 | err = rtc_read_time(rtc, &tm); |
---|
3139 | 3137 | if (err) { |
---|
.. | .. |
---|
3147 | 3145 | return 0; |
---|
3148 | 3146 | } |
---|
3149 | 3147 | |
---|
3150 | | - rtc_tm_to_time(&tm, &tv.tv_sec); |
---|
3151 | | - sec = tv.tv_sec; |
---|
3152 | | - |
---|
3153 | | - return sec; |
---|
| 3148 | + return rtc_tm_to_time64(&tm); |
---|
3154 | 3149 | } |
---|
3155 | 3150 | |
---|
3156 | 3151 | static int rk818_bat_rtc_sleep_sec(struct rk818_battery *di) |
---|