0059-spmi-pm-drop-bus-level-PM-suspend-resume-routines.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. From 9d13f01e2ec45253adaae1a330cdc4eb881c7377 Mon Sep 17 00:00:00 2001
  2. From: Josh Cartwright <[email protected]>
  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. SPMI defines the behavior of a device in the "SLEEP" state as being
  6. "user-defined or specified by the device manufacturer". Without
  7. clearly-defined bus-level semantics for low-power states, push the
  8. responsibility of transitioning a device into/out of "SLEEP" into SPMI
  9. device drivers.
  10. Cc: Felipe Balbi <[email protected]>
  11. Signed-off-by: Josh Cartwright <[email protected]>
  12. Signed-off-by: Greg Kroah-Hartman <[email protected]>
  13. ---
  14. drivers/spmi/spmi.c | 35 -----------------------------------
  15. 1 file changed, 35 deletions(-)
  16. --- a/drivers/spmi/spmi.c
  17. +++ b/drivers/spmi/spmi.c
  18. @@ -46,40 +46,6 @@ static const struct device_type spmi_ctr
  19. .release = spmi_ctrl_release,
  20. };
  21. -#ifdef CONFIG_PM_RUNTIME
  22. -static int spmi_runtime_suspend(struct device *dev)
  23. -{
  24. - struct spmi_device *sdev = to_spmi_device(dev);
  25. - int err;
  26. -
  27. - err = pm_generic_runtime_suspend(dev);
  28. - if (err)
  29. - return err;
  30. -
  31. - return spmi_command_sleep(sdev);
  32. -}
  33. -
  34. -static int spmi_runtime_resume(struct device *dev)
  35. -{
  36. - struct spmi_device *sdev = to_spmi_device(dev);
  37. - int err;
  38. -
  39. - err = spmi_command_wakeup(sdev);
  40. - if (err)
  41. - return err;
  42. -
  43. - return pm_generic_runtime_resume(dev);
  44. -}
  45. -#endif
  46. -
  47. -static const struct dev_pm_ops spmi_pm_ops = {
  48. - SET_RUNTIME_PM_OPS(
  49. - spmi_runtime_suspend,
  50. - spmi_runtime_resume,
  51. - NULL
  52. - )
  53. -};
  54. -
  55. static int spmi_device_match(struct device *dev, struct device_driver *drv)
  56. {
  57. if (of_driver_match_device(dev, drv))
  58. @@ -391,7 +357,6 @@ static int spmi_drv_remove(struct device
  59. static struct bus_type spmi_bus_type = {
  60. .name = "spmi",
  61. .match = spmi_device_match,
  62. - .pm = &spmi_pm_ops,
  63. .probe = spmi_drv_probe,
  64. .remove = spmi_drv_remove,
  65. };