static void tcc3170_power_off(void)
{
	DPRINTK("call TDMB_PowerOff !\n");

	mutex_lock(&tcc3170_mutex);

	if (tcc3170_pwr_on) {
		tcc3170_on_air = false;

		if (prev_subch != 0xFF) {
			tcbd_unregister_service(&tcc3170_device, prev_subch);
			prev_subch = 0xFF;
		}

		tcbd_io_close(&tcc3170_device);

		tdmb_control_irq(false);
		tdmb_control_gpio(false);

		tcc3170_pwr_on = false;
	}

	mutex_unlock(&tcc3170_mutex);

}
static bool t3900_power_on(void)
{
	DPRINTK("t3900_power_on\n");

	if (t3900_pwr_on) {
		return true;
	} else {
		st_ch_info = vmalloc(sizeof(struct ST_SUBCH_INFO));
		if (st_ch_info == NULL) {
			return false;
		} else {
			tdmb_control_gpio(true);

			if (INTERFACE_INIT(TDMB_I2C_ID80) != INC_SUCCESS) {
				tdmb_control_gpio(false);

				vfree(st_ch_info);
				st_ch_info = NULL;

				return false;
			} else {
				tdmb_control_irq(true);
				t3900_pwr_on = true;
				return true;
			}
		}
	}
}
static void mtv318_power_off(void)
{
	DPRINTK("mtv318_power_off\n");

	if (mtv318_pwr_on) {
		mtv318_on_air = false;
		tdmb_control_irq(false);
		tdmb_control_gpio(false);

		mtv318_pwr_on = false;

		RTV_GUARD_DEINIT;
	}
}
static bool tcc3170_power_on(void)
{
	unsigned char chip_id = 0;
	s32 ret;

	DPRINTK("tcc3170_power_on\n");

	if (tcc3170_pwr_on) {
		return true;
	} else {
		tdmb_control_gpio(true);

		/* command io open */
		ret = tcbd_io_open(&tcc3170_device);
		if (ret < 0) {
			DPRINTK("failed io open %d\n", (int)ret);
			tdmb_control_gpio(false);
			return false;
		}

		/* check chip id */
		tcbd_reg_read(&tcc3170_device, TCBD_CHIPID, &chip_id);
		DPRINTK("chip id : 0X%X\n", chip_id);
		if (chip_id != TCBD_CHIPID_VALUE) {
			DPRINTK("invalid chip id !!! exit!\n");
			tcbd_io_close(&tcc3170_device);
			tdmb_control_gpio(false);
			return false;
		} else {
#ifdef CONFIG_TDMB_SPI
			tcbd_select_peri(&tcc3170_device, PERI_TYPE_SPI_ONLY);
			tcbd_change_irq_mode \
				(&tcc3170_device, INTR_MODE_LEVEL_LOW);
#else
#error
#endif /* CONFIG_TDMB_SPI */
			if (tcbd_device_start \
				(&tcc3170_device, TCBD_CLOCK) < 0) {
				DPRINTK("could not start device!!\n");
				tcbd_io_close(&tcc3170_device);
				tdmb_control_gpio(false);
				return false;
			} else {
				tdmb_control_irq(true);
				tcc3170_pwr_on = true;
				return true;
			}
		}
	}
}
Example #5
0
static void fc8050_power_off(void)
{
	DPRINTK("call TDMB_PowerOff !\n");

	if (fc8050_pwr_on) {
		fc8050_on_air = false;

		dmb_drv_deinit();

		tdmb_control_irq(false);
		tdmb_control_gpio(false);

		fc8050_pwr_on = false;
	}
}
static void fc8080_power_off(void)
{
	DPRINTK("%s %d\n", __func__, fc8080_pwr_on);

	if (fc8080_pwr_on) {
		fc8080_on_air = false;
		fc8080_pwr_on = false;

#if defined(CONFIG_TDMB_TSIF_SLSI) || defined(CONFIG_TDMB_TSIF_QC)
		tdmb_tsi_stop();
#else
		tdmb_control_irq(false);
#endif
		dmb_drv_deinit();
		tdmb_control_gpio(false);
	}
}
static void t3900_power_off(void)
{
	DPRINTK("t3900_power_off\n");

	if (t3900_pwr_on) {
		t3900_on_air = false;

		INC_STOP(TDMB_I2C_ID80);

		tdmb_control_irq(false);
		tdmb_control_gpio(false);

		vfree(st_ch_info);
		st_ch_info = NULL;

		t3900_pwr_on = false;
	}
}
static bool mtv318_power_on(void)
{
	DPRINTK("mtv318_power_on\n");

	if (mtv318_pwr_on) {
		return true;
	} else {
		tdmb_control_gpio(true);

		if (rtvTDMB_Initialize(RTV_COUNTRY_BAND_KOREA) != RTV_SUCCESS) {
			tdmb_control_gpio(false);
			return false;
		} else {
			tdmb_control_irq(true);
			mtv318_pwr_on = true;
			return true;
		}
	}
}
Example #9
0
static bool fc8050_power_on(void)
{
	DPRINTK("fc8050_power_on\n");

	if (fc8050_pwr_on) {
		return true;
	} else {
		tdmb_control_gpio(true);

		if (dmb_drv_init() == TDMB_FAIL) {
			tdmb_control_gpio(false);
			return false;
		} else {
			tdmb_control_irq(true);
			fc8050_pwr_on = true;
			return true;
		}
	}
}
static bool fc8080_power_on(void)
{
	DPRINTK("%s\n", __func__);

	if (fc8080_pwr_on) {
		return true;
	} else {
		tdmb_control_gpio(true);
		if (dmb_drv_init(tdmb_get_if_handle()) == TDMB_FAIL) {
			tdmb_control_gpio(false);
			return false;
		} else {
#if !defined(CONFIG_TDMB_TSIF_SLSI) && !defined(CONFIG_TDMB_TSIF_QC)
			tdmb_control_irq(true);
#endif
			fc8080_pwr_on = true;
			return true;
		}
	}
}
static bool mtv319_power_on(void)
{
	DPRINTK("mtv319_power_on\n");

	if (mtv319_pwr_on) {
		return true;
	} else {
		tdmb_control_gpio(true);

		RTV_GUARD_INIT;

		if (rtvTDMB_Initialize() != RTV_SUCCESS) {
			tdmb_control_gpio(false);
			return false;
		} else {
			tdmb_control_irq(true);
			mtv319_pwr_on = true;
			return true;
		}
	}
}