f252fa055b42708649ea108058acd3b7f69a6283
[openwrt.git] / target / linux / ipq806x / patches / 0059-spmi-pm-drop-bus-level-PM-suspend-resume-routines.patch
1 From 9d13f01e2ec45253adaae1a330cdc4eb881c7377 Mon Sep 17 00:00:00 2001
2 From: Josh Cartwright <joshc@codeaurora.org>
3 Date: Mon, 3 Mar 2014 10:49:44 -0600
4 Subject: [PATCH 059/182] spmi: pm: drop bus-level PM suspend/resume routines
5
6 SPMI defines the behavior of a device in the "SLEEP" state as being
7 "user-defined or specified by the device manufacturer".  Without
8 clearly-defined bus-level semantics for low-power states, push the
9 responsibility of transitioning a device into/out of "SLEEP" into SPMI
10 device drivers.
11
12 Cc: Felipe Balbi <balbi@ti.com>
13 Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
14 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15 ---
16  drivers/spmi/spmi.c |   35 -----------------------------------
17  1 file changed, 35 deletions(-)
18
19 diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
20 index 6122c8f..3b57807 100644
21 --- a/drivers/spmi/spmi.c
22 +++ b/drivers/spmi/spmi.c
23 @@ -46,40 +46,6 @@ static const struct device_type spmi_ctrl_type = {
24         .release        = spmi_ctrl_release,
25  };
26  
27 -#ifdef CONFIG_PM_RUNTIME
28 -static int spmi_runtime_suspend(struct device *dev)
29 -{
30 -       struct spmi_device *sdev = to_spmi_device(dev);
31 -       int err;
32 -
33 -       err = pm_generic_runtime_suspend(dev);
34 -       if (err)
35 -               return err;
36 -
37 -       return spmi_command_sleep(sdev);
38 -}
39 -
40 -static int spmi_runtime_resume(struct device *dev)
41 -{
42 -       struct spmi_device *sdev = to_spmi_device(dev);
43 -       int err;
44 -
45 -       err = spmi_command_wakeup(sdev);
46 -       if (err)
47 -               return err;
48 -
49 -       return pm_generic_runtime_resume(dev);
50 -}
51 -#endif
52 -
53 -static const struct dev_pm_ops spmi_pm_ops = {
54 -       SET_RUNTIME_PM_OPS(
55 -               spmi_runtime_suspend,
56 -               spmi_runtime_resume,
57 -               NULL
58 -       )
59 -};
60 -
61  static int spmi_device_match(struct device *dev, struct device_driver *drv)
62  {
63         if (of_driver_match_device(dev, drv))
64 @@ -391,7 +357,6 @@ static int spmi_drv_remove(struct device *dev)
65  static struct bus_type spmi_bus_type = {
66         .name           = "spmi",
67         .match          = spmi_device_match,
68 -       .pm             = &spmi_pm_ops,
69         .probe          = spmi_drv_probe,
70         .remove         = spmi_drv_remove,
71  };
72 -- 
73 1.7.10.4
74