From patchwork Thu Apr 7 13:20:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 65320 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp74910lbl; Thu, 7 Apr 2016 06:21:06 -0700 (PDT) X-Received: by 10.98.86.77 with SMTP id k74mr4687402pfb.28.1460035266778; Thu, 07 Apr 2016 06:21:06 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 16si88411pfo.244.2016.04.07.06.21.06; Thu, 07 Apr 2016 06:21:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756205AbcDGNVF (ORCPT + 13 others); Thu, 7 Apr 2016 09:21:05 -0400 Received: from mail-lf0-f52.google.com ([209.85.215.52]:35888 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751589AbcDGNVE (ORCPT ); Thu, 7 Apr 2016 09:21:04 -0400 Received: by mail-lf0-f52.google.com with SMTP id g184so56895669lfb.3 for ; Thu, 07 Apr 2016 06:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lvGZj/89FIsr0HKX4df5RDd27RXM0n4q9JE7/ZrVXAo=; b=AiAXotCGa5+X4oz6hhPbI9/xYlHqw9v37tjqXf+PSKJzowhJvEUGP6mu/QtE6Sr0Ll kgLqhxHsZ5sihn8HY/jKzjx3GY4xw5zcCBw2CeyDKYAke4F3HFhqnuhoACVQHjI+arys kxt/qQWt2fdAsNSnHJ29KBhh3fQDz4d+4F3VU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lvGZj/89FIsr0HKX4df5RDd27RXM0n4q9JE7/ZrVXAo=; b=QEzklnDFsIvpNhEDCXWgqVvW0cN5uruLCGioSIOr2eee9ln9C3kqWmm7YzWAA/rh3G rawMygbZSxPfmapCWDNL0/yCWKbyvP6cewmpS8uQ1xmwDa7mcTiAiteZS4pdn8E6cPNG rfsZ8wyILDMATrxSCsk+sKIy0JwtV/yXtvcV4szFwW0SV2Utt25VRbJM6ZuveQdJwaFx HOEUgUb52ENT6ryeG3Pb3gkqPbxGIrGIDrw8xrXGd6LdVUl4LSZmXuZ0tJMJe8d/LUos Xby+PkdLpTT+hF6jRv29xpvbO/jfRFwaU2qaA9zDxEG3x1v5A48jA6pt/XvSwx1Bx8KP sJcQ== X-Gm-Message-State: AD7BkJKq4DYQTSJEkmRoX2/6HGuGuhNX5tZg7ciCEdLblZGy7DN0E2COPW1u1yP5YjySVMUd X-Received: by 10.25.23.88 with SMTP id n85mr1156084lfi.3.1460035263168; Thu, 07 Apr 2016 06:21:03 -0700 (PDT) Received: from localhost.localdomain ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id e141sm1279018lfe.18.2016.04.07.06.21.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Apr 2016 06:21:02 -0700 (PDT) From: Linus Walleij To: "Rafael J. Wysocki" , Wolfram Sang , Mark Brown , Ulf Hansson Cc: linux-pm@vger.kernel.org, Linus Walleij Subject: [PATCH 3/3] RFC: spi: let SPI masters inherit suspend child ignorance Date: Thu, 7 Apr 2016 15:20:37 +0200 Message-Id: <1460035237-12037-4-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1460035237-12037-1-git-send-email-linus.walleij@linaro.org> References: <1460035237-12037-1-git-send-email-linus.walleij@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This patch is analogous to the I2C patch preceding it and the reasoning is the same for all slow busses where the master device should only wake up when messages get transferred rather than constantly babysitting its children. the master devices need to inherit the child ignorance from their hardware device (whether AMBA device or platform device etc) so that the children on the external bus see that they are actively ignored by their parent and can runtime_force_resume() from system suspend without getting an error code. Cc: Wolfram Sang Cc: Mark Brown Cc: Ulf Hansson Signed-off-by: Linus Walleij --- Mark: mostly trying to bring home a point here and fix it in all places if possible. No SPI master seems to be ignoring its children for the moment but I have a patch for the spi-pl022 doing this (ignoring its children) I just need to find a suitable test target. --- drivers/spi/spi.c | 1 + 1 file changed, 1 insertion(+) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index de2f2f90d799..48affabd170a 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1764,6 +1764,7 @@ struct spi_master *spi_alloc_master(struct device *dev, unsigned size) master->num_chipselect = 1; master->dev.class = &spi_master_class; master->dev.parent = dev; + pm_suspend_inherit_ignore_children(&master->dev); spi_master_set_devdata(master, &master[1]); return master;