예제 #1
0
파일: mixer_drv.c 프로젝트: 3null/linux
static void mxr_release_resources(struct mxr_device *mdev)
{
	mxr_release_clocks(mdev);
	mxr_release_plat_resources(mdev);
	memset(&mdev->res, 0, sizeof(mdev->res));
	mxr_resource_clear_clocks(&mdev->res);
}
예제 #2
0
파일: mixer_drv.c 프로젝트: asad007/LWK
static int mxr_acquire_clocks(struct mxr_device *mdev)
{
	struct mxr_resources *res = &mdev->res;
	struct device *dev = mdev->dev;
	struct s5p_mxr_platdata *pdata = mdev->pdata;

#if defined(CONFIG_ARCH_EXYNOS4)
	res->vp = clk_get(dev, "vp");
	if (IS_ERR_OR_NULL(res->vp)) {
		mxr_err(mdev, "failed to get clock 'vp'\n");
		goto fail;
	}
	res->sclk_mixer = clk_get(dev, "sclk_mixer");
	if (IS_ERR_OR_NULL(res->sclk_mixer)) {
		mxr_err(mdev, "failed to get clock 'sclk_mixer'\n");
		goto fail;
	}
#endif
#if defined(CONFIG_CPU_EXYNOS4210)

	res->sclk_dac = clk_get(dev, "sclk_dac");
	if (IS_ERR_OR_NULL(res->sclk_dac)) {
		mxr_err(mdev, "failed to get clock 'sclk_dac'\n");
		goto fail;
	}
#endif
	if (is_ip_ver_5a_0 || is_ip_ver_5a_1) {
		res->axi_disp1 = clk_get(dev, "axi_disp1");
		if (IS_ERR_OR_NULL(res->axi_disp1)) {
			mxr_err(mdev, "failed to get clock 'axi_disp1'\n");
			goto fail;
		}
	}
	res->mixer = clk_get(dev, "mixer");
	if (IS_ERR_OR_NULL(res->mixer)) {
		mxr_err(mdev, "failed to get clock 'mixer'\n");
		goto fail;
	}
	res->sclk_hdmi = clk_get(dev, "sclk_hdmi");
	if (IS_ERR_OR_NULL(res->sclk_hdmi)) {
		mxr_err(mdev, "failed to get clock 'sclk_hdmi'\n");
		goto fail;
	}

	return 0;
fail:
	mxr_release_clocks(mdev);
	return -ENODEV;
}
static int mxr_acquire_clocks(struct mxr_device *mdev)
{
	struct mxr_resources *res = &mdev->res;
	struct device *dev = mdev->dev;

#if defined(CONFIG_ARCH_EXYNOS4)
	res->vp = clk_get(dev, "vp");
	if (IS_ERR_OR_NULL(res->vp)) {
		mxr_err(mdev, "failed to get clock 'vp'\n");
		goto fail;
	}
	res->sclk_mixer = clk_get(dev, "sclk_mixer");
	if (IS_ERR_OR_NULL(res->sclk_mixer)) {
		mxr_err(mdev, "failed to get clock 'sclk_mixer'\n");
		goto fail;
	}
#endif
#if defined(CONFIG_CPU_EXYNOS4210)

	res->sclk_dac = clk_get(dev, "sclk_dac");
	if (IS_ERR_OR_NULL(res->sclk_dac)) {
		mxr_err(mdev, "failed to get clock 'sclk_dac'\n");
		goto fail;
	}
#endif
	res->mixer = clk_get(dev, "mixer");
	if (IS_ERR_OR_NULL(res->mixer)) {
		mxr_err(mdev, "failed to get clock 'mixer'\n");
		goto fail;
	}
	res->sclk_hdmi = clk_get(dev, "sclk_hdmi");
	if (IS_ERR_OR_NULL(res->sclk_hdmi)) {
		mxr_err(mdev, "failed to get clock 'sclk_hdmi'\n");
		goto fail;
	}

	return 0;
fail:
	mxr_release_clocks(mdev);
	return -ENODEV;
}
예제 #4
0
파일: mixer_drv.c 프로젝트: 3null/linux
static int mxr_acquire_clocks(struct mxr_device *mdev)
{
	struct mxr_resources *res = &mdev->res;
	struct device *dev = mdev->dev;

	mxr_resource_clear_clocks(res);

	res->mixer = clk_get(dev, "mixer");
	if (IS_ERR(res->mixer)) {
		mxr_err(mdev, "failed to get clock 'mixer'\n");
		goto fail;
	}
	res->vp = clk_get(dev, "vp");
	if (IS_ERR(res->vp)) {
		mxr_err(mdev, "failed to get clock 'vp'\n");
		goto fail;
	}
	res->sclk_mixer = clk_get(dev, "sclk_mixer");
	if (IS_ERR(res->sclk_mixer)) {
		mxr_err(mdev, "failed to get clock 'sclk_mixer'\n");
		goto fail;
	}
	res->sclk_hdmi = clk_get(dev, "sclk_hdmi");
	if (IS_ERR(res->sclk_hdmi)) {
		mxr_err(mdev, "failed to get clock 'sclk_hdmi'\n");
		goto fail;
	}
	res->sclk_dac = clk_get(dev, "sclk_dac");
	if (IS_ERR(res->sclk_dac)) {
		mxr_err(mdev, "failed to get clock 'sclk_dac'\n");
		goto fail;
	}

	return 0;
fail:
	mxr_release_clocks(mdev);
	return -ENODEV;
}