2 * abx500 clock implementation for ux500 platform.
4 * Copyright (C) 2012 ST-Ericsson SA
5 * Author: Ulf Hansson <ulf.hansson@linaro.org>
7 * License terms: GNU General Public License (GPL) version 2
10 #include <linux/err.h>
11 #include <linux/module.h>
12 #include <linux/device.h>
13 #include <linux/platform_device.h>
14 #include <linux/mfd/abx500/ab8500.h>
16 /* TODO: Add clock implementations here */
19 /* Clock definitions for ab8500 */
20 static int ab8500_reg_clks(struct device *dev)
25 /* Clock definitions for ab8540 */
26 static int ab8540_reg_clks(struct device *dev)
31 /* Clock definitions for ab9540 */
32 static int ab9540_reg_clks(struct device *dev)
37 static int abx500_clk_probe(struct platform_device *pdev)
39 struct ab8500 *parent = dev_get_drvdata(pdev->dev.parent);
42 if (is_ab8500(parent) || is_ab8505(parent)) {
43 ret = ab8500_reg_clks(&pdev->dev);
44 } else if (is_ab8540(parent)) {
45 ret = ab8540_reg_clks(&pdev->dev);
46 } else if (is_ab9540(parent)) {
47 ret = ab9540_reg_clks(&pdev->dev);
49 dev_err(&pdev->dev, "non supported plf id\n");
56 static struct platform_driver abx500_clk_driver = {
61 .probe = abx500_clk_probe,
64 static int __init abx500_clk_init(void)
66 return platform_driver_register(&abx500_clk_driver);
69 arch_initcall(abx500_clk_init);
71 MODULE_AUTHOR("Ulf Hansson <ulf.hansson@linaro.org");
72 MODULE_DESCRIPTION("ABX500 clk driver");
73 MODULE_LICENSE("GPL v2");