static int __init mddi_driver_init(void) { int ret; mddi_clk = clk_get(NULL, "mddi_clk"); if (IS_ERR(mddi_clk)) { printk(KERN_ERR "can't find mddi_clk \n"); return PTR_ERR(mddi_clk); } clk_enable(mddi_clk); mddi_pclk = clk_get(NULL, "mddi_pclk"); if (IS_ERR(mddi_pclk)) mddi_pclk = NULL; else clk_enable(mddi_pclk); ret = mddi_register_driver(); if (ret) { clk_disable(mddi_clk); clk_put(mddi_clk); if (mddi_pclk) { clk_disable(mddi_pclk); clk_put(mddi_pclk); } printk(KERN_ERR "mddi_register_driver() failed!\n"); return ret; } if (mddi_resource_initialized == 1) mddi_init(); return ret; }
static int __init mddi_driver_init(void) { int ret; pmdh_clk_status = 0; mddi_clk = clk_get(NULL, "mddi_clk"); if (IS_ERR(mddi_clk)) { printk(KERN_ERR "can't find mddi_clk\n"); return PTR_ERR(mddi_clk); } ret = clk_set_min_rate(mddi_clk, 49000000); if (ret) printk(KERN_ERR "Can't set mddi_clk min rate to 49000000\n"); printk(KERN_INFO "mddi_clk init rate is %lu\n", clk_get_rate(mddi_clk)); mddi_pclk = clk_get(NULL, "mddi_pclk"); if (IS_ERR(mddi_pclk)) mddi_pclk = NULL; pmdh_clk_enable(); ret = mddi_register_driver(); if (ret) { pmdh_clk_disable(); clk_put(mddi_clk); if (mddi_pclk) clk_put(mddi_pclk); printk(KERN_ERR "mddi_register_driver() failed!\n"); return ret; } mddi_init(); return ret; }
static int __init mddi_driver_init(void) { int ret; mddi_clk = clk_get(NULL, "mddi_clk"); if (IS_ERR(mddi_clk)) { printk(KERN_ERR "can't find mddi_clk \n"); return PTR_ERR(mddi_clk); } #ifdef CONFIG_SHLCDC_BOARD pm_qos_add_requirement(PM_QOS_SYSTEM_BUS_FREQ, "mddi", 117000); #endif clk_enable(mddi_clk); ret = mddi_register_driver(); if (ret) { clk_disable(mddi_clk); #ifdef CONFIG_SHLCDC_BOARD pm_qos_remove_requirement(PM_QOS_SYSTEM_BUS_FREQ, "mddi"); #endif clk_put(mddi_clk); printk(KERN_ERR "mddi_register_driver() failed!\n"); return ret; } mddi_init(); return ret; }
static int __init mddi_driver_init(void) { int ret; ret = mddi_register_driver(); if (ret) { pmdh_clk_disable(); clk_put(mddi_clk); if (mddi_pclk) clk_put(mddi_pclk); printk(KERN_ERR "mddi_register_driver() failed!\n"); return ret; } mddi_init(); return ret; }
static int __init mddi_driver_init(void) { int ret; mddi_clk = clk_get(NULL, "mddi_clk"); if (IS_ERR(mddi_clk)) { printk(KERN_ERR "can't find mddi_clk \n"); return PTR_ERR(mddi_clk); } clk_enable(mddi_clk); ret = mddi_register_driver(); if (ret) { clk_disable(mddi_clk); clk_put(mddi_clk); printk(KERN_ERR "mddi_register_driver() failed!\n"); return ret; } mddi_init(); return ret; }