Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp479242lqp; Mon, 10 Jun 2024 09:37:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUHiU46U204L9Ou0sDWOT3xDO9iLS4kFoKOUlXJiaLmtBNs/hNAVIXezIQBMs24gbQW1apDdPAQbRru/ZhezwZ+WAadwoPqVo/s6WV1PA== X-Google-Smtp-Source: AGHT+IGpKF55DAfm3I0EvZVOjCRb64eOPHYhFyMWf/C93QY1c/3Dqtb+CodIzzdC7OMvjXBAOBHU X-Received: by 2002:aa7:88c8:0:b0:6f3:e6d6:7fde with SMTP id d2e1a72fcca58-7040c738f23mr12508965b3a.26.1718037441067; Mon, 10 Jun 2024 09:37:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718037441; cv=pass; d=google.com; s=arc-20160816; b=sUW3M53dEwcwPFn4xJ8hpvurWbVffEwfjwh7IZYx1EdxstW7TtsiTsm0fEobv2L2yw TJwOGPoL0EUPBbYEfMWsBt2BHmCJRXMoeHJGMsJE3rToA7xLO0+9Dic4c0o7ZDof2Bp6 PUS7ruBavlzuOyNMOF2EUzhcWCxGbhq4a2fZKk663A/IYhyWL4UGpBcO+GseexPKxwmf TcBZzSDFQHNdMYMeUBcO+Qx4ZQ9dqEwh6pAtMxAfXg6Cz5oQoI5oMvJG+MmQ5Whd6OoC g0/o6S/lk54jLH0EubEBMbkbbprzea+Ss5ro1GNgd8/0pYdcPJ5D20GCCWg7juNQO7Ux rhHg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=IrfSjnwxqc0Uz7WM4Z+0VwCDyHj4O4ZPqDfD8wg1X5A=; fh=h87d568y1WIyvEBUXz43yOf2pKIrIAHT3B0v+2PMnmc=; b=JbO5JQlnmGmuIwjpDD5edLygkcWgB0kgHVEVkrxjlLtY7NYQBbOn5Bpgt5yfG6/TMK v5/NCSc2NvmgeFxUTJGO/q8GiLVBWEA6XWP43Gw02xBZR4q4fqkTE5o3R7vi6brV/wAh oXjFA7QZW4HmrTO2TvNR4VV7E3/qfFZU+adBH42phIBZUkQnHQOy7t3CpwtXy+xLrpqE PXuTwbohYUMUzHUsyF/Vs7JMWx+HGl5p0dBKltsTnPBvPuqqWhvdme+e6je2SVGimr0l nmaEyOxA1WgkCw92gcY/DOpTUHVgK93PLWIW+zq0LbMWeAFLbyXOsmCLAQzD8Q75WXU7 OzSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=nIRu0Olz; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-208335-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208335-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e3ee858959si5357897a12.825.2024.06.10.09.37.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 09:37:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208335-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=nIRu0Olz; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-208335-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208335-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 25CC228E5A9 for ; Mon, 10 Jun 2024 14:10:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63AAE144D19; Mon, 10 Jun 2024 14:07:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="nIRu0Olz" Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85C0F13DDD9 for ; Mon, 10 Jun 2024 14:07:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718028443; cv=none; b=XzEJ/7fFBLClbQoAlqtpb9w/v3+Aq36F/yHKLWvYTCBw8QlHKD3nsyiDQM8DPE0MPWPeRTb0VW02FIWFGwgsPxh73Chu27D8r9zA3ELEjCNcvoXl9PjC9JbY4K3TdlKGX9W0V/1unWMxbAqxlNK639Jp639MQI4nM+kKrVKxkXo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718028443; c=relaxed/simple; bh=KJTo9yqBxdXCQ6jSMX21Mq8qnuooJPm4rNa/zh0tccs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=NmCS3572O7sXyZ3fc0pEZiLipgstQ8P/p/r8mqrLaKcoE5NmwT2o0PUjDuQnKlXnLOVDQ+ZVoMSnklOhribkxzI11Ovt3D0NWGfsL8yrA46RsbU6KGiWwjpfM/fs8juvvRVK7EHIHsPibm80aVA4/htE4/60FKeIPE00KI3Rgek= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=nIRu0Olz; arc=none smtp.client-ip=209.85.208.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2e78fe9fc2bso64184801fa.3 for ; Mon, 10 Jun 2024 07:07:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1718028439; x=1718633239; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=IrfSjnwxqc0Uz7WM4Z+0VwCDyHj4O4ZPqDfD8wg1X5A=; b=nIRu0OlzefH1RUBwL2SpbvKvz6+6atsY5VNR+KoxsbhCLwi38buwQX4M049LLaooTV dFRNUM/GVy7HmnWLKDUGTp4wwAcyBNrPU/ZXoY4BLK2416OvslMnKFQIHO0UYUyFlOmy H4JrMFldz0J5nzS8So0WzeDNyJJNw7SR3wmh3L5bFau1on04yRgT1714MU+Lymud/zY5 uROx6ni67BcBnks9+z5zTnMA5yfkdFwK4eHL6x9+POGTRFjKmoWPc9Aq3VysngEBl52h FfezpnzUW+arVQjjouyN/cIoLUcNWU4UFdBQ3sAIHCbd8HikVVsSAATp0UIEudOO2O9S PKVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718028439; x=1718633239; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IrfSjnwxqc0Uz7WM4Z+0VwCDyHj4O4ZPqDfD8wg1X5A=; b=HAfKdxyxTG4Prm2pucAJvd8CaORjte94o6kajX8/f4JJLt01a+vO91MDjJeb7WCqQX 1wiNtPPgiPh/BGsaqUZXOA3etC4irOglus56YHiDqf/dgPv8Dd4XLxOWKV/y1Vyein11 DR+epBa6G93K4pyHwlzg9XVqW5NA9wua6cDHdMER6vCstsp5lRshnycVrLMMAHa/pXrB IxI9rqKU9276uBh/4sd0DBVJz8vSAOT5pROTVbAy/kK+K+MeVDzYpoZdHb/47bSAyn3k xlT02ZZ9TTVP3dwWZa1d+unA6HImDaDTWd0YDkT1CDU+bvCTMNRSRBMveZSge/fs9hg0 alGA== X-Forwarded-Encrypted: i=1; AJvYcCWdEPd+5z/tOaxZTPfK/XfI/rRDNVP1ATerERmbaSr1XBl3uY2RZy2T2eU5DKEIp0hDS5kUCu/MWmx+z4RrInOyEOQtqD8JX6Uov1lH X-Gm-Message-State: AOJu0Yy6lypYjkYprvgXvn+ACDxrgit934KLeZEO1sonWyak/IxHHwDX BzWPSfP6Rt/pxs2WGaMDT6K4P1E7+UybiAUpDCLH+OA+ZSNq/DkBbGslWlte9DiPKQqCjM/D2tH CTOrpKodEDDF1S1retLOBPtehMvYxbQG31H2qBQ== X-Received: by 2002:a2e:a601:0:b0:2ea:8174:231b with SMTP id 38308e7fff4ca-2eadce1609cmr64703571fa.2.1718028438671; Mon, 10 Jun 2024 07:07:18 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240605123850.24857-1-brgl@bgdev.pl> In-Reply-To: <20240605123850.24857-1-brgl@bgdev.pl> From: Bartosz Golaszewski Date: Mon, 10 Jun 2024 16:07:07 +0200 Message-ID: Subject: Re: [PATCH v9 0/2] pwrseq: introduce the subsystem and first driver To: Marcel Holtmann , Luiz Augusto von Dentz , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kalle Valo , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Catalin Marinas , Will Deacon , Bjorn Helgaas , Bartosz Golaszewski , Saravana Kannan , Geert Uytterhoeven , Arnd Bergmann , Neil Armstrong , Marek Szyprowski , Alex Elder , Srini Kandagatla , Greg Kroah-Hartman , Abel Vesa , Manivannan Sadhasivam , Lukas Wunner , Dmitry Baryshkov , Amit Pundir , Xilin Wu Cc: linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jun 5, 2024 at 2:39=E2=80=AFPM Bartosz Golaszewski = wrote: > > From: Bartosz Golaszewski > > Hi! > > These are the power sequencing patches sent separately after some > improvements suggested by Bjorn Helgaas. I intend to pick them up into a > new branch and maintain the subsystem from now on. I then plan to > provide an immutable tag to the Bluetooth and PCI subsystems so that the > rest of the C changes can be applied. This new branch will then be > directly sent to Linus Torvalds for the next merge window. > > Changelog: > > Since v8: > - split the pwrseq patches out into their own series > - rename incref/decref functions to get/put for consistency > - fix typos > - make it very explicit in docs that arrays of targets and units must be > NULL-terminated > - Link to v8: https://lore.kernel.org/r/20240528-pwrseq-v8-0-d354d52b763c= @linaro.org > > Since v7: > - added DTS changes for sm8650-hdk > - added circular dependency detection for pwrseq units > - fixed a KASAN reported use-after-free error in remove path > - improve Kconfig descriptions > - fix typos in bindings and Kconfig > - fixed issues reported by smatch > - fix the unbind path in PCI pwrctl > - lots of minor improvements to the pwrseq core > > Since v6: > - kernel doc fixes > - drop myself from the DT bindings maintainers list for ath12k > - wait until the PCI bridge device is fully added before creating the > PCI pwrctl platform devices for its sub-nodes, otherwise we may see > sysfs and procfs attribute failures (due to duplication, we're > basically trying to probe the same device twice at the same time) > - I kept the regulators for QCA6390's ath11k as required as they only > apply to this specific Qualcomm package > > Since v5: > - unify the approach to modelling the WCN WLAN/BT chips by always exposin= g > the PMU node on the device tree and making the WLAN and BT nodes become > consumers of its power outputs; this includes a major rework of the DT > sources, bindings and driver code; there's no more a separate PCI > pwrctl driver for WCN7850, instead its power-up sequence was moved > into the pwrseq driver common for all WCN chips > - don't set load_uA from new regulator consumers > - fix reported kerneldoc issues > - drop voltage ranges for PMU outputs from DT > - many minor tweaks and reworks > > v1: Original RFC: > > https://lore.kernel.org/lkml/20240104130123.37115-1-brgl@bgdev.pl/T/ > > v2: First real patch series (should have been PATCH v2) adding what I > referred to back then as PCI power sequencing: > > https://lore.kernel.org/linux-arm-kernel/2024021413-grumbling-unlivable-c= 145@gregkh/T/ > > v3: RFC for the DT representation of the PMU supplying the WLAN and BT > modules inside the QCA6391 package (was largely separate from the > series but probably should have been called PATCH or RFC v3): > > https://lore.kernel.org/all/CAMRc=3DMc+GNoi57eTQg71DXkQKjdaoAmCpB=3Dh2ndE= pGnmdhVV-Q@mail.gmail.com/T/ > > v4: Second attempt at the full series with changed scope (introduction of > the pwrseq subsystem, should have been RFC v4) > > https://lore.kernel.org/lkml/20240201155532.49707-1-brgl@bgdev.pl/T/ > > v5: Two different ways of handling QCA6390 and WCN7850: > > https://lore.kernel.org/lkml/20240216203215.40870-1-brgl@bgdev.pl/ > > Bartosz Golaszewski (2): > power: sequencing: implement the pwrseq core > power: pwrseq: add a driver for the PMU module on the QCom WCN > chipsets > > MAINTAINERS | 8 + > drivers/power/Kconfig | 1 + > drivers/power/Makefile | 1 + > drivers/power/sequencing/Kconfig | 29 + > drivers/power/sequencing/Makefile | 6 + > drivers/power/sequencing/core.c | 1105 ++++++++++++++++++++ > drivers/power/sequencing/pwrseq-qcom-wcn.c | 336 ++++++ > include/linux/pwrseq/consumer.h | 56 + > include/linux/pwrseq/provider.h | 75 ++ > 9 files changed, 1617 insertions(+) > create mode 100644 drivers/power/sequencing/Kconfig > create mode 100644 drivers/power/sequencing/Makefile > create mode 100644 drivers/power/sequencing/core.c > create mode 100644 drivers/power/sequencing/pwrseq-qcom-wcn.c > create mode 100644 include/linux/pwrseq/consumer.h > create mode 100644 include/linux/pwrseq/provider.h > > -- > 2.40.1 > With no objections, I plan to pick it up into its own pwrseq branch on Wednesday. Review and Ack tags are welcome. Bartosz