static ssize_t boot_store(struct kobject *kobj, struct attribute *a, const char *buf, size_t count)
{
    sbchk_base();

    if (!strncmp(a->name, MD_SYSFS_ATTR, strlen(MD_SYSFS_ATTR)) && md_store) 
    {
        return md_store(buf, count);
    }
//kaka_11_0622 add
	else if(!strncmp(a->name, FACTORY_RTC_ATTR, strlen(FACTORY_RTC_ATTR)) ){
		return factory_mode_store(buf,count);
	}
	//kaka_11_0622 end
    else if (!strncmp(a->name, BOOT_SYSFS_ATTR, strlen(BOOT_SYSFS_ATTR)))   
    {   /* for implementing android <-> fm */
        int mode = 0;
        if (1 != sscanf(buf, "0x%x", &mode))
        {
            printk("BOOT: error!!\n");
        }
        else if ((mode & 0xFFFF0000) == 0x19710000)
        {
            mode &= (~0xFFFF0000);
            printk("BOOT: %x -> %x\n", g_boot_mode, mode);            
            if ( ((g_boot_mode == NORMAL_BOOT) && (mode == FACTORY_BOOT)) ||
                 ((g_boot_mode == FACTORY_BOOT) && (mode == NORMAL_BOOT)) )
            {
                g_boot_mode = mode;                
            }
        } 
    }    
    return count;
}
static ssize_t boot_store(struct kobject *kobj, struct attribute *a, const char *buf, size_t count)
{

#ifndef CONFIG_MTK_EMMC_SUPPORT
	/* check sbchk engine before booting up modem */
	/* FIX-ME : marked for early porting */
	/* sbchk_base(); */
#endif

	if (!strncmp(a->name, MD_SYSFS_ATTR, strlen(MD_SYSFS_ATTR)) && md_store)
		return md_store(buf, count);

	return count;
}
Beispiel #3
0
static ssize_t boot_store(struct kobject *kobj, struct attribute *a, const char *buf, size_t count)
{

#ifndef MTK_EMMC_SUPPORT
    /* check sbchk engine before booting up modem */
    sbchk_base();
#endif
    
    if (!strncmp(a->name, MD_SYSFS_ATTR, strlen(MD_SYSFS_ATTR)) && md_store) 
    {
        return md_store(buf, count);
    }
    
    return count;
}