static int xmm6260_reset(struct modem_ctl *mc)
{
	int ret;

	mif_info("\n");

	ret = xmm6260_off(mc);
	if (ret)
		return ret;

	msleep(100);

	ret = xmm6260_on(mc);
	if (ret)
		return ret;

	return 0;
}
Пример #2
0
static int xmm626x_main_modem(struct modem_ctl *mc, struct link_device *ld)
{
	struct completion done;

	wake_up_interruptible(&mc->read_wq);
	wake_lock(&mc->wakelock);
	ld->enum_done = false;
	mc->set_ehci_power(0);
	xmm6260_off(mc);
	msleep(100);
	mc->phone_state &= MODEM_SIM_DETECT_FLAG;
	xmm6260_on(mc);
	init_completion(&done);
	ld->l2_done = &done;
	wait_for_completion_timeout(&done, 20*HZ);
	ld->l2_done = NULL;
	mc->set_ehci_power(1);
	ld->enum_done = true;
	wake_lock_timeout(&mc->wakelock, 5 * HZ);

	return 0;
}