sd8563_timer_acts.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. /*
  2. * Copyright (c) 2024 Wingcool Technology Co., Ltd
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /**
  7. * @file
  8. * @brief SD8563 Timer driver for Actions SoC
  9. */
  10. #include <errno.h>
  11. #include <kernel.h>
  12. #include <string.h>
  13. //#include <stdbool.h>
  14. #include <init.h>
  15. #include <irq.h>
  16. #include <drivers/adc.h>
  17. #include <drivers/input/input_dev.h>
  18. #include <sys/util.h>
  19. #include <sys/byteorder.h>
  20. #include <board.h>
  21. #include <soc_pmu.h>
  22. #include <logging/log.h>
  23. #include <device.h>
  24. #include <drivers/gpio.h>
  25. #include <soc.h>
  26. #include <string.h>
  27. #include <drivers/i2c.h>
  28. //#include <board_cfg.h>
  29. #include <drivers/uart.h>
  30. LOG_MODULE_REGISTER(sd8563, CONFIG_SYS_LOG_INPUT_DEV_LEVEL);
  31. #define rtc_slaver_addr (0xA2 >> 1)// 0x51
  32. //#ifndef CONFIG_MERGE_WORK_Q
  33. //#define CONFIG_USED_TP_WORK_QUEUE 0
  34. //#endif
  35. #ifdef CONFIG_USED_TP_WORK_QUEUE
  36. #define CONFIG_TIMER_WORK_Q_STACK_SIZE 1280
  37. struct k_work_q timer_drv_q;
  38. K_THREAD_STACK_DEFINE(timer_work_q_stack, CONFIG_TIMER_WORK_Q_STACK_SIZE);
  39. #endif
  40. struct acts_timer_data {
  41. input_notify_t notify;
  42. const struct device *i2c_dev;
  43. const struct device *gpio_dev;
  44. const struct device *this_dev;
  45. struct gpio_callback key_gpio_cb;
  46. struct k_work init_timer;
  47. bool inited;
  48. #ifdef CONFIG_PM_DEVICE
  49. uint32_t pm_state;
  50. #endif
  51. };
  52. uint16_t timer_crc[2] __attribute((used)) = {0};
  53. uint8_t read_time_data[7] = {0};
  54. static struct acts_timer_data timer_acts_ddata;
  55. static int _sd8563_close_write_protection(const struct device *i2c_dev);
  56. static void _sd8563_open_write_protection(const struct device *i2c_dev);
  57. static void _sd8563_read_time(const struct device *i2c_dev, bool is_uart_send);
  58. static void _sd8563_set_time(const struct device *i2c_dev,
  59. uint8_t set_hour,
  60. uint8_t set_minute,
  61. uint8_t set_week,
  62. uint16_t set_year,
  63. uint8_t set_month,
  64. uint8_t set_day);
  65. extern void uart2_poll_out_ch(int c);
  66. extern uint8_t bySetHour;
  67. extern uint8_t bySetMinute;
  68. extern uint8_t bySetWeekday;
  69. extern uint16_t wSetYear;
  70. extern uint8_t bySetMonth;
  71. extern uint8_t bySetDay;
  72. extern uint8_t bySetTimeStep;
  73. #include <drivers/hrtimer.h>
  74. #if 1
  75. static struct hrtimer g_rtc_ht_read;
  76. static void timer_acts_handler(struct k_work *work)
  77. {
  78. static struct acts_timer_data *external_rtc = &timer_acts_ddata;
  79. if (((bySetHour != 0xff) || (wSetYear != 0xff))
  80. && ((bySetTimeStep == 0) || (bySetTimeStep == 2))
  81. )
  82. {
  83. hrtimer_stop(&g_rtc_ht_read);
  84. if (_sd8563_close_write_protection(external_rtc->i2c_dev) == 1)
  85. {
  86. _sd8563_set_time(external_rtc->i2c_dev, bySetHour, bySetMinute, bySetWeekday, wSetYear, bySetMonth, bySetDay);
  87. _sd8563_open_write_protection(external_rtc->i2c_dev);
  88. }
  89. k_msleep(100);
  90. _sd8563_read_time(external_rtc->i2c_dev, false); //读一次,避免用户在设置后再次快速进入设置界面时数据不正确
  91. hrtimer_restart(&g_rtc_ht_read);
  92. bySetHour = 0xff;
  93. bySetMinute = 0xff;
  94. bySetWeekday = 0xff;
  95. wSetYear = 0xff;
  96. bySetMonth = 0xff;
  97. bySetDay = 0xff;
  98. if (bySetTimeStep)
  99. {
  100. bySetTimeStep = 3; //设置完成
  101. }
  102. return;
  103. }
  104. _sd8563_read_time(external_rtc->i2c_dev, true); //不在ISR中完成,防止中断嵌套
  105. }
  106. K_WORK_DEFINE(timer_acts, timer_acts_handler);
  107. static void htimer_fun(struct hrtimer *ttimer, void *expiry_fn_arg)
  108. {
  109. //static int t;
  110. //static struct acts_timer_data *external_rtc = &timer_acts_ddata;
  111. //printk("%d ---htimer--\n", t++);
  112. //_sd8563_read_time(external_rtc->i2c_dev, true); //不在ISR中完成,防止中断嵌套
  113. k_work_submit(&timer_acts); //向系统工作队列提交一个工作项,让工作队列的线程将执行该工作
  114. }
  115. static void htimer_read(unsigned int ms)
  116. {
  117. hrtimer_init(&g_rtc_ht_read, htimer_fun, NULL);
  118. hrtimer_start(&g_rtc_ht_read, 1000*ms, 1000*ms);
  119. }
  120. #endif
  121. static void _sd8563_open_write_protection(const struct device *i2c_dev)
  122. {
  123. #if 1
  124. uint8_t write_cmd[2] = {0};
  125. uint8_t read_cmd[7] = {0};
  126. int ret = 0;
  127. printk("_sd8563_read_write_protection\n");
  128. ret = i2c_write_read(i2c_dev, rtc_slaver_addr, write_cmd, 1, read_cmd, 1);
  129. if (ret != 0)
  130. {
  131. printk("i2c_write_read ERR\n");
  132. }
  133. printk("CTR1 = %d\n", read_cmd[0]);
  134. if (read_cmd[0] & 0x40) //bit6:WRTC=1,write_protection has been opened
  135. {
  136. printk("write_protection has been opened\n");
  137. return;
  138. }
  139. //open_write_protection: 0E寄存器的bit6~bit2依次写入b0000、b10101、b01010、b10111
  140. write_cmd[0] = 0x0E;
  141. ret = i2c_write_read(i2c_dev, rtc_slaver_addr, write_cmd, 1, read_cmd, 1);
  142. if (ret != 0)
  143. {
  144. printk("i2c_write_read ERR\n");
  145. }
  146. read_cmd[0] = (read_cmd[0] & 0x83);
  147. //bit6~bit2 write b0000
  148. write_cmd[1] = read_cmd[0];
  149. ret = i2c_write(i2c_dev, write_cmd, 2, rtc_slaver_addr);
  150. if (ret != 0)
  151. {
  152. printk("step1 i2c write ERR\n");
  153. return;
  154. }
  155. //bit6~bit2 write b10101
  156. write_cmd[1] = read_cmd[0] | 0x54;
  157. ret = i2c_write(i2c_dev, write_cmd, 2, rtc_slaver_addr);
  158. if (ret != 0)
  159. {
  160. printk("step2 i2c write ERR\n");
  161. return;
  162. }
  163. //bit6~bit2 write b01010
  164. write_cmd[1] = read_cmd[0] | 0x28;
  165. ret = i2c_write(i2c_dev, write_cmd, 2, rtc_slaver_addr);
  166. if (ret != 0)
  167. {
  168. printk("step3 i2c write ERR\n");
  169. return;
  170. }
  171. //bit6~bit2 write b10111
  172. write_cmd[1] = read_cmd[0] | 0x5C;
  173. ret = i2c_write(i2c_dev, write_cmd, 2, rtc_slaver_addr);
  174. if (ret != 0)
  175. {
  176. printk("step4 i2c write ERR\n");
  177. return;
  178. }
  179. k_msleep(1);
  180. write_cmd[0] = 0; //CTR1
  181. ret = i2c_write_read(i2c_dev, rtc_slaver_addr, write_cmd, 1, read_cmd, 1);
  182. if (ret != 0)
  183. {
  184. printk("i2c_write_read ERR\n");
  185. }
  186. printk("CTR1 = %d\n", read_cmd[0]);
  187. if (read_cmd[0] & 0x40) //bit6:WRTC=1,write_protection has been opened
  188. {
  189. printk("write_protection has been opened\n");
  190. }
  191. printk("_sd8563_open_write_protection exit\n");
  192. #endif
  193. }
  194. static int _sd8563_close_write_protection(const struct device *i2c_dev)
  195. {
  196. #if 1
  197. uint8_t write_cmd[2] = {0};
  198. uint8_t read_cmd[7] = {0};
  199. int ret = 0;
  200. printk("_sd8563_read_write_protection\n");
  201. ret = i2c_write_read(i2c_dev, rtc_slaver_addr, write_cmd, 1, read_cmd, 1);
  202. if (ret != 0)
  203. {
  204. printk("i2c_write_read ERR\n");
  205. return 0;
  206. }
  207. printk("CTR1 = %d\n", read_cmd[0]);
  208. if ((read_cmd[0] & 0x40) == 0) //bit6:WRTC = 0,write_protection has been closed
  209. {
  210. printk("write_protection has been closed\n");
  211. return 1;
  212. }
  213. //close_write_protection: 0E寄存器的bit6~bit2依次写入b0000、b11100、b00011、b01110
  214. write_cmd[0] = 0x0E;
  215. ret = i2c_write_read(i2c_dev, rtc_slaver_addr, write_cmd, 1, read_cmd, 1);
  216. if (ret != 0)
  217. {
  218. printk("i2c_write_read ERR\n");
  219. return 0;
  220. }
  221. read_cmd[0] = (read_cmd[0] & 0x83);
  222. //bit6~bit2 write b0000
  223. write_cmd[1] = read_cmd[0];
  224. ret = i2c_write(i2c_dev, write_cmd, 2, rtc_slaver_addr);
  225. if (ret != 0)
  226. {
  227. printk("step1 i2c write ERR\n");
  228. return 0;
  229. }
  230. //bit6~bit2 write b11100
  231. write_cmd[1] = read_cmd[0] | 0x70;
  232. ret = i2c_write(i2c_dev, write_cmd, 2, rtc_slaver_addr);
  233. if (ret != 0)
  234. {
  235. printk("step2 i2c write ERR\n");
  236. return 0;
  237. }
  238. //bit6~bit2 write b00011
  239. write_cmd[1] = read_cmd[0] | 0x0C;
  240. ret = i2c_write(i2c_dev, write_cmd, 2, rtc_slaver_addr);
  241. if (ret != 0)
  242. {
  243. printk("step3 i2c write ERR\n");
  244. return 0;
  245. }
  246. //bit6~bit2 write b01110
  247. write_cmd[1] = read_cmd[0] | 0x38;
  248. ret = i2c_write(i2c_dev, write_cmd, 2, rtc_slaver_addr);
  249. if (ret != 0)
  250. {
  251. printk("step4 i2c write ERR\n");
  252. return 0;
  253. }
  254. k_msleep(1);
  255. write_cmd[0] = 0; //CTR1
  256. ret = i2c_write_read(i2c_dev, rtc_slaver_addr, write_cmd, 1, read_cmd, 1);
  257. if (ret != 0)
  258. {
  259. printk("i2c_write_read ERR\n");
  260. return 0;
  261. }
  262. printk("CTR1 = %d\n", read_cmd[0]);
  263. if ((read_cmd[0] & 0x40) == 0) //bit6:WRTC = 0,write_protection has been closed
  264. {
  265. printk("write_protection has been closed\n");
  266. return 1;
  267. }
  268. printk("_sd8563_close_write_protection exit\n");
  269. return 0;
  270. #else
  271. return 1;
  272. #endif
  273. }
  274. static void _sd8563_set_time(const struct device *i2c_dev,
  275. uint8_t set_hour,
  276. uint8_t set_minute,
  277. uint8_t set_week,
  278. uint16_t set_year,
  279. uint8_t set_month,
  280. uint8_t set_day)
  281. {
  282. #if 1
  283. uint8_t write_cmd[8] = {0};
  284. uint8_t read_cmd[7] = {0};
  285. bool power_on_set_time_data = false;
  286. int ret = 0;
  287. printk("_sd8563_set_time start\n");
  288. write_cmd[0] = 0x02; //sec
  289. ret = i2c_write_read(i2c_dev, rtc_slaver_addr, write_cmd, 1, read_cmd, 1);
  290. if (ret != 0)
  291. {
  292. printk("i2c_write_read ERR\n");
  293. return;
  294. }
  295. if ((set_hour == 0xFF) && (set_year == 0xFF)) //power on
  296. {
  297. printk("read_cmd[0] = %d\n", read_cmd[0]);
  298. if ((read_cmd[0] & 0x80) == 0) //bit7:0SF/
  299. {
  300. printk("bit7:0SF is 0,The time has been set\n");
  301. return;
  302. }
  303. power_on_set_time_data = true;
  304. }
  305. _sd8563_read_time(i2c_dev, false); //read time
  306. //printk("y:%x, mon:%x, week:%x, d:%x, h:%x, min:%x, sec:%x\n",
  307. // read_time_data[6], read_time_data[5], read_time_data[4], read_time_data[3], read_time_data[2], read_time_data[1], read_time_data[0]);
  308. if(set_hour != 0xFF)
  309. {
  310. read_time_data[0] = 0;
  311. set_minute = (set_minute / 10) * 16 + set_minute % 10; //DEC TO BCD CODE
  312. set_hour = (set_hour / 10) * 16 + set_hour % 10; //DEC TO BCD CODE
  313. read_time_data[1] = set_minute;//(set_minute / 10) * 16 + set_minute % 10; //DEC TO BCD CODE
  314. read_time_data[2] = set_hour;//(set_hour / 10) * 16 + set_hour % 10; //DEC TO BCD CODE
  315. read_time_data[4] = set_week % 7;//0:Sun. 1:Mon. 2:Tue. 3:Wed. 4:Thu. 5:Fri. 6:Sat.
  316. }
  317. if (set_year != 0xFF)
  318. {
  319. if (set_year >= 2000)
  320. {
  321. set_year = set_year - 2000;
  322. }
  323. set_day = (set_day / 10) * 16 + set_day % 10; //DEC TO BCD CODE
  324. set_month = (set_month / 10) * 16 + set_month % 10; //DEC TO BCD CODE
  325. set_year = (set_year / 10) * 16 + set_year % 10; //DEC TO BCD CODE
  326. read_time_data[3] = set_day;//(set_day / 10) * 16 + set_day % 10; //DEC TO BCD CODE
  327. read_time_data[5] = set_month;//(set_month / 10) * 16 + set_month % 10; //DEC TO BCD CODE
  328. read_time_data[6] = set_year;//(set_year / 10) * 16 + set_year % 10; //DEC TO BCD CODE
  329. }
  330. if (power_on_set_time_data == true)
  331. {
  332. //BCD code
  333. write_cmd[1] = 0; //sec
  334. write_cmd[2] = 0x35; //min
  335. write_cmd[3] = 0x11; //hour
  336. write_cmd[4] = 0x12; //day
  337. write_cmd[5] = 0x06; //week
  338. write_cmd[6] = 0x10; //mon
  339. write_cmd[7] = 0x24; //year
  340. printk("power on set time and date\n");
  341. }
  342. else
  343. {
  344. //BCD code
  345. for (uint8_t i = 0; i < 7; i++)
  346. {
  347. write_cmd[i + 1] = read_time_data[i];//(read_time_data[i] / 10) * 16 + read_time_data[i] % 10; //DEC TO BCD CODE
  348. }
  349. //write_cmd[1] = read_time_data[0]; //sec
  350. //write_cmd[2] = read_time_data[1]; //min
  351. //write_cmd[3] = read_time_data[2]; //hour
  352. //write_cmd[4] = read_time_data[3]; //day
  353. //write_cmd[5] = read_time_data[4]; //week
  354. //write_cmd[6] = read_time_data[5]; //mon
  355. //write_cmd[7] = read_time_data[6]; //year
  356. }
  357. ret = i2c_write(i2c_dev, write_cmd, 8, rtc_slaver_addr);
  358. if (ret != 0)
  359. {
  360. printk("i2c write ERR\n");
  361. return;
  362. }
  363. k_msleep(1);
  364. ret = i2c_write_read(i2c_dev, rtc_slaver_addr, write_cmd, 1, read_cmd, 7);
  365. if (ret != 0)
  366. {
  367. printk("i2c_write_read ERR\n");
  368. return;
  369. }
  370. printk("y:%x, mon:%x, week:%x, d:%x, h:%x, min:%x, sec:%x\n",
  371. read_cmd[6], read_cmd[5], read_cmd[4], read_cmd[3], read_cmd[2], read_cmd[1], read_cmd[0]);
  372. printk("_sd8563_set_time exit\n");
  373. #endif
  374. }
  375. static void _sd8563_read_time(const struct device *i2c_dev, bool is_uart_send)
  376. {
  377. #if 1
  378. uint8_t i, check_sum = 0x52;
  379. uint8_t write_cmd[1] = {0x02};
  380. //static uint8_t read_time_data[7] = {0};
  381. int ret = 0;
  382. //printk("_sd8563_read_time\n");
  383. ret = i2c_write_read(i2c_dev, rtc_slaver_addr, write_cmd, 1, read_time_data, 7);
  384. //ret = i2c_burst_read(i2c_dev, rtc_slaver_addr, 0x02, read_cmd, 3);
  385. //ret = i2c_read(i2c_dev, read_time_data, 7, rtc_slaver_addr);
  386. if (ret != 0)
  387. {
  388. printk("i2c_write_read ERR\n");
  389. }
  390. read_time_data[0] = read_time_data[0] & 0x7F; //bit7:0SF/
  391. read_time_data[5] = read_time_data[5] & 0x7F; //bit7:C/century
  392. if (is_uart_send == false)
  393. {
  394. return;
  395. }
  396. //uart2 send data start ==============================================//
  397. uart2_poll_out_ch(0x5A); //报文表头
  398. uart2_poll_out_ch(0x54);
  399. for (i = 0; i < 7; i++)
  400. {
  401. read_time_data[i] = (read_time_data[i] / 16) * 10 + read_time_data[i] % 16; //DEC TO BCD CODE
  402. check_sum += read_time_data[i];
  403. uart2_poll_out_ch(read_time_data[i]);
  404. }
  405. uart2_poll_out_ch(check_sum); //checksum
  406. //uart2 send data end ==============================================//
  407. //printk("y:20%d, mon:%d, week:%d, d:%d, h:%d, min:%d, sec:%d\n",
  408. // read_time_data[6], read_time_data[5], read_time_data[4], read_time_data[3], read_time_data[2], read_time_data[1], read_time_data[0]);
  409. #endif
  410. }
  411. static void _sd8563_init_work(struct k_work *work)
  412. {
  413. struct acts_timer_data *external_rtc = &timer_acts_ddata;
  414. printk("sd8563 init work\n");
  415. external_rtc->inited = true;
  416. if (_sd8563_close_write_protection(external_rtc->i2c_dev) == 1)
  417. {
  418. //k_msleep(2);
  419. _sd8563_set_time(external_rtc->i2c_dev, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF);
  420. //k_msleep(2);
  421. _sd8563_open_write_protection(external_rtc->i2c_dev);
  422. }
  423. #if 0
  424. uint8_t i;
  425. for (i=0; i < 20; i++)
  426. {
  427. k_msleep(1000);
  428. _sd8563_read_time(external_rtc->i2c_dev, 0);
  429. }
  430. #endif
  431. htimer_read(1000); //1000ms = 1s
  432. printk("sd8563 init work exit\n");
  433. }
  434. static int _sd8563_acts_init(const struct device *dev)
  435. {
  436. struct acts_timer_data *external_rtc = dev->data;
  437. printk("sd8563 acts init\n");
  438. #if 1
  439. external_rtc->this_dev = (struct device *)dev;
  440. external_rtc->i2c_dev = (struct device *)device_get_binding(CONFIG_SD8563_I2C_NAME);
  441. if (!external_rtc->i2c_dev) {
  442. printk("can not access right i2c device\n");
  443. return -1;
  444. }
  445. external_rtc->inited = false;
  446. k_work_init(&external_rtc->init_timer, _sd8563_init_work);
  447. #ifdef CONFIG_USED_TP_WORK_QUEUE
  448. k_work_queue_start(&timer_drv_q, timer_work_q_stack, K_THREAD_STACK_SIZEOF(timer_work_q_stack), 7, NULL);
  449. k_work_submit_to_queue(&timer_drv_q, &external_rtc->init_timer);
  450. #else
  451. k_work_submit(&external_rtc->init_timer);
  452. #endif
  453. #endif
  454. printk("sd8563 acts init exit\n");
  455. return 0;
  456. }
  457. #ifdef CONFIG_PM_DEVICE
  458. static void _sd8563_suspend(const struct device *dev)
  459. {
  460. //struct acts_timer_data *external_rtc = (struct acts_timer_data *)dev->data;
  461. printk("sd8563 suspend\n");
  462. hrtimer_stop(&g_rtc_ht_read);
  463. }
  464. static void _sd8563_resume(const struct device *dev)
  465. {
  466. struct acts_timer_data *external_rtc = (struct acts_timer_data *)dev->data;
  467. external_rtc->i2c_dev = (struct device *)device_get_binding(CONFIG_SD8563_I2C_NAME);
  468. if (!external_rtc->i2c_dev) {
  469. printk("can not access right i2c device\n");
  470. return;
  471. }
  472. external_rtc->inited = false;
  473. k_work_init(&external_rtc->init_timer, _sd8563_init_work);
  474. printk("sd8563 resume\n");
  475. #ifdef CONFIG_USED_TP_WORK_QUEUE
  476. k_work_submit_to_queue(&tp_drv_q, &external_rtc->init_timer);
  477. #else
  478. k_work_submit(&external_rtc->init_timer);
  479. #endif
  480. }
  481. static int _sd8563_pm_control(const struct device *dev, enum pm_device_action action)
  482. {
  483. int ret = 0;
  484. //printk("sd8563 pm control\n");
  485. switch (action) {
  486. case PM_DEVICE_ACTION_SUSPEND:
  487. break;
  488. case PM_DEVICE_ACTION_RESUME:
  489. break;
  490. case PM_DEVICE_ACTION_EARLY_SUSPEND:
  491. _sd8563_suspend(dev);
  492. break;
  493. case PM_DEVICE_ACTION_LATE_RESUME:
  494. _sd8563_resume(dev);
  495. break;
  496. default:
  497. break;
  498. }
  499. return ret;
  500. }
  501. #else /* CONFIG_PM_DEVICE */
  502. static int _sd8563_pm_control(const struct device *dev, uint32_t ctrl_command,
  503. void *context, device_pm_cb cb, void *arg)
  504. {
  505. }
  506. #endif
  507. #if IS_ENABLED(CONFIG_SD8563)
  508. DEVICE_DEFINE(sd8563, CONFIG_SD8563_DEV_NAME, _sd8563_acts_init,
  509. _sd8563_pm_control, &timer_acts_ddata, NULL, POST_KERNEL,
  510. 50, NULL);
  511. #endif