From patchwork Thu May 23 08:06:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 164944 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1865294ili; Thu, 23 May 2019 01:07:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTQCwv9hu2ytPg80cxaUoUKj2CnKg/pYul5YRMS61kVHPfkQbwI/pj+N8GUoqg8BLjipcf X-Received: by 2002:a17:902:3383:: with SMTP id b3mr50150538plc.193.1558598840137; Thu, 23 May 2019 01:07:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558598840; cv=none; d=google.com; s=arc-20160816; b=zeNuhdlntHEGNQm1gFpwZ3jY3x5Gwu61h2w4FeoCUhEPlEf9A3+Fi+h73tljiHqbRv 7oDl5+R9y8FUxgug/vckf+hyhuVigqzyc0Ep8Kx7HApZuCRLm+oYrWWI0lcyAPyqzWs9 g5Wvt44ZU04ik/4JGqPmqDtMASCdNJuQsQ8DAL3+PwMZx0/qAovZTl4/BsRaq73ETMCj +uC6zJrH3TC5cIFwz0MkPerksZggxkLwiDEuAy0YmfbZnzFsZbPe1/m2oVWhYBgD7Vsi hoikqvgNIGMam2L39KPAruuRoXGpTWFhuK1dkus1y7cDU37wreuAlpMOj01D8jWKOYK8 vZLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=hcBOC0mi7IP2Hq/sOwxuUJwQO0e5HPAWKceJ4HblTdg=; b=lrqqXI66QYJrQW6ryNVuk6QX8ETrV2/UdHSdWFn98jBd7ZhetrkmjsWKjixoC1v2k4 v2lExB0MFj8B/3Vb6y2MnDGOy+PK6tAwOb7dO6QVQDrEezcA3MoRfeFtIIRp2rhvilu2 GK25EhzbTmUWE6sqHDkBPIBwRfs+OhwuJifP6L5RjXJ50E2+mVnA9qilVWG7YEpbM/GM V/Sx2VTDGR2jnRyI6JpUf+KNMbw6BTfVKkVLGfJdxZKqBdC43ADXOFNm/RIzb6AdkCuZ Zjia2/MNt2Y6H0/rVBl+INzuwuURP84fvTRQKVWInIX5J3c1WFpDSUDITb80695CgMzU 2wwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eHfEHJnO; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q145si5634820pgq.525.2019.05.23.01.07.19; Thu, 23 May 2019 01:07:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eHfEHJnO; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726222AbfEWIHT (ORCPT + 5 others); Thu, 23 May 2019 04:07:19 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:42109 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727919AbfEWIHD (ORCPT ); Thu, 23 May 2019 04:07:03 -0400 Received: by mail-lf1-f67.google.com with SMTP id y13so3681734lfh.9 for ; Thu, 23 May 2019 01:07:01 -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:mime-version :content-transfer-encoding; bh=hcBOC0mi7IP2Hq/sOwxuUJwQO0e5HPAWKceJ4HblTdg=; b=eHfEHJnO2MZbw9tJoCVBFwylgmR8416RMuKgpx3Cyt1WurqmAr5UgP1NSxrPnh+4/a dlPgv9a5JhsiQJREg75fPamGCJP7dVacIysek39PDAmqc6gRBZX+P3Ar6tLbz4QATuzr +Hp2DCSudeLPyCQiA8p7cX1ME63asWEVn+xbXK4Z9eq45b+yt9V8IzEToFyyAoWUZ8x2 ApUrfnd3/7ZaEqOpJvGzS8IA8RcLGgqhF4TfnOugLJspeUtjH8ifapfCRnvTe8dU4/Pt mRfS/RYe0uIjqxpkSp6WczRHDo1m4FrZKdsNhU9bRgIGBJkH7XtNTt1yV3++XbwcSp8y Zfzw== 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:mime-version :content-transfer-encoding; bh=hcBOC0mi7IP2Hq/sOwxuUJwQO0e5HPAWKceJ4HblTdg=; b=oyybWasGMyNiwZa8LyOYwVrWk+jLobtbxMR8ipzVIdknzK/Hn3ioSqD0mcg8j3cWfT 4upREY2qiJIrbtVPSeHci1rtHholjTEwkkSX7i+XUctl9l2WTMwJU4AOvVnkpHLMxOhM gij4MSvL51tMPXCZeuQ4z0GSNRYqKXCKetMXAZcNC+t7Mgw+z9DiTRD9IAiuQYrbWNiq vjb0fqgdpFihgZIO4vIXiuG41b0FdQy/274ObMLEFDGjvZRdRj3sc0m82P3w7KmTThQM gg9cDdcWnOlmwOSwKt8ThRUYHKLcuTwR52eP7ZlhZ2Poy9rex/Uew0KrMLonhf2bI4+e l6vA== X-Gm-Message-State: APjAAAUP9d7vRROsrNnUEiM+LVADmijiwh048peYkh4neHk196xzk9x1 MundR/0I4moRf6c4MVSNmwSu5cNC1bU= X-Received: by 2002:a19:c517:: with SMTP id w23mr29859835lfe.73.1558598820638; Thu, 23 May 2019 01:07:00 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id o76sm6009498lfo.7.2019.05.23.01.06.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 May 2019 01:06:59 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Bjorn Andersson , Brian Masney , Lina Iyer , Stephen Boyd , Benjamin Gaignard Subject: [PATCH] pinctrl: qcom: Enable device links to consumers Date: Thu, 23 May 2019 10:06:54 +0200 Message-Id: <20190523080654.19155-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org A recent core change makes it possible to create device links between a pin controller and its consumers. This is necessary to ascertain the right suspend/resume order for the devices: if a device is using a certain pin control state and want to switch that before/after going to suspend, then the pin controller may not be suspended already, and conversely on the resume path. Make sure any qcom pin control consumers are suspended before the qcom pin control is suspended. Since Qualcomm is one of the few pin controllers implementing suspend/resume I suppose you will see this problem sooner or later so let's see if we can just fix it right now before you run into it. Cc: Bjorn Andersson Cc: Brian Masney Cc: Lina Iyer Cc: Stephen Boyd Cc: Benjamin Gaignard Signed-off-by: Linus Walleij --- You can test this patch by pulling in this branch: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/log/?h=consumer-links --- drivers/pinctrl/qcom/pinctrl-msm.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index ee8119879c4c..d4a6edbccdb9 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -1139,6 +1139,7 @@ int msm_pinctrl_probe(struct platform_device *pdev, pctrl->desc.name = dev_name(&pdev->dev); pctrl->desc.pins = pctrl->soc->pins; pctrl->desc.npins = pctrl->soc->npins; + pctrl->desc.link_consumers = true; pctrl->pctrl = devm_pinctrl_register(&pdev->dev, &pctrl->desc, pctrl); if (IS_ERR(pctrl->pctrl)) {