From patchwork Thu Apr 26 08:52:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 134423 Delivered-To: patches@linaro.org Received: by 10.46.151.6 with SMTP id r6csp1973221lji; Thu, 26 Apr 2018 01:53:15 -0700 (PDT) X-Received: by 10.46.3.17 with SMTP id 17mr15092106ljd.91.1524732795249; Thu, 26 Apr 2018 01:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524732795; cv=none; d=google.com; s=arc-20160816; b=v0pfzKfA2wfoZPef2qiourM7/6ZYg51N3X6zf/niE+UXAgwtlPQ23rD1XlMp2QbHqn 4ejfFekcoFbND0Ly3NHl2E61oqpp9xxJYh6+JioZgi/WW2Y5+mc4h6FX8l2W5hOpxkjy O/E4Leoq+bKjW8XAssO9SjAsde1G7WjTaAZjYH8wbuQHImUHKMEGXwem0uwAPNFDXwDJ vQ0AFeLJ/VNkY3GYjLMDz6sHxXx3j5h2UagjKa88AhqnSpc9yT7kgU77zdweEDqhy7GG /U2NStWkWvgkOLkJCKDWWn0h6W0XroHc9RS8b2u3T5K1CFZhItuWECRlUrsMc8tR5W17 XgVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=BKyv6xwF8Xm1RgBOJm9c8M4cgM43KKWLhCuI4xFY+ho=; b=UdR0ndxEANskRGHWPKCTs0EDmUhpRqRrw2nX2q5xA5dssc+iWmZdJz1W9NdTr+CAf0 US8/s3Ie+rBh0o+PkIQLG9fCOJZc9d5VoaLUITfPauuaH27Axj4B91i+7JTTJXh6TZGP K79e0DdLl86++d4mvocc/4jiPqhGxg1nrxcZgY21TXV2cqtWDJPOZBKJbAuYXKvmhcnB mbf9VTcEdP5Blj8e+iWhF2ppQOCNv0IkOk5goIDcmCn9MJnUrSEUQhM0ZsLM16L8yMz6 mUsDujG8NvsAQU1yOaXuQRXdzyEHEGi3XTUV8Qqi+ci5k0LoSw4fI+xRNlaeK3wgriXB JZ+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h3H6rFI2; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id i27-v6sor4628120lfk.107.2018.04.26.01.53.15 for (Google Transport Security); Thu, 26 Apr 2018 01:53:15 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h3H6rFI2; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=BKyv6xwF8Xm1RgBOJm9c8M4cgM43KKWLhCuI4xFY+ho=; b=h3H6rFI2s177eeJKi9yBr6LgYt3lXnJgC115vB/fU8NSjBsEOM47CBvY9ctSXkSTuv PnJT7YT3LTA44UfK1HqBWphG6hHeFeWA5E2PefFPErVaqT+0+m7AxDyx0CtNO3d5ryNZ PokKyhaAH4JpGc8kNRBg9uCed1b0kyl+rWPZ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BKyv6xwF8Xm1RgBOJm9c8M4cgM43KKWLhCuI4xFY+ho=; b=dcPcKlml9TDOxQoKyWhg+XBUyGAWOO5Yftf3P3Km59ntJPRT1BKsnnrdBkaA9xYGhN /ACDoxz9tkA9L2xvJrbTRST80DHEFlZHrgSdXuDF2qo7OL/BLBG/2J9AMWQe5ln/LrwC 0NVo1BhjlVMXtCFMO21na3OM3EieqjAZZ1Kt9CnMEXNwtmurK8QkNLOj3QawWpPr8fUW bv7lFnmv1b7GS0M9osuEYloJBf2WuEyndzZJhbpRGHcUX1wf4Q5y0C+DaKk6+KU8cgWn 5nC2wb87vp8nRbaJe3iC3jS0v8tcNoUmRrO/PLpFO6hcv2wM05PwKy9Fbrvx+L6I3kU1 uddA== X-Gm-Message-State: ALQs6tCLFzhfwByiUHc7xjADPHsqainAmRQH2bWpRlEo6LqKiBT0aet/ kv18kgp7GOeWKm7aEeC8wyHCHdRt X-Google-Smtp-Source: AB8JxZr/9HZ4K2rf7hHC9GQ6n+NLAr97l5Bpo+qeyWNTLtXZO766NNEUdd2y6H0U6skrYIBd7Y10pw== X-Received: by 2002:a19:5791:: with SMTP id l139-v6mr13900246lfb.46.1524732794899; Thu, 26 Apr 2018 01:53:14 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id u83-v6sm681097lff.65.2018.04.26.01.53.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Apr 2018 01:53:14 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , Greg Kroah-Hartman , linux-pm@vger.kernel.org Cc: Ulf Hansson , Kevin Hilman , Geert Uytterhoeven , Viresh Kumar , Vincent Guittot , Mark Brown , Vinod Koul , Sanyog Kale , Pierre-Louis Bossart , Wolfram Sang , Russell King , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 00/11] PM / Domains: Fixup error paths with dev_pm_domain_attach() Date: Thu, 26 Apr 2018 10:52:59 +0200 Message-Id: <1524732790-2234-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 While I was on working adding support for multiple PM domains to genpd, I stumbled over several problems in the error path related to dev_pm_domain_attach(). Hence, I decided to fix these problems first, which is what this series intends to address. There first patch is material for stable, as it fixes a real bug in genpd, while the rest may be considered as improvement of the error paths when devices fails to be attached to their PM domains. I am seeking acks from subsystem maintainers and suggest with funnel the hole series through Rafael's linux-pm tree, unless there are objections to that of course. Ulf Hansson (11): PM / Domains: Fix error path during attach in genpd PM / Domains: Drop comment in genpd about legacy Samsung DT binding PM / Domains: Drop redundant code in genpd while attaching devices PM / Domains: Check for existing PM domain in dev_pm_domain_attach() PM / Domains: Allow a better error handling of dev_pm_domain_attach() amba: Respect all error codes from dev_pm_domain_attach() driver core: Respect all error codes from dev_pm_domain_attach() i2c: Respect all error codes from dev_pm_domain_attach() mmc: sdio: Respect all error codes from dev_pm_domain_attach() soundwire: Respect all error codes from dev_pm_domain_attach() spi: Respect all error codes from dev_pm_domain_attach() drivers/acpi/device_pm.c | 9 +++------ drivers/amba/bus.c | 4 ++-- drivers/base/platform.c | 17 ++++++++--------- drivers/base/power/common.c | 10 +++++++--- drivers/base/power/domain.c | 45 +++++++++++++++----------------------------- drivers/i2c/i2c-core-base.c | 2 +- drivers/mmc/core/sdio_bus.c | 2 +- drivers/soundwire/bus_type.c | 15 +++++++-------- drivers/spi/spi.c | 11 ++++++----- include/linux/acpi.h | 2 +- include/linux/pm_domain.h | 2 +- 11 files changed, 52 insertions(+), 67 deletions(-) -- 2.7.4