Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Josh Cartwright and committed by
Greg Kroah-Hartman
442d40a2 2415fc67

-35
-35
drivers/spmi/spmi.c
··· 46 46 .release = spmi_ctrl_release, 47 47 }; 48 48 49 - #ifdef CONFIG_PM_RUNTIME 50 - static 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 - 62 - static 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 - 75 - static 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 - 83 49 static int spmi_device_match(struct device *dev, struct device_driver *drv) 84 50 { 85 51 if (of_driver_match_device(dev, drv)) ··· 357 391 static struct bus_type spmi_bus_type = { 358 392 .name = "spmi", 359 393 .match = spmi_device_match, 360 - .pm = &spmi_pm_ops, 361 394 .probe = spmi_drv_probe, 362 395 .remove = spmi_drv_remove, 363 396 };