From patchwork Mon Mar 3 16:49:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Cartwright X-Patchwork-Id: 3755691 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4164C9F39B for ; Mon, 3 Mar 2014 16:52:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 613B4203ED for ; Mon, 3 Mar 2014 16:52:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 88C04203DF for ; Mon, 3 Mar 2014 16:52:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753120AbaCCQwb (ORCPT ); Mon, 3 Mar 2014 11:52:31 -0500 Received: from smtp.codeaurora.org ([198.145.11.231]:53813 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751494AbaCCQwa (ORCPT ); Mon, 3 Mar 2014 11:52:30 -0500 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 4B40C13EF1E; Mon, 3 Mar 2014 16:52:30 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 3D72413F121; Mon, 3 Mar 2014 16:52:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from joshc.qualcomm.com (rrcs-67-52-129-61.west.biz.rr.com [67.52.129.61]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: joshc@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id BAC2413EF67; Mon, 3 Mar 2014 16:52:29 +0000 (UTC) Received: by joshc.qualcomm.com (Postfix, from userid 1000) id E55F463544; Mon, 3 Mar 2014 10:49:44 -0600 (CST) From: Josh Cartwright To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org, Felipe Balbi Subject: [PATCH 2/2] spmi: pm: drop bus-level PM suspend/resume routines Date: Mon, 3 Mar 2014 10:49:44 -0600 Message-Id: <1393865384-28145-2-git-send-email-joshc@codeaurora.org> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1393865384-28145-1-git-send-email-joshc@codeaurora.org> References: <1393865384-28145-1-git-send-email-joshc@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Josh Cartwright --- drivers/spmi/spmi.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c index 6122c8f..3b57807 100644 --- a/drivers/spmi/spmi.c +++ b/drivers/spmi/spmi.c @@ -46,40 +46,6 @@ static const struct device_type spmi_ctrl_type = { .release = spmi_ctrl_release, }; -#ifdef CONFIG_PM_RUNTIME -static int spmi_runtime_suspend(struct device *dev) -{ - struct spmi_device *sdev = to_spmi_device(dev); - int err; - - err = pm_generic_runtime_suspend(dev); - if (err) - return err; - - return spmi_command_sleep(sdev); -} - -static int spmi_runtime_resume(struct device *dev) -{ - struct spmi_device *sdev = to_spmi_device(dev); - int err; - - err = spmi_command_wakeup(sdev); - if (err) - return err; - - return pm_generic_runtime_resume(dev); -} -#endif - -static const struct dev_pm_ops spmi_pm_ops = { - SET_RUNTIME_PM_OPS( - spmi_runtime_suspend, - spmi_runtime_resume, - NULL - ) -}; - static int spmi_device_match(struct device *dev, struct device_driver *drv) { if (of_driver_match_device(dev, drv)) @@ -391,7 +357,6 @@ static int spmi_drv_remove(struct device *dev) static struct bus_type spmi_bus_type = { .name = "spmi", .match = spmi_device_match, - .pm = &spmi_pm_ops, .probe = spmi_drv_probe, .remove = spmi_drv_remove, };