aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/patches/0059-spmi-pm-drop-bus-level-PM-suspend-resume-routines.patch
blob: b8bb48cb4efda907d6374ffd5b464537291134c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
From 9d13f01e2ec45253adaae1a330cdc4eb881c7377 Mon Sep 17 00:00:00 2001
From: Josh Cartwright <joshc@codeaurora.org>
Date: Mon, 3 Mar 2014 10:49:44 -0600
Subject: [PATCH 059/182] spmi: pm: drop bus-level PM suspend/resume routines

SPMI defines the behavior of a device in the "SLEEP" state as being
"user-defined or specified by the device manufacturer".  Without
clearly-defined bus-level semantics for low-power states, push the
responsibility of transitioning a device into/out of "SLEEP" into SPMI
device drivers.

Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/spmi/spmi.c |   35 -----------------------------------
 1 file changed, 35 deletions(-)

--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -46,40 +46,6 @@ static const struct device_type spmi_ctr
 	.release	= spmi_ctrl_release,
 };
 
-#ifdef CONFIG_PM_RUNTIME
-static int spmi_runtime_suspend(struct device *dev)
-{
-	struct spmi_device *sdev = to_spmi_device(dev);
-	int err;
-
-	err = pm_generic_runtime_suspend(dev);
-	if (err)
-		return err;
-
-	return spmi_command_sleep(sdev);
-}
-
-static int spmi_runtime_resume(struct device *dev)
-{
-	struct spmi_device *sdev = to_spmi_device(dev);
-	int err;
-
-	err = spmi_command_wakeup(sdev);
-	if (err)
-		return err;
-
-	return pm_generic_runtime_resume(dev);
-}
-#endif
-
-static const struct dev_pm_ops spmi_pm_ops = {
-	SET_RUNTIME_PM_OPS(
-		spmi_runtime_suspend,
-		spmi_runtime_resume,
-		NULL
-	)
-};
-
 static int spmi_device_match(struct device *dev, struct device_driver *drv)
 {
 	if (of_driver_match_device(dev, drv))
@@ -391,7 +357,6 @@ static int spmi_drv_remove(struct device
 static struct bus_type spmi_bus_type = {
 	.name		= "spmi",
 	.match		= spmi_device_match,
-	.pm		= &spmi_pm_ops,
 	.probe		= spmi_drv_probe,
 	.remove		= spmi_drv_remove,
 };