Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173503
b: refs/heads/master
c: be9cd7b
h: refs/heads/master
i:
  173501: abf483d
  173499: 017a42d
  173495: c7da94d
  173487: c407041
  173471: a99da6f
  173439: 2f7c7f3
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Nov 30, 2009
1 parent d1c4af9 commit db816d3
Show file tree
Hide file tree
Showing 3 changed files with 20 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: c60f55fa1f82984bbb168c7721db893451f9de6c
refs/heads/master: be9cd7b6f84fd0cc59c8770771073b5c66f958ac
11 changes: 11 additions & 0 deletions trunk/drivers/mfd/sh_mobile_sdhi.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include <linux/mfd/core.h>
#include <linux/mfd/tmio.h>
#include <linux/mfd/sh_mobile_sdhi.h>

struct sh_mobile_sdhi {
struct clk *clk;
Expand All @@ -50,6 +51,15 @@ static struct mfd_cell sh_mobile_sdhi_cell = {
.resources = sh_mobile_sdhi_resources,
};

static void sh_mobile_sdhi_set_pwr(struct platform_device *tmio, int state)
{
struct platform_device *pdev = to_platform_device(tmio->dev.parent);
struct sh_mobile_sdhi_info *p = pdev->dev.platform_data;

if (p && p->set_pwr)
p->set_pwr(pdev, state);
}

static int __init sh_mobile_sdhi_probe(struct platform_device *pdev)
{
struct sh_mobile_sdhi *priv;
Expand Down Expand Up @@ -87,6 +97,7 @@ static int __init sh_mobile_sdhi_probe(struct platform_device *pdev)

/* FIXME: silly const unsigned int hclk */
*(unsigned int *)&priv->mmc_data.hclk = clk_get_rate(priv->clk);
priv->mmc_data.set_pwr = sh_mobile_sdhi_set_pwr;

memcpy(&priv->cell_mmc, &sh_mobile_sdhi_cell, sizeof(priv->cell_mmc));
priv->cell_mmc.driver_data = &priv->mmc_data;
Expand Down
8 changes: 8 additions & 0 deletions trunk/include/linux/mfd/sh_mobile_sdhi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#ifndef __SH_MOBILE_SDHI_H__
#define __SH_MOBILE_SDHI_H__

struct sh_mobile_sdhi_info {
void (*set_pwr)(struct platform_device *pdev, int state);
};

#endif /* __SH_MOBILE_SDHI_H__ */

0 comments on commit db816d3

Please sign in to comment.