gadget.c (4876886fb95f93c8b09381ffbdac969d1a1fee0d) gadget.c (9e779778ad7e503434aa76bfc96f98d7d7b2d139)
1/**
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com
4 *
5 * Copyright 2008 Openmoko, Inc.
6 * Copyright 2008 Simtec Electronics
7 * Ben Dooks <ben@simtec.co.uk>
8 * http://armlinux.simtec.co.uk/

--- 3658 unchanged lines hidden (view full) ---

3667}
3668EXPORT_SYMBOL_GPL(s3c_hsotg_remove);
3669
3670int s3c_hsotg_suspend(struct dwc2_hsotg *hsotg)
3671{
3672 unsigned long flags;
3673 int ret = 0;
3674
1/**
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com
4 *
5 * Copyright 2008 Openmoko, Inc.
6 * Copyright 2008 Simtec Electronics
7 * Ben Dooks <ben@simtec.co.uk>
8 * http://armlinux.simtec.co.uk/

--- 3658 unchanged lines hidden (view full) ---

3667}
3668EXPORT_SYMBOL_GPL(s3c_hsotg_remove);
3669
3670int s3c_hsotg_suspend(struct dwc2_hsotg *hsotg)
3671{
3672 unsigned long flags;
3673 int ret = 0;
3674
3675 if (hsotg->lx_state != DWC2_L0)
3676 return ret;
3677
3675 mutex_lock(&hsotg->init_mutex);
3676
3677 if (hsotg->driver) {
3678 int ep;
3679
3680 dev_info(hsotg->dev, "suspending usb gadget %s\n",
3681 hsotg->driver->driver.name);
3682

--- 24 unchanged lines hidden (view full) ---

3707}
3708EXPORT_SYMBOL_GPL(s3c_hsotg_suspend);
3709
3710int s3c_hsotg_resume(struct dwc2_hsotg *hsotg)
3711{
3712 unsigned long flags;
3713 int ret = 0;
3714
3678 mutex_lock(&hsotg->init_mutex);
3679
3680 if (hsotg->driver) {
3681 int ep;
3682
3683 dev_info(hsotg->dev, "suspending usb gadget %s\n",
3684 hsotg->driver->driver.name);
3685

--- 24 unchanged lines hidden (view full) ---

3710}
3711EXPORT_SYMBOL_GPL(s3c_hsotg_suspend);
3712
3713int s3c_hsotg_resume(struct dwc2_hsotg *hsotg)
3714{
3715 unsigned long flags;
3716 int ret = 0;
3717
3718 if (hsotg->lx_state == DWC2_L2)
3719 return ret;
3720
3715 mutex_lock(&hsotg->init_mutex);
3716
3717 if (hsotg->driver) {
3718 dev_info(hsotg->dev, "resuming usb gadget %s\n",
3719 hsotg->driver->driver.name);
3720
3721 clk_enable(hsotg->clk);
3722 ret = regulator_bulk_enable(ARRAY_SIZE(hsotg->supplies),

--- 15 unchanged lines hidden ---
3721 mutex_lock(&hsotg->init_mutex);
3722
3723 if (hsotg->driver) {
3724 dev_info(hsotg->dev, "resuming usb gadget %s\n",
3725 hsotg->driver->driver.name);
3726
3727 clk_enable(hsotg->clk);
3728 ret = regulator_bulk_enable(ARRAY_SIZE(hsotg->supplies),

--- 15 unchanged lines hidden ---