aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Cartwright <joshc@codeaurora.org>2014-03-03 11:49:44 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-09 01:15:52 -0500
commit442d40a28ea8584771118b9af48127ef1d1ca9cb (patch)
treec4fb724b8ec1af8464cb0e6aae8729f9d3693e00
parent2415fc67686621bce7ce020f19408a3987401d8a (diff)
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>
-rw-r--r--drivers/spmi/spmi.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index 6122c8f2f4e3..3b5780710d50 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -46,40 +46,6 @@ static const struct device_type spmi_ctrl_type = {
46 .release = spmi_ctrl_release, 46 .release = spmi_ctrl_release,
47}; 47};
48 48
49#ifdef CONFIG_PM_RUNTIME
50static int spmi_runtime_suspend(struct device *dev)
51{
52 struct spmi_device *sdev = to_spmi_device(dev);
53 int err;
54
55 err = pm_generic_runtime_suspend(dev);
56 if (err)
57 return err;
58
59 return spmi_command_sleep(sdev);
60}
61
62static int spmi_runtime_resume(struct device *dev)
63{
64 struct spmi_device *sdev = to_spmi_device(dev);
65 int err;
66
67 err = spmi_command_wakeup(sdev);
68 if (err)
69 return err;
70
71 return pm_generic_runtime_resume(dev);
72}
73#endif
74
75static const struct dev_pm_ops spmi_pm_ops = {
76 SET_RUNTIME_PM_OPS(
77 spmi_runtime_suspend,
78 spmi_runtime_resume,
79 NULL
80 )
81};
82
83static int spmi_device_match(struct device *dev, struct device_driver *drv) 49static int spmi_device_match(struct device *dev, struct device_driver *drv)
84{ 50{
85 if (of_driver_match_device(dev, drv)) 51 if (of_driver_match_device(dev, drv))
@@ -391,7 +357,6 @@ static int spmi_drv_remove(struct device *dev)
391static struct bus_type spmi_bus_type = { 357static struct bus_type spmi_bus_type = {
392 .name = "spmi", 358 .name = "spmi",
393 .match = spmi_device_match, 359 .match = spmi_device_match,
394 .pm = &spmi_pm_ops,
395 .probe = spmi_drv_probe, 360 .probe = spmi_drv_probe,
396 .remove = spmi_drv_remove, 361 .remove = spmi_drv_remove,
397}; 362};