Пример #1
0
TVC_STATUS TVC_Deinit(void)
{
    TVC_Disable();
    TVC_PowerOff();

    return TVC_STATUS_OK;
}
Пример #2
0
TVC_STATUS TVC_Init(void)
{
    TV_INFO("Init Start\n");
    memset(&_tvcContext, 0, sizeof(_tvcContext));

    // TVC controller would NOT reset register as default values
    // Do it by SW here
    //
    _ResetBackupedTVCRegisterValues();

#if ENABLE_TVC_INTERRUPT
    if (request_irq(MT6575_TVC_IRQ_ID,
                    (irq_handler_t)_TVC_InterruptHandler,
                    IRQF_TRIGGER_LOW, "mt6575-tvc", NULL) < 0)
    {
        printk("[TVC][ERROR] fail to request TVC irq\n");
        return TVC_STATUS_ERROR;
    }

    init_waitqueue_head(&_tvcContext.tvc_checkline);

    TVC_PowerOn();

    // Enable Interrupt
    {
        TVC_REG_CON CON = TVC_REG->CONTROL;
        CON.CHECK_IRQ = 1;
        CON.OVRUN_IRQ = 1;
        OUTREG32(&TVC_REG->CONTROL, AS_UINT32(&CON));

        TVC_REG->CHECK_LINE = 1;
    }

    TVC_PowerOff();
#endif
    TV_INFO("Init End\n");

    return TVC_STATUS_OK;
}