mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
host: isp: Deprecate nvhost_module_pm_ops
Deprecate the usage of nvhost_module_pm_ops as part of the wider nvhost API deprecation while maintaining equivalent functionality. The ISP driver does not register prepare_poweroff, poweron_reset, finalize_poweron callbacks nor set the clock gating regs with nvhost, so the runtime operations will only call clk APIs. Bug 4921620 Change-Id: Iadf7b4104f622507e8b2e82fe054151e6318d747 Signed-off-by: Akihiro Mizusawa <amizusawa@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321084 GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Tested-by: FNU Raunak <fraunak@nvidia.com> Reviewed-by: Frank Chen <frankc@nvidia.com> Reviewed-by: FNU Raunak <fraunak@nvidia.com> Reviewed-by: Chinniah Poosapadi <cpoosapadi@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com>
This commit is contained in:
committed by
Jon Hunter
parent
c84bc1ebe7
commit
c555e49cf1
@@ -32,6 +32,7 @@
|
|||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
#include <linux/nvhost.h>
|
#include <linux/nvhost.h>
|
||||||
|
#include <linux/reset.h>
|
||||||
#include <media/fusa-capture/capture-isp-channel.h>
|
#include <media/fusa-capture/capture-isp-channel.h>
|
||||||
#include <media/tegra_camera_platform.h>
|
#include <media/tegra_camera_platform.h>
|
||||||
#include <soc/tegra/camrtc-capture.h>
|
#include <soc/tegra/camrtc-capture.h>
|
||||||
@@ -611,6 +612,37 @@ static const struct of_device_id tegra_isp5_of_match[] = {
|
|||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, tegra_isp5_of_match);
|
MODULE_DEVICE_TABLE(of, tegra_isp5_of_match);
|
||||||
|
|
||||||
|
static int isp_runtime_suspend(struct device *dev)
|
||||||
|
{
|
||||||
|
struct platform_device *pdev = to_platform_device(dev);
|
||||||
|
struct nvhost_device_data *info = platform_get_drvdata(pdev);
|
||||||
|
|
||||||
|
clk_bulk_disable_unprepare(info->num_clks, info->clks);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int isp_runtime_resume(struct device *dev)
|
||||||
|
{
|
||||||
|
struct platform_device *pdev = to_platform_device(dev);
|
||||||
|
struct nvhost_device_data *pdata = platform_get_drvdata(pdev);
|
||||||
|
int err;
|
||||||
|
|
||||||
|
err = clk_bulk_prepare_enable(pdata->num_clks, pdata->clks);
|
||||||
|
if (err) {
|
||||||
|
dev_warn(dev, "failed to enable clocks: %d\n", err);
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const struct dev_pm_ops isp_pm_ops = {
|
||||||
|
SET_RUNTIME_PM_OPS(isp_runtime_suspend, isp_runtime_resume, NULL)
|
||||||
|
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||||
|
pm_runtime_force_resume)
|
||||||
|
};
|
||||||
|
|
||||||
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
|
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
|
||||||
static void isp5_remove_wrapper(struct platform_device *pdev)
|
static void isp5_remove_wrapper(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
@@ -633,7 +665,7 @@ static struct platform_driver isp5_driver = {
|
|||||||
.of_match_table = tegra_isp5_of_match,
|
.of_match_table = tegra_isp5_of_match,
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
.pm = &nvhost_module_pm_ops,
|
.pm = &isp_pm_ops,
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user