cregit-Linux how code gets into the kernel

Release 4.11 drivers/bus/tegra-aconnect.c

Directory: drivers/bus
/*
 * Tegra ACONNECT Bus Driver
 *
 * Copyright (C) 2016, NVIDIA CORPORATION.  All rights reserved.
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 */

#include <linux/clk.h>
#include <linux/module.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/pm_clock.h>
#include <linux/pm_runtime.h>


static int tegra_aconnect_probe(struct platform_device *pdev) { int ret; if (!pdev->dev.of_node) return -EINVAL; ret = pm_clk_create(&pdev->dev); if (ret) return ret; ret = of_pm_clk_add_clk(&pdev->dev, "ape"); if (ret) goto clk_destroy; ret = of_pm_clk_add_clk(&pdev->dev, "apb2ape"); if (ret) goto clk_destroy; pm_runtime_enable(&pdev->dev); of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); dev_info(&pdev->dev, "Tegra ACONNECT bus registered\n"); return 0; clk_destroy: pm_clk_destroy(&pdev->dev); return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Jon Hunter134100.00%2100.00%
Total134100.00%2100.00%


static int tegra_aconnect_remove(struct platform_device *pdev) { pm_runtime_disable(&pdev->dev); pm_clk_destroy(&pdev->dev); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Jon Hunter30100.00%1100.00%
Total30100.00%1100.00%


static int tegra_aconnect_runtime_resume(struct device *dev) { return pm_clk_resume(dev); }

Contributors

PersonTokensPropCommitsCommitProp
Jon Hunter17100.00%1100.00%
Total17100.00%1100.00%


static int tegra_aconnect_runtime_suspend(struct device *dev) { return pm_clk_suspend(dev); }

Contributors

PersonTokensPropCommitsCommitProp
Jon Hunter17100.00%1100.00%
Total17100.00%1100.00%

static const struct dev_pm_ops tegra_aconnect_pm_ops = { SET_RUNTIME_PM_OPS(tegra_aconnect_runtime_suspend, tegra_aconnect_runtime_resume, NULL) }; static const struct of_device_id tegra_aconnect_of_match[] = { { .compatible = "nvidia,tegra210-aconnect", }, { } }; MODULE_DEVICE_TABLE(of, tegra_aconnect_of_match); static struct platform_driver tegra_aconnect_driver = { .probe = tegra_aconnect_probe, .remove = tegra_aconnect_remove, .driver = { .name = "tegra-aconnect", .of_match_table = tegra_aconnect_of_match, .pm = &tegra_aconnect_pm_ops, }, }; module_platform_driver(tegra_aconnect_driver); MODULE_DESCRIPTION("NVIDIA Tegra ACONNECT Bus Driver"); MODULE_AUTHOR("Jon Hunter <jonathanh@nvidia.com>"); MODULE_LICENSE("GPL v2");

Overall Contributors

PersonTokensPropCommitsCommitProp
Jon Hunter317100.00%2100.00%
Total317100.00%2100.00%
Directory: drivers/bus
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.