static int __devinit s5p_tv_probe(struct platform_device *pdev) { int irq_num; int ret; int i,retval; s5ptv_status.dev_fb = &pdev->dev; //enable power max8998_ldo3_8_control(1,LDO_TV_OUT); //ldo 3,8 on printk("%s: LDO3_8 is enabled by TV \n", __func__); __s5p_sdout_probe(pdev, 0); __s5p_vp_probe(pdev, 1); __s5p_mixer_probe(pdev, 2); #ifdef CONFIG_CPU_S5PC100 __s5p_hdmi_probe(pdev, 3); __s5p_tvclk_probe(pdev, 4); #endif #ifdef CONFIG_CPU_S5PV210 tv_clk_get(pdev, &s5ptv_status); s5p_tv_clk_gate( true ); #endif #ifdef CONFIG_CPU_S5PV210 __s5p_hdmi_probe(pdev, 3, 4); __s5p_hdcp_init( ); #endif #ifdef FIX_27M_UNSTABLE_ISSUE /* for smdkc100 pop */ writel(0x1, S5PC1XX_GPA0_BASE + 0x56c); #endif #ifdef I2C_BASE /* for dev_dbg err. */ spin_lock_init(&slock_hpd); /* for bh */ INIT_WORK(&ws_hpd, (void *)set_ddc_port); #endif /* check EINT init state */ #ifdef CONFIG_CPU_S5PC100 s3c_gpio_cfgpin(S5PC1XX_GPH0(5), S3C_GPIO_SFN(2)); s3c_gpio_setpull(S5PC1XX_GPH0(5), S3C_GPIO_PULL_UP); s5ptv_status.hpd_status = gpio_get_value(S5PC1XX_GPH0(5)) ? false:true; #endif #ifdef CONFIG_CPU_S5PV210 #ifdef CONFIG_HDMI_HPD if(0 == gpio_get_value(GPIO_ACCESSORY_INT)) //docking station attached s5ptv_status.hpd_status= s5p_hpd_get_state(); else s5ptv_status.hpd_status= 0; #else s5ptv_status.hpd_status= 0; #endif #endif dev_info(&pdev->dev, "hpd status is cable %s\n", s5ptv_status.hpd_status ? "inserted":"removed"); /* interrupt */ TVOUT_IRQ_INIT(irq_num, ret, pdev, 0, out, __s5p_mixer_irq, "mixer"); TVOUT_IRQ_INIT(irq_num, ret, pdev, 1, out_hdmi_irq, __s5p_hdmi_irq , "hdmi"); TVOUT_IRQ_INIT(irq_num, ret, pdev, 2, out_tvenc_irq, s5p_tvenc_irq, "tvenc"); #ifdef CONFIG_CPU_S5PC100 TVOUT_IRQ_INIT(irq_num, ret, pdev, 3, out_hpd_irq, __s5p_hpd_irq, "hpd"); set_irq_type(IRQ_EINT5, IRQ_TYPE_LEVEL_LOW); #endif /* v4l2 video device registration */ for (i = 0; i < S5P_TVMAX_CTRLS; i++) { s5ptv_status.video_dev[i] = &s5p_tvout[i]; if (video_register_device(s5ptv_status.video_dev[i], VFL_TYPE_GRABBER, s5p_tvout[i].minor) != 0) { dev_err(&pdev->dev, "Couldn't register tvout driver.\n"); return 0; } } #ifdef CONFIG_TV_FB mutex_init(&s5ptv_status.fb_lock); /* for default start up */ _s5p_tv_if_init_param(); s5ptv_status.tvout_param.disp_mode = TVOUT_720P_60; s5ptv_status.tvout_param.out_mode = TVOUT_OUTPUT_HDMI; #ifndef CONFIG_USER_ALLOC_TVOUT s5p_tv_clk_gate(true); if(s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI || s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI_RGB || s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_DVI) tv_phy_power(true); _s5p_tv_if_set_disp(); #endif s5ptvfb_set_lcd_info(&s5ptv_status); /* prepare memory */ if (s5ptvfb_alloc_framebuffer()) goto err_alloc; if (s5ptvfb_register_framebuffer()) goto err_alloc; #ifndef CONFIG_USER_ALLOC_TVOUT s5ptvfb_display_on(&s5ptv_status); #endif #endif mutex_for_fo = kmalloc(sizeof(struct mutex), GFP_KERNEL); if (mutex_for_fo == NULL) { dev_err(&pdev->dev, "failed to create mutex handle\n"); goto out; } #ifdef I2C_BASE mutex_for_i2c = kmalloc(sizeof(struct mutex), GFP_KERNEL); if (mutex_for_i2c == NULL) { dev_err(&pdev->dev, "failed to create mutex handle\n"); goto out; } mutex_init(mutex_for_i2c); #endif mutex_init(mutex_for_fo); #ifdef CONFIG_CPU_S5PV210 /* added for phy cut off when boot up */ clk_enable(s5ptv_status.i2c_phy_clk); __s5p_hdmi_phy_power(false); clk_disable(s5ptv_status.i2c_phy_clk); s5p_tv_clk_gate( false ); #endif //disable power max8998_ldo3_8_control(0,LDO_TV_OUT); //ldo 3,8 off printk("%s: LDO3_8 is disabled by TV \n", __func__); return 0; #ifdef CONFIG_TV_FB err_alloc: #endif #ifdef CONFIG_CPU_S5PC100 out_hpd_irq: free_irq(IRQ_TVENC, pdev); #endif out_tvenc_irq: free_irq(IRQ_HDMI, pdev); out_hdmi_irq: free_irq(IRQ_MIXER, pdev); out: printk(KERN_ERR "not found (%d). \n", ret); return ret; }
static int __devinit s5p_tv_probe(struct platform_device *pdev) { int irq_num; int ret = 0; int i; g_s5ptv_status.dev_fb = &pdev->dev; g_clks_enabled = 0; ret = s5p_sdout_probe(pdev, 0); if (ret != 0) { pr_err("%s::s5p_sdout_probe() fail\n", __func__); goto err_s5p_sdout_probe; } ret = s5p_vp_probe(pdev, 1); if (ret != 0) { pr_err("%s::s5p_vmixer_probe() fail\n", __func__); goto err_s5p_vp_probe; } ret = s5p_vmixer_probe(pdev, 2); if (ret != 0) { pr_err("%s::s5p_vmixer_probe() fail\n", __func__); goto err_s5p_vmixer_probe; } tv_clk_get(pdev, &g_s5ptv_status); s5p_tv_base_clk_gate(true); ret = s5p_hdmi_probe(pdev, 3, 4); if (ret != 0) { pr_err("%s::s5p_hdmi_probe() fail\n", __func__); goto err_s5p_hdmi_probe; } s5p_hdcp_init(); #ifdef CONFIG_HDMI_HPD g_s5ptv_status.hpd_status = s5p_hpd_get_state(); #else g_s5ptv_status.hpd_status = 0; #endif dev_info(&pdev->dev, "hpd status is cable %s\n", g_s5ptv_status.hpd_status ? "inserted" : "removed"); /* interrupt */ TVOUT_IRQ_INIT(irq_num, ret, pdev, 0, err_vm_irq, s5p_vmixer_irq, "mixer"); TVOUT_IRQ_INIT(irq_num, ret, pdev, 1, err_hdmi_irq, s5p_hdmi_irq , "hdmi"); TVOUT_IRQ_INIT(irq_num, ret, pdev, 2, err_tvenc_irq, s5p_tvenc_irq, "tvenc"); /* v4l2 video device registration */ for (i = 0; i < S5P_TVMAX_CTRLS; i++) { g_s5ptv_status.video_dev[i] = &s5p_tvout[i]; if (video_register_device(g_s5ptv_status.video_dev[i], VFL_TYPE_GRABBER, s5p_tvout[i].minor) != 0) { dev_err(&pdev->dev, "Couldn't register tvout driver.\n"); ret = -EBUSY; goto err_video_register_device; } } #ifdef CONFIG_TV_FB mutex_init(&g_s5ptv_status.fb_lock); /* for default start up */ s5p_tv_if_init_param(); g_s5ptv_status.tvout_param.disp_mode = TVOUT_720P_60; g_s5ptv_status.tvout_param.out_mode = TVOUT_OUTPUT_HDMI; #ifndef CONFIG_USER_ALLOC_TVOUT s5p_tv_base_clk_gate(true); s5p_tv_base_phy_power(true); s5p_tv_if_set_disp(); #endif s5ptvfb_set_lcd_info(&g_s5ptv_status); /* prepare memory */ if (s5ptvfb_alloc_framebuffer()) { ret = -ENOMEM; goto err_alloc_fb; } if (s5ptvfb_register_framebuffer()) { ret = -EBUSY; goto err_register_fb; } #ifndef CONFIG_USER_ALLOC_TVOUT s5ptvfb_display_on(&g_s5ptv_status); #endif #endif g_mutex_for_fo = kmalloc(sizeof(struct mutex), GFP_KERNEL); if (g_mutex_for_fo == NULL) { dev_err(&pdev->dev, "failed to create mutex handle\n"); ret = -ENOMEM; goto err_mutex_alloc; } mutex_init(g_mutex_for_fo); /* added for phy cut off when boot up */ clk_enable(g_s5ptv_status.i2c_phy_clk); s5p_hdmi_phy_power(false); clk_disable(g_s5ptv_status.i2c_phy_clk); s5p_tv_base_clk_gate(false); return 0; err_mutex_alloc: #ifdef CONFIG_TV_FB err_register_fb: s5ptvfb_free_framebuffer(); err_alloc_fb: #endif err_video_register_device: free_irq(IRQ_TVENC, pdev); err_tvenc_irq: free_irq(IRQ_HDMI, pdev); err_hdmi_irq: free_irq(IRQ_MIXER, pdev); err_vm_irq: s5p_hdmi_release(pdev); err_s5p_hdmi_probe: s5p_vmixer_release(pdev); err_s5p_vmixer_probe: s5p_vp_release(pdev); err_s5p_vp_probe: s5p_sdout_release(pdev); err_s5p_sdout_probe: pr_err("%s::not found (%d).\n", __func__, ret); return ret; }
static int __devinit s5p_tv_probe(struct platform_device *pdev) { int irq_num; int ret; int i; s5ptv_status.dev_fb = &pdev->dev; suspend_resume_sync = 0; is_tv_clk_on = false; is_tv_phy_enable = false; //enable power /* Get csis power domain regulator */ s5ptv_status.tv_regulator = regulator_get(&pdev->dev, "pd"); if (IS_ERR(s5ptv_status.tv_regulator)) { printk(KERN_ERR "%s %d: failed to get resource %s\n", __func__, __LINE__, "s3c-tv20 pd"); return PTR_ERR(s5ptv_status.tv_regulator); } s5ptv_status.tv_tvout = regulator_get(NULL, "tvout"); if (IS_ERR(s5ptv_status.tv_tvout)) { printk(KERN_ERR "%s %d: failed to get resource %s\n", __func__, __LINE__, "s3c-tv20 tvout"); return PTR_ERR(s5ptv_status.tv_tvout); } s5ptv_status.tv_tv = regulator_get(NULL, "hdmi"); if (IS_ERR(s5ptv_status.tv_tv)) { printk(KERN_ERR "%s %d: failed to get resource %s\n", __func__, __LINE__, "s3c-tv20 tv"); return PTR_ERR(s5ptv_status.tv_tv); } regulator_enable(s5ptv_status.tv_tv); regulator_enable(s5ptv_status.tv_tvout); s5ptv_status.dev_fb = &pdev->dev; __s5p_sdout_probe(pdev, 0); __s5p_vp_probe(pdev, 1); __s5p_mixer_probe(pdev, 2); #ifdef CONFIG_CPU_S5PV210 tv_clk_get(pdev, &s5ptv_status); s5p_tv_clk_gate(true); #endif #ifdef CONFIG_CPU_S5PV210 __s5p_hdmi_probe(pdev, 3, 4); __s5p_hdcp_init(); #endif #ifdef FIX_27M_UNSTABLE_ISSUE /* for smdkc100 pop */ writel(0x1, S5PC1XX_GPA0_BASE + 0x56c); #endif #ifdef I2C_BASE /* for dev_dbg err. */ spin_lock_init(&slock_hpd); /* for bh */ INIT_WORK(&ws_hpd, (void *)set_ddc_port); #endif /* check EINT init state */ #ifdef CONFIG_MACH_STEALTHV gpio_set_value(GPIO_HDMI_EN1, 1); #endif s5ptv_status.hpd_status= 0; dev_info(&pdev->dev, "hpd status is cable %s\n", s5ptv_status.hpd_status ? "inserted":"removed"); /* interrupt */ TVOUT_IRQ_INIT(irq_num, ret, pdev, 0, out, __s5p_mixer_irq, "mixer"); TVOUT_IRQ_INIT(irq_num, ret, pdev, 1, out_hdmi_irq, __s5p_hdmi_irq , "hdmi"); TVOUT_IRQ_INIT(irq_num, ret, pdev, 2, out_tvenc_irq, s5p_tvenc_irq, "tvenc"); /* v4l2 video device registration */ for (i = 0; i < S5P_TVMAX_CTRLS; i++) { s5ptv_status.video_dev[i] = &s5p_tvout[i]; if (video_register_device(s5ptv_status.video_dev[i], VFL_TYPE_GRABBER, s5p_tvout[i].minor) != 0) { dev_err(&pdev->dev, "Couldn't register tvout driver.\n"); return 0; } } #ifdef CONFIG_TV_FB mutex_init(&s5ptv_status.fb_lock); /* for default start up */ _s5p_tv_if_init_param(); s5ptv_status.tvout_param.disp_mode = TVOUT_720P_60; s5ptv_status.tvout_param.out_mode = TVOUT_OUTPUT_HDMI; #ifndef CONFIG_USER_ALLOC_TVOUT s5p_tv_clk_gate(true); if(s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI || s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI_RGB || s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_DVI) tv_phy_power(true); _s5p_tv_if_set_disp(); #endif s5ptvfb_set_lcd_info(&s5ptv_status); /* prepare memory */ if (s5ptvfb_alloc_framebuffer()) goto err_alloc; if (s5ptvfb_register_framebuffer()) goto err_alloc; #ifndef CONFIG_USER_ALLOC_TVOUT s5ptvfb_display_on(&s5ptv_status); #endif #endif mutex_for_fo = kmalloc(sizeof(struct mutex), GFP_KERNEL); if (mutex_for_fo == NULL) { dev_err(&pdev->dev, "failed to create mutex handle\n"); goto out; } #ifdef I2C_BASE mutex_for_i2c = kmalloc(sizeof(struct mutex), GFP_KERNEL); if (mutex_for_i2c == NULL) { dev_err(&pdev->dev, "failed to create mutex handle\n"); goto out; } mutex_init(mutex_for_i2c); #endif mutex_init(mutex_for_fo); #ifdef CONFIG_CPU_S5PV210 /* added for phy cut off when boot up */ clk_enable(s5ptv_status.i2c_phy_clk); __s5p_hdmi_phy_power(false); clk_disable(s5ptv_status.i2c_phy_clk); s5p_tv_clk_gate(false); #endif regulator_disable(s5ptv_status.tv_tv); regulator_disable(s5ptv_status.tv_tvout); printk("tv_base_probe is successfully\n"); return 0; #ifdef CONFIG_TV_FB err_alloc: #endif out_tvenc_irq: free_irq(IRQ_HDMI, pdev); out_hdmi_irq: free_irq(IRQ_MIXER, pdev); out: printk(KERN_ERR "not found (%d). \n", ret); return ret; }
static int __devinit s5p_tv_probe(struct platform_device *pdev) { int irq_num; int ret; int i, retval; /* Get csis power domain regulator */ s5ptv_status.tv_regulator = regulator_get(&pdev->dev, "pd"); if (IS_ERR(s5ptv_status.tv_regulator)) { printk(KERN_ERR "%s %d: failed to get resource %s\n", __func__, __LINE__, "s3c-tv20 pd"); return PTR_ERR(s5ptv_status.tv_regulator); } s5ptv_status.tv_tvout = regulator_get(NULL, "tvout"); if (IS_ERR(s5ptv_status.tv_tvout)) { printk(KERN_ERR "%s %d: failed to get resource %s\n", __func__, __LINE__, "s3c-tv20 tvout"); return PTR_ERR(s5ptv_status.tv_tvout); } #ifdef CONFIG_MACH_P1 s5ptv_status.tv_tv = regulator_get(NULL, "tv"); if (IS_ERR(s5ptv_status.tv_tv)) { printk(KERN_ERR "%s %d: failed to get resource %s\n", __func__, __LINE__, "s3c-tv20 tv"); return PTR_ERR(s5ptv_status.tv_tv); } regulator_enable(s5ptv_status.tv_tv); #endif s5ptv_status.dev_fb = &pdev->dev; __s5p_sdout_probe(pdev, 0); __s5p_vp_probe(pdev, 1); __s5p_mixer_probe(pdev, 2); #ifdef CONFIG_CPU_S5PC100 __s5p_hdmi_probe(pdev, 3); __s5p_tvclk_probe(pdev, 4); #endif #ifdef CONFIG_CPU_S5PV210 tv_clk_get(pdev, &s5ptv_status); s5p_tv_clk_gate(true); __s5p_hdmi_probe(pdev, 3, 4); __s5p_hdcp_init(); #endif #if defined(CONFIG_MACH_P1) retval = i2c_add_driver(&SII9234A_i2c_driver); if (retval != 0) printk(KERN_ERR "[MHL SII9234A] can't add i2c driver"); retval = i2c_add_driver(&SII9234B_i2c_driver); if (retval != 0) printk(KERN_ERR "[MHL SII9234B] can't add i2c driver"); retval = i2c_add_driver(&SII9234C_i2c_driver); if (retval != 0) printk(KERN_ERR "[MHL SII9234C] can't add i2c driver"); retval = i2c_add_driver(&SII9234_i2c_driver); if (retval != 0) printk(KERN_ERR "[MHL SII9234] can't add i2c driver"); #endif #ifdef FIX_27M_UNSTABLE_ISSUE /* for smdkc100 pop */ writel(0x1, S5PC1XX_GPA0_BASE + 0x56c); #endif #ifdef I2C_BASE /* for dev_dbg err. */ spin_lock_init(&slock_hpd); /* for bh */ INIT_WORK(&ws_hpd, (void *)set_ddc_port); #endif /* check EINT init state */ #ifdef CONFIG_CPU_S5PC100 s3c_gpio_cfgpin(S5PC1XX_GPH0(5), S3C_GPIO_SFN(2)); s3c_gpio_setpull(S5PC1XX_GPH0(5), S3C_GPIO_PULL_UP); s5ptv_status.hpd_status = gpio_get_value(S5PC1XX_GPH0(5)) ? \ false : true; #endif #ifdef CONFIG_CPU_S5PV210 #ifdef CONFIG_HDMI_HPD s5ptv_status.hpd_status = 0; #else s5ptv_status.hpd_status = 0; #endif #endif dev_info(&pdev->dev, "hpd status: cable %s\n",\ s5ptv_status.hpd_status ? "inserted":"removed/not connected"); /* Interrupt */ TVOUT_IRQ_INIT(irq_num, ret, pdev, 0, out, __s5p_mixer_irq, "mixer"); TVOUT_IRQ_INIT(irq_num, ret, pdev, 1, out_hdmi_irq, __s5p_hdmi_irq , \ "hdmi"); TVOUT_IRQ_INIT(irq_num, ret, pdev, 2, out_tvenc_irq, s5p_tvenc_irq, \ "tvenc"); #ifdef CONFIG_CPU_S5PC100 TVOUT_IRQ_INIT(irq_num, ret, pdev, 3, out_hpd_irq, __s5p_hpd_irq, \ "hpd"); set_irq_type(IRQ_EINT5, IRQ_TYPE_LEVEL_LOW); #endif /* v4l2 video device registration */ for (i = 0; i < S5P_TVMAX_CTRLS; i++) { s5ptv_status.video_dev[i] = &s5p_tvout[i]; if (video_register_device(s5ptv_status.video_dev[i], VFL_TYPE_GRABBER, s5p_tvout[i].minor) != 0) { dev_err(&pdev->dev, "Couldn't register tvout driver.\n"); return 0; } } #ifdef CONFIG_TV_FB mutex_init(&s5ptv_status.fb_lock); /* for default start up */ _s5p_tv_if_init_param(); s5ptv_status.tvout_param.disp_mode = TVOUT_720P_60; s5ptv_status.tvout_param.out_mode = TVOUT_OUTPUT_HDMI; #ifndef CONFIG_USER_ALLOC_TVOUT s5p_tv_clk_gate(true); /* if ((s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI) || (s5ptv_status.tvout_param.out_mode == TVOUT_OUTPUT_HDMI_RGB)) */ tv_phy_power(true); _s5p_tv_if_set_disp(); #endif s5ptvfb_set_lcd_info(&s5ptv_status); /* prepare memory */ if (s5ptvfb_alloc_framebuffer()) goto err_alloc; if (s5ptvfb_register_framebuffer()) goto err_alloc; #ifndef CONFIG_USER_ALLOC_TVOUT s5ptvfb_display_on(&s5ptv_status); #endif #endif mutex_for_fo = kmalloc(sizeof(struct mutex), GFP_KERNEL); if (mutex_for_fo == NULL) { dev_err(&pdev->dev, "failed to create mutex handle\n"); goto out; } #ifdef I2C_BASE mutex_for_i2c = kmalloc(sizeof(struct mutex), GFP_KERNEL); if (mutex_for_i2c == NULL) { dev_err(&pdev->dev, "failed to create mutex handle\n"); goto out; } mutex_init(mutex_for_i2c); #endif mutex_init(mutex_for_fo); #ifdef CONFIG_CPU_S5PV210 /* added for phy cut off when boot up */ clk_enable(s5ptv_status.i2c_phy_clk); __s5p_hdmi_phy_power(false); clk_disable(s5ptv_status.i2c_phy_clk); s5p_tv_clk_gate(false); #endif printk(KERN_INFO "%s TV Probing is done\n", __func__); return 0; #ifdef CONFIG_TV_FB err_alloc: #endif #ifdef CONFIG_CPU_S5PC100 out_hpd_irq: free_irq(IRQ_TVENC, pdev); #endif out_tvenc_irq: free_irq(IRQ_HDMI, pdev); out_hdmi_irq: free_irq(IRQ_MIXER, pdev); out: printk(KERN_ERR "not found (%d). \n", ret); return ret; }
/* * Probe */ static int __init s5p_tv_probe(struct platform_device *pdev) { int irq_num; int ret; int i; int err; ref_count_tv = 0; ref_count_g0 = 0; ref_count_g1 = 0; __s5p_sdout_probe(pdev, 0); __s5p_vp_probe(pdev, 1); __s5p_mixer_probe(pdev, 2); #ifdef CONFIG_CPU_S5PC110 tv_clk_get(pdev, &s5ptv_status); s5p_tv_clk_gate( true ); #endif #ifdef CONFIG_CPU_S5PC110 __s5p_hdmi_probe(pdev, 3, 4); #endif #ifdef CONFIG_CPU_S5PC100 __s5p_hdmi_probe(pdev, 3); __s5p_tvclk_probe(pdev, 4); #endif /* for dev_dbg err. */ /* clock */ #ifdef FIX_27M_UNSTABLE_ISSUE /* for smdkc100 pop */ writel(0x1, S5PC1XX_GPA0_BASE + 0x56c); #endif spin_lock_init(&slock_hpd); /* for bh */ INIT_WORK(&ws_hpd, (void *)set_ddc_port); /* check EINT init state */ #ifdef CONFIG_SMDKC110_BOARD s3c_gpio_cfgpin(S5PC11X_GPH1(5), S5PC11X_GPH1_5_HDMI_HPD); s3c_gpio_setpull(S5PC11X_GPH1(5), S3C_GPIO_PULL_DOWN); s5ptv_status.hpd_status = gpio_get_value(S5PC11X_GPH1(5)) ? false:true; dev_info(&pdev->dev, "hpd status is cable %s\n", s5ptv_status.hpd_status ? "inserted":"removed"); #endif /* interrupt */ TVOUT_IRQ_INIT(irq_num, ret, pdev, 0, out, __s5p_mixer_irq, "mixer"); TVOUT_IRQ_INIT(irq_num, ret, pdev, 1, out_hdmi_irq, __s5p_hdmi_irq , "hdmi"); TVOUT_IRQ_INIT(irq_num, ret, pdev, 2, out_tvenc_irq, s5p_tvenc_irq, "tvenc"); TVOUT_IRQ_INIT(irq_num, ret, pdev, 3, out_hpd_irq, __s5p_hpd_irq, "hpd"); #ifdef CONFIG_S5PC110_JUPITER_BOARD set_irq_type(IRQ_EINT13, IRQ_TYPE_EDGE_RISING); #endif /* v4l2 video device registration */ for (i = 0;i < S5P_TVMAX_CTRLS;i++) { s5ptv_status.video_dev[i] = &s5p_tvout[i]; if (video_register_device(s5ptv_status.video_dev[i], VFL_TYPE_GRABBER, s5p_tvout[i].minor) != 0) { dev_err(&pdev->dev, "Couldn't register tvout driver.\n"); return 0; } else dev_info(&pdev->dev, "%s registered successfully \n", s5p_tvout[i].name); } //mkh: //__s5p_hdmi_init_hpd_onoff(1); mutex_for_fo = (struct mutex *)kmalloc(sizeof(struct mutex), GFP_KERNEL); if (mutex_for_fo == NULL) { dev_err(&pdev->dev, "failed to create mutex handle\n"); goto out; } mutex_for_i2c= (struct mutex *)kmalloc(sizeof(struct mutex), GFP_KERNEL); if (mutex_for_i2c == NULL) { dev_err(&pdev->dev, "failed to create mutex handle\n"); goto out; } #ifdef CONFIG_CPU_S5PC110 s5p_tv_clk_gate(false); #endif mutex_init(mutex_for_fo); mutex_init(mutex_for_i2c); return 0; out_hpd_irq: free_irq(IRQ_TVENC, pdev); out_tvenc_irq: free_irq(IRQ_HDMI, pdev); out_hdmi_irq: free_irq(IRQ_MIXER, pdev); out: printk(KERN_ERR "not found (%d). \n", ret); return ret; }