int broadcast_fc8300_drv_if_power_on(void) { int rc = ERROR; print_log(NULL, "[1seg]broadcast_drv_if_power_on\n"); if (!fc8300_is_power_on()) rc = fc8300_power_on(); return rc; }
static int broadcast_Isdb_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { int rc = 0; int addr = 0; #if defined (CONFIG_ARCH_MSM8992) || defined (CONFIG_ARCH_MSM8994) printk("[dtv]broadcast_Isdb_i2c_probe client:0x%lX\n", (UDynamic_32_64)client); #else printk("[dtv]broadcast_Isdb_i2c_probe client:0x%X\n", (UDynamic_32_64)client); #endif if(!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { print_log(NULL, "need I2C_FUNC_I2C\n"); return -ENODEV; } IsdbCtrlInfo.pdev = to_platform_device(&client->dev); /* taew00k.kang added for Device Tree Structure 2013-06-04 [start] */ addr = client->addr; //Slave Addr pr_err("[dtv] i2c Slaveaddr [%x] \n", addr); IsdbCtrlInfo.pclient = client; //i2c_set_clientdata(client, (void*)&IsdbCtrlInfo.pclient); #ifdef FEATURE_DMB_USE_XO IsdbCtrlInfo.xo_clk = clk_get(&IsdbCtrlInfo.pclient->dev, "isdbt_xo"); if(IS_ERR(IsdbCtrlInfo.xo_clk)){ rc = PTR_ERR(IsdbCtrlInfo.xo_clk); dev_err(&IsdbCtrlInfo.pclient->dev, "[dtv]could not get clock\n"); return rc; } /* We enable/disable the clock only to assure it works */ rc = clk_prepare_enable(IsdbCtrlInfo.xo_clk); if(rc) { dev_err(&IsdbCtrlInfo.pclient->dev, "[dtv] could not enable clock\n"); return rc; } clk_disable_unprepare(IsdbCtrlInfo.xo_clk); #endif #ifdef FEATURE_DMB_USE_PINCTRL isdbt_pinctrl_init(); #endif /* Config GPIOs */ broadcast_Isdb_config_gpios(); #ifdef FEATURE_DMB_USE_REGULATOR broadcast_isdbt_set_regulator(1); broadcast_isdbt_set_regulator(0); #endif #ifndef _NOT_USE_WAKE_LOCK_ wake_lock_init(&IsdbCtrlInfo.wake_lock, WAKE_LOCK_SUSPEND, dev_name(&client->dev)); #endif #if defined (CONFIG_ARCH_MSM8992) || defined (CONFIG_ARCH_MSM8994) fc8300_power_on(); tunerbb_drv_fc8300_read_chip_id(); fc8300_power_off(); #endif return rc; }