Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353410
b: refs/heads/master
c: 5b1d3c3
h: refs/heads/master
v: v3
  • Loading branch information
R. Chandrasekar authored and Mark Brown committed Jan 31, 2013
1 parent 26865af commit 6713371
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 313367e7bfa9de924245ad65c83c32c073b2fdfc
refs/heads/master: 5b1d3c3472f1941ab1a78575fe9ada718a7c0c25
26 changes: 26 additions & 0 deletions trunk/sound/soc/samsung/i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,26 @@ static inline int samsung_i2s_get_driver_data(struct platform_device *pdev)
return platform_get_device_id(pdev)->driver_data;
}

#ifdef CONFIG_PM_RUNTIME
static int i2s_runtime_suspend(struct device *dev)
{
struct i2s_dai *i2s = dev_get_drvdata(dev);

clk_disable_unprepare(i2s->clk);

return 0;
}

static int i2s_runtime_resume(struct device *dev)
{
struct i2s_dai *i2s = dev_get_drvdata(dev);

clk_prepare_enable(i2s->clk);

return 0;
}
#endif /* CONFIG_PM_RUNTIME */

static int samsung_i2s_probe(struct platform_device *pdev)
{
struct i2s_dai *pri_dai, *sec_dai = NULL;
Expand Down Expand Up @@ -1288,6 +1308,11 @@ static const struct of_device_id exynos_i2s_match[] = {
MODULE_DEVICE_TABLE(of, exynos_i2s_match);
#endif

static const struct dev_pm_ops samsung_i2s_pm = {
SET_RUNTIME_PM_OPS(i2s_runtime_suspend,
i2s_runtime_resume, NULL)
};

static struct platform_driver samsung_i2s_driver = {
.probe = samsung_i2s_probe,
.remove = samsung_i2s_remove,
Expand All @@ -1296,6 +1321,7 @@ static struct platform_driver samsung_i2s_driver = {
.name = "samsung-i2s",
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(exynos_i2s_match),
.pm = &samsung_i2s_pm,
},
};

Expand Down

0 comments on commit 6713371

Please sign in to comment.