-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 336511 b: refs/heads/master c: 45228ef h: refs/heads/master i: 336509: d40634e 336507: 2bbf40f 336503: 43d2af7 336495: 7c5ce3b 336479: b1941de 336447: b79b9f9 336383: 1aed766 v: v3
- Loading branch information
Ulf Hansson
authored and
Mike Turquette
committed
Nov 26, 2012
1 parent
e714c94
commit 5999210
Showing
3 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: b70e6d009a88e09805152597e02f3d97a1d6ee99 | ||
refs/heads/master: 45228ef32240957b1536fbba1ca12377cb2e587c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* abx500 clock implementation for ux500 platform. | ||
* | ||
* Copyright (C) 2012 ST-Ericsson SA | ||
* Author: Ulf Hansson <ulf.hansson@linaro.org> | ||
* | ||
* License terms: GNU General Public License (GPL) version 2 | ||
*/ | ||
|
||
#include <linux/err.h> | ||
#include <linux/module.h> | ||
#include <linux/device.h> | ||
#include <linux/platform_device.h> | ||
#include <linux/mfd/abx500/ab8500.h> | ||
|
||
/* TODO: Add clock implementations here */ | ||
|
||
|
||
/* Clock definitions for ab8500 */ | ||
static int ab8500_reg_clks(struct device *dev) | ||
{ | ||
return 0; | ||
} | ||
|
||
/* Clock definitions for ab8540 */ | ||
static int ab8540_reg_clks(struct device *dev) | ||
{ | ||
return 0; | ||
} | ||
|
||
/* Clock definitions for ab9540 */ | ||
static int ab9540_reg_clks(struct device *dev) | ||
{ | ||
return 0; | ||
} | ||
|
||
static int __devinit abx500_clk_probe(struct platform_device *pdev) | ||
{ | ||
struct ab8500 *parent = dev_get_drvdata(pdev->dev.parent); | ||
int ret; | ||
|
||
if (is_ab8500(parent) || is_ab8505(parent)) { | ||
ret = ab8500_reg_clks(&pdev->dev); | ||
} else if (is_ab8540(parent)) { | ||
ret = ab8540_reg_clks(&pdev->dev); | ||
} else if (is_ab9540(parent)) { | ||
ret = ab9540_reg_clks(&pdev->dev); | ||
} else { | ||
dev_err(&pdev->dev, "non supported plf id\n"); | ||
return -ENODEV; | ||
} | ||
|
||
return ret; | ||
} | ||
|
||
static struct platform_driver abx500_clk_driver = { | ||
.driver = { | ||
.name = "abx500-clk", | ||
.owner = THIS_MODULE, | ||
}, | ||
.probe = abx500_clk_probe, | ||
}; | ||
|
||
static int __init abx500_clk_init(void) | ||
{ | ||
return platform_driver_register(&abx500_clk_driver); | ||
} | ||
|
||
arch_initcall(abx500_clk_init); | ||
|
||
MODULE_AUTHOR("Ulf Hansson <ulf.hansson@linaro.org"); | ||
MODULE_DESCRIPTION("ABX500 clk driver"); | ||
MODULE_LICENSE("GPL v2"); |