static int __init pcf8563_register(void) { if (pcf8563_init() < 0) { printk(KERN_INFO "%s: Unable to initialize Real-Time Clock " "Driver, %s\n", PCF8563_NAME, DRIVER_VERSION); return -1; } if (register_chrdev(PCF8563_MAJOR, DEVICE_NAME, &pcf8563_fops) < 0) { printk(KERN_INFO "%s: Unable to get major number %d for RTC device.\n", PCF8563_NAME, PCF8563_MAJOR); return -1; } printk(KERN_INFO "%s Real-Time Clock Driver, %s\n", PCF8563_NAME, DRIVER_VERSION); /* Check for low voltage, and warn about it. */ if (voltage_low) { printk(KERN_WARNING "%s: RTC Voltage Low - reliable date/time " "information is no longer guaranteed!\n", PCF8563_NAME); } return 0; }
static int __init pcf8563_register(void) { pcf8563_init(); if (register_chrdev(PCF8563_MAJOR, DEVICE_NAME, &pcf8563_fops) < 0) { printk(KERN_INFO "%s: Unable to get major numer %d for RTC device.\n", PCF8563_NAME, PCF8563_MAJOR); return -1; } printk(KERN_INFO "%s Real-Time Clock Driver, %s\n", PCF8563_NAME, DRIVER_VERSION); return 0; }
static bsp_init (void) { rg_led_init (); g_led (0); #if FS_EN == 1 fs_init (); #endif #if SHELL_EN == 1 shell_init (); #endif #if TCP_EN == 1 init_TcpNet (); #endif #if KEY_EN == 1 key_init (); #endif #if RESET_KEY_EN == 1 reset_key_init (); #endif #if GUI_EN == 1 lcd_init (); lcd_write_led (0); widget_init (); #endif I2CInit(0); #if RTC_EN == 1 pcf8563_init (); #endif }