static int tegra_camera_power_off(struct tegra_camera_dev *dev) { int ret = 0; int val = 0; dev_dbg(dev->dev, "%s++\n", __func__); /* Disable external power */ if (dev->reg) { ret = regulator_disable(dev->reg); if (ret) { dev_err(dev->dev, "%s: disable csi regulator failed.\n", __func__); return ret; } } dev->power_on = 0; tegra_camera_on = dev->power_on; val = PAD_CIL_PDVREG(0x0); tegra_vi_csi_writel(val, CSI_CIL_PAD_CONFIG); if (camera_boost){ pr_info("%s: clean camera freq boost\n", __func__); pm_qos_update_request(&boost_cpu_freq_req, (s32)PM_QOS_CPU_FREQ_MIN_DEFAULT_VALUE); pm_qos_update_request(&boost_cpu_num_req, (s32)PM_QOS_MIN_ONLINE_CPUS_DEFAULT_VALUE); } return ret; }
static int tegra_camera_power_off(struct tegra_camera_dev *dev) { int ret = 0; int val = 0; dev_dbg(dev->dev, "%s++\n", __func__); /* Disable external power */ if (dev->reg) { ret = regulator_disable(dev->reg); if (ret) { dev_err(dev->dev, "%s: disable csi regulator failed.\n", __func__); return ret; } } dev->power_on = 0; tegra_camera_on = dev->power_on; val = PAD_CIL_PDVREG(0x0); tegra_vi_csi_writel(val, CSI_CIL_PAD_CONFIG); return ret; }