kernel: update 3.14 to 3.14.18
[15.05/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 --- a/drivers/spmi/spmi.c
20 +++ b/drivers/spmi/spmi.c
21 @@ -46,40 +46,6 @@ static const struct device_type spmi_ctr
22         .release        = spmi_ctrl_release,
23  };
24  
25 -#ifdef CONFIG_PM_RUNTIME
26 -static int spmi_runtime_suspend(struct device *dev)
27 -{
28 -       struct spmi_device *sdev = to_spmi_device(dev);
29 -       int err;
30 -
31 -       err = pm_generic_runtime_suspend(dev);
32 -       if (err)
33 -               return err;
34 -
35 -       return spmi_command_sleep(sdev);
36 -}
37 -
38 -static int spmi_runtime_resume(struct device *dev)
39 -{
40 -       struct spmi_device *sdev = to_spmi_device(dev);
41 -       int err;
42 -
43 -       err = spmi_command_wakeup(sdev);
44 -       if (err)
45 -               return err;
46 -
47 -       return pm_generic_runtime_resume(dev);
48 -}
49 -#endif
50 -
51 -static const struct dev_pm_ops spmi_pm_ops = {
52 -       SET_RUNTIME_PM_OPS(
53 -               spmi_runtime_suspend,
54 -               spmi_runtime_resume,
55 -               NULL
56 -       )
57 -};
58 -
59  static int spmi_device_match(struct device *dev, struct device_driver *drv)
60  {
61         if (of_driver_match_device(dev, drv))
62 @@ -391,7 +357,6 @@ static int spmi_drv_remove(struct device
63  static struct bus_type spmi_bus_type = {
64         .name           = "spmi",
65         .match          = spmi_device_match,
66 -       .pm             = &spmi_pm_ops,
67         .probe          = spmi_drv_probe,
68         .remove         = spmi_drv_remove,
69  };