Exemple #1
0
static int exynos4x12_power_off(struct samsung_usb2_phy_instance *inst)
{
	struct samsung_usb2_phy_driver *drv = inst->drv;
	struct samsung_usb2_phy_instance *device =
					&drv->instances[EXYNOS4x12_DEVICE];

	inst->enabled = 0;
	exynos4x12_isol(inst, 1);
	exynos4x12_phy_pwr(inst, 0);

	if (inst->cfg->id == EXYNOS4x12_HSIC0 && !device->enabled) {
		exynos4x12_isol(device, 1);
		exynos4x12_phy_pwr(device, 0);
	}

	return 0;
}
static void exynos4x12_power_off_int(struct samsung_usb2_phy_instance *inst)
{
	if (inst->int_cnt-- > 1)
		return;

	exynos4x12_isol(inst, 1);
	exynos4x12_phy_pwr(inst, 0);
}
static void exynos4x12_power_on_int(struct samsung_usb2_phy_instance *inst)
{
	if (inst->int_cnt++ > 0)
		return;

	exynos4x12_setup_clk(inst);
	exynos4x12_isol(inst, 0);
	exynos4x12_phy_pwr(inst, 1);
}
Exemple #4
0
static int exynos4x12_power_on(struct samsung_usb2_phy_instance *inst)
{
	struct samsung_usb2_phy_driver *drv = inst->drv;

	inst->enabled = 1;
	exynos4x12_setup_clk(inst);
	exynos4x12_phy_pwr(inst, 1);
	exynos4x12_isol(inst, 0);

	/* Power on the device, as it is necessary for HSIC to work */
	if (inst->cfg->id == EXYNOS4x12_HSIC0) {
		struct samsung_usb2_phy_instance *device =
					&drv->instances[EXYNOS4x12_DEVICE];
		exynos4x12_phy_pwr(device, 1);
		exynos4x12_isol(device, 0);
	}

	return 0;
}