aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/omap_hsi
diff options
context:
space:
mode:
authorZiyann <jaraidaniel@gmail.com>2014-07-11 12:38:51 +0200
committerZiyann <jaraidaniel@gmail.com>2014-11-19 21:12:45 +0100
commitc93d3931edb2ece1f7cc05146b996d1614aef86f (patch)
tree48862e25890c4794393adb2e6d6bc51cd07ed3af /drivers/omap_hsi
parent893e1f46b96f1bdd562ce77103f5dfe5d91d649b (diff)
downloadkernel_samsung_tuna-c93d3931edb2ece1f7cc05146b996d1614aef86f.zip
kernel_samsung_tuna-c93d3931edb2ece1f7cc05146b996d1614aef86f.tar.gz
kernel_samsung_tuna-c93d3931edb2ece1f7cc05146b996d1614aef86f.tar.bz2
Revert "OMAP4: HSI: mux: remove unused mux platform data"
This reverts commit 638b74f2f7800f5c3ea81f9157e823b01c26143f.
Diffstat (limited to 'drivers/omap_hsi')
-rwxr-xr-xdrivers/omap_hsi/hsi_driver.c20
-rwxr-xr-xdrivers/omap_hsi/hsi_driver.h2
2 files changed, 19 insertions, 3 deletions
diff --git a/drivers/omap_hsi/hsi_driver.c b/drivers/omap_hsi/hsi_driver.c
index 310cf02..4d5758c4 100755
--- a/drivers/omap_hsi/hsi_driver.c
+++ b/drivers/omap_hsi/hsi_driver.c
@@ -1074,8 +1074,7 @@ static int hsi_pm_resume(struct device *dev)
/* Perform (optional) HSI board specific action after platform wakeup */
if (pdata->board_resume)
for (i = 0; i < hsi_ctrl->max_p; i++)
- pdata->board_resume(hsi_ctrl->hsi_port[i].port_number,
- device_may_wakeup(dev));
+ pdata->board_resume(hsi_ctrl->hsi_port[i].port_number);
return 0;
}
@@ -1090,8 +1089,10 @@ static int hsi_pm_resume(struct device *dev)
*/
int hsi_runtime_resume(struct device *dev)
{
+ struct hsi_platform_data *pdata = dev_get_platdata(dev);
struct platform_device *pd = to_platform_device(dev);
struct hsi_dev *hsi_ctrl = platform_get_drvdata(pd);
+ unsigned int i;
dev_dbg(dev, "%s\n", __func__);
@@ -1106,6 +1107,10 @@ int hsi_runtime_resume(struct device *dev)
/* Allow data reception */
hsi_hsr_resume(hsi_ctrl);
+ /* When HSI is ON, no need for IO wakeup mechanism on any HSI port */
+ for (i = 0; i < hsi_ctrl->max_p; i++)
+ pdata->wakeup_disable(hsi_ctrl->hsi_port[i].port_number);
+
/* HSI device is now fully operational and _must_ be able to */
/* complete I/O operations */
@@ -1122,8 +1127,10 @@ int hsi_runtime_resume(struct device *dev)
*/
int hsi_runtime_suspend(struct device *dev)
{
+ struct hsi_platform_data *pdata = dev_get_platdata(dev);
struct platform_device *pd = to_platform_device(dev);
struct hsi_dev *hsi_ctrl = platform_get_drvdata(pd);
+ int i;
dev_dbg(dev, "%s\n", __func__);
@@ -1133,6 +1140,15 @@ int hsi_runtime_suspend(struct device *dev)
/* Forbid data reception */
hsi_hsr_suspend(hsi_ctrl);
+ /* HSI is going to IDLE, it needs IO wakeup mechanism enabled */
+ if (device_may_wakeup(dev))
+ for (i = 0; i < hsi_ctrl->max_p; i++)
+ pdata->wakeup_enable(hsi_ctrl->hsi_port[i].port_number);
+ else
+ for (i = 0; i < hsi_ctrl->max_p; i++)
+ pdata->wakeup_disable(
+ hsi_ctrl->hsi_port[i].port_number);
+
/* HSI is now ready to be put in low power state */
return 0;
diff --git a/drivers/omap_hsi/hsi_driver.h b/drivers/omap_hsi/hsi_driver.h
index 73f86de..226fe15 100755
--- a/drivers/omap_hsi/hsi_driver.h
+++ b/drivers/omap_hsi/hsi_driver.h
@@ -231,7 +231,7 @@ struct hsi_platform_data {
int (*wakeup_disable) (int hsi_port);
bool (*wakeup_is_from_hsi) (int *hsi_port);
int (*board_suspend)(int hsi_port, bool dev_may_wakeup);
- int (*board_resume)(int hsi_port, bool dev_may_wakeup);
+ int (*board_resume)(int hsi_port);
u8 num_ports;
struct hsi_ctrl_ctx *ctx;
u8 hsi_gdd_chan_count;