From patchwork Mon Apr 11 11:51:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 65505 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp1420773lbl; Mon, 11 Apr 2016 04:51:54 -0700 (PDT) X-Received: by 10.66.65.201 with SMTP id z9mr32273113pas.143.1460375512337; Mon, 11 Apr 2016 04:51:52 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yk10si3272507pac.24.2016.04.11.04.51.52; Mon, 11 Apr 2016 04:51:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-spi-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-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-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 S1754594AbcDKLvT (ORCPT + 1 other); Mon, 11 Apr 2016 07:51:19 -0400 Received: from mail-lf0-f43.google.com ([209.85.215.43]:35549 "EHLO mail-lf0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754572AbcDKLvQ (ORCPT ); Mon, 11 Apr 2016 07:51:16 -0400 Received: by mail-lf0-f43.google.com with SMTP id c126so153001582lfb.2 for ; Mon, 11 Apr 2016 04:51:15 -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; bh=1+DFmcJpUf1ChBdx3PIaKuU+VPEpIv5B/Fjt/OnO34w=; b=FkzbzLQgvFnOrSpJYeIsH5a4R6Olvy3RfJXXp3h3teXPGVwHT02pEAJWDwv9Y3GzlJ QcPJrLoi4tHJp6xnwflNau/JnWEKxXfXMUpcBU5ra2YdAeqYGTUnE+/wIYR3BJpZ0les FAhYZhOrsQ22EbB+crlkTgz+X2V9u4yjBWjDY= 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; bh=1+DFmcJpUf1ChBdx3PIaKuU+VPEpIv5B/Fjt/OnO34w=; b=M9ud+8ZlFUuxuQ3u7mGw1oBEsultIXGSUV7Gd9Ni+yYomEa3ePg9HbqDQLKqevTy4E 6o2tEL/cHU5FqjvgEg/Ggf9Xe+X1/hYPQT1tO3i7KrDOqycAp0Cy7SXQRODQ4HejFhQ6 b20o1UtAK1o35pOcXmLiuK+E2TEwpE1bhAGBf55TRuehr3YY7zpX8AJZAZLTr70utMz+ zVXajW8TvME/cfacsqGnQvsrUPreUygwFqZ9abMCzHX/IReNM18yPDB8dCzsxyEHF5Kf CB12KiH/MRnWLvTVd5u6xoAgRB8QHNy7QbP+1BsMTzuYxw/5BdVHzBBCg7oJ+HyFRVgG pUzA== X-Gm-Message-State: AOPr4FXOqF0u5Uq6axtSsDrT+D85by1aQ49v94Tmr6wtg4uW4bFYMaoTzUbqiFhuGO1A1RIs X-Received: by 10.25.196.195 with SMTP id u186mr5599730lff.164.1460375474847; Mon, 11 Apr 2016 04:51:14 -0700 (PDT) Received: from localhost.localdomain ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id ug7sm4444130lbb.9.2016.04.11.04.51.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Apr 2016 04:51:13 -0700 (PDT) From: Linus Walleij To: Mark Brown , linux-spi@vger.kernel.org Cc: Linus Walleij , Wolfram Sang , Ulf Hansson , "Rafael J. Wysocki" , linux-pm@vger.kernel.org Subject: [PATCH] spi: let SPI masters ignore their children for PM Date: Mon, 11 Apr 2016 13:51:03 +0200 Message-Id: <1460375463-15557-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.3 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Let all SPI masters ignore their children: when it comes to power management: SPI children have no business doing keeping their parents awake: they are completely autonomous devices that just use their parent to talk, and the latter usecase must be power managed by the host itself on a per-message basis. Cc: Wolfram Sang Cc: Mark Brown Cc: Ulf Hansson Cc: Rafael J. Wysocki Cc: linux-pm@vger.kernel.org Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Change subject from "let SPI masters inherit suspend child ignorance" to "let SPI masters ignore their PM children" - Use the big hammer and do the sensible thing: mark all SPI masters as ignoring their children when it comes to power management. --- drivers/spi/spi.c | 1 + 1 file changed, 1 insertion(+) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Ulf Hansson diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index de2f2f90d799..6c4c050e6b65 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_ignore_children(&master->dev, true); spi_master_set_devdata(master, &master[1]); return master;