void set_hsic_lpa_states(int states)
{
	int val = gpio_get_value(umts_modem_data.gpio_cp_reset);
	struct modemlink_pm_data *pm_data = &umts_link_pm_data;

	mif_trace("\n");

	if (val) {
		switch (states) {
		case STATE_HSIC_LPA_ENTER:
			mif_info("lpa_enter\n");
			/* gpio_link_active == gpio_host_active in C1 */
			gpio_set_value(umts_modem_data.gpio_host_active, 0);
			mif_info("> H-ACT %d\n", 0);
			if (pm_data->hub_standby && pm_data->hub_pm_data)
				pm_data->hub_standby(pm_data->hub_pm_data);
			break;
		case STATE_HSIC_LPA_WAKE:
			mif_info("lpa_wake\n");
			if (!modem_using_hub() && active_ctl.gpio_initialized)
				set_slave_wake();
			break;
		case STATE_HSIC_LPA_PHY_INIT:
			mif_info("lpa_phy_init\n");
			if (!modem_using_hub() && active_ctl.gpio_initialized)
				set_slave_wake();
			break;
		}
	}
}
Beispiel #2
0
void set_host_states(struct platform_device *pdev, int type)
{
	if (active_ctl.gpio_initialized) {
		if (type)
			set_slave_wake();
		pr_err("[MODEM_IF]Active States =%d, %s\n", type, pdev->name);
		gpio_direction_output(modem_link_pm_data.gpio_link_active,
			type);
	} else
		active_ctl.gpio_request_host_active = 1;
}
Beispiel #3
0
static int umts_link_reconnect(void)
{
	if (gpio_get_value(umts_modem_data.gpio_phone_active) &&
		gpio_get_value(umts_modem_data.gpio_cp_reset)) {
		pr_info("[MODEM_IF] trying reconnect link\n");
		gpio_set_value(modem_link_pm_data.gpio_link_active, 0);
		mdelay(10);
		set_slave_wake();
		gpio_set_value(modem_link_pm_data.gpio_link_active, 1);
	} else
		return -ENODEV;

	return 0;
}
void set_host_states(struct platform_device *pdev, int type)
{
	int val = gpio_get_value(umts_modem_data.gpio_cp_reset);

	if (!val) {
		pr_info("CP not ready, Active State low\n");
		return;
	}

	if (active_ctl.gpio_initialized) {
		if (type)
			set_slave_wake();
		pr_err("[MODEM_IF]Active States =%d, %s\n", type, pdev->name);
		gpio_direction_output(modem_link_pm_data.gpio_link_active,
			type);
	} else
		active_ctl.gpio_request_host_active = 1;
}
void set_hsic_lpa_states(int states)
{
    int val = gpio_get_value(umts_modem_data.gpio_cp_reset);

    mif_trace("\n");

    if (val) {
        switch (states) {
        case STATE_HSIC_LPA_ENTER:
            gpio_set_value(modem_link_pm_data.gpio_link_active, 0);
            gpio_set_value(umts_modem_data.gpio_pda_active, 0);
            pr_info(LOG_TAG "set hsic lpa enter: "
                    "active state (%d)" ", pda active (%d)\n",
                    gpio_get_value(
                        modem_link_pm_data.gpio_link_active),
                    gpio_get_value(umts_modem_data.gpio_pda_active)
                   );
            break;
        case STATE_HSIC_LPA_WAKE:
            gpio_set_value(umts_modem_data.gpio_pda_active, 1);
            pr_info(LOG_TAG "set hsic lpa wake: "
                    "pda active (%d)\n",
                    gpio_get_value(umts_modem_data.gpio_pda_active)
                   );
            break;
        case STATE_HSIC_LPA_PHY_INIT:
            gpio_set_value(umts_modem_data.gpio_pda_active, 1);
            set_slave_wake();
            pr_info(LOG_TAG "set hsic lpa phy init: "
                    "slave wake-up (%d)\n",
                    gpio_get_value(
                        modem_link_pm_data.gpio_link_slavewake)
                   );
            break;
        }
    }
}