Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280860
b: refs/heads/master
c: f1ee56a
h: refs/heads/master
v: v3
  • Loading branch information
Kuninori Morimoto authored and Felipe Balbi committed Dec 12, 2011
1 parent b97711a commit 7a6aa65
Show file tree
Hide file tree
Showing 3 changed files with 16 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: a49a88f108516fd5ae24e26df5a63beb847807df
refs/heads/master: f1ee56a0004c4a5974e7a69665330b6ff818bf92
7 changes: 7 additions & 0 deletions trunk/drivers/usb/renesas_usbhs/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,18 +291,25 @@ static u32 usbhsc_default_pipe_type[] = {
*/
static void usbhsc_power_ctrl(struct usbhs_priv *priv, int enable)
{
struct platform_device *pdev = usbhs_priv_to_pdev(priv);
struct device *dev = usbhs_priv_to_dev(priv);

if (enable) {
/* enable PM */
pm_runtime_get_sync(dev);

/* enable platform power */
usbhs_platform_call(priv, power_ctrl, pdev, priv->base, enable);

/* USB on */
usbhs_sys_clock_ctrl(priv, enable);
} else {
/* USB off */
usbhs_sys_clock_ctrl(priv, enable);

/* disable platform power */
usbhs_platform_call(priv, power_ctrl, pdev, priv->base, enable);

/* disable PM */
pm_runtime_put_sync(dev);
}
Expand Down
8 changes: 8 additions & 0 deletions trunk/include/linux/usb/renesas_usbhs.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ struct renesas_usbhs_platform_callback {
*/
void (*hardware_exit)(struct platform_device *pdev);

/*
* option:
*
* for board specific clock control
*/
void (*power_ctrl)(struct platform_device *pdev,
void __iomem *base, int enable);

/*
* option:
*
Expand Down

0 comments on commit 7a6aa65

Please sign in to comment.