Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp323686lqb; Tue, 4 Jun 2024 12:28:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXV4LLuHBEx95RaJ94P1qP95mgBpm5goxp7XE6A60Zv3mmkVPdsVAL9GpjwF6RazU8zNe5TPdVOqSkAs/0Cu3FyGzsKWA8G4XLY1OGxlg== X-Google-Smtp-Source: AGHT+IEUsxgQw6zIJXIfInWRE1NQdjo4M+/CSLcAJfjKpP6KYuyHqBLG2kv4d2VZqbY7vdTDTcr4 X-Received: by 2002:a05:6a00:2388:b0:702:36a0:a28f with SMTP id d2e1a72fcca58-703e593d0dcmr460775b3a.4.1717529289209; Tue, 04 Jun 2024 12:28:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717529289; cv=pass; d=google.com; s=arc-20160816; b=u2qED03U1eOjjyQXtpQ2fsr9r5BtHZD4zT3+bxhFyN8HkGmIHNnaGoZe4Dvym7rUXS GYZp1WSXUr/gAnWvAAEJRcBoqcOXQAJG9c5GY65wCxxQKVUVF6j786GoyofCxlyP8YfF fb/wAWXXzG6W3MaxJ36gBBvokfBqBuhb7ehMR9ItYhCHCvcxsRjv5bCWudorgFwDTGsi 3+z41evUXhU5GZERhgDOUmo7Hk92R+6U/p0tD+ZweifF27AYX+m1faRG7yEnmQV7zlVS MKjAN5d5fryBIUNUTWz/LxfjUALBYVtxDsDaM5FV/5ERUe9UWVRJyy0Z6MtFrYjWU0Y1 frLQ== 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=KtWwyHQ/s1Mo+jSgQ3jPju5LLIQLxY5LIc0kGaj+Rp0=; fh=0p/srPaD9fXBK/mUuSvkjaOvyKOElNhrSDFl//7T3nY=; b=u6vdmj3mnrIsekYrEJKw3rRyykaV7vQHt04/YeYVd63CTZfU+2+If7BHxL7unLfGgt cgEOuyBAV6Ebj766tKedpqUAcHRVkwwRw0ZmrQIt7bmeohEcJQSFEDiuyq38TvH6m2kR zRQVyecrzmHvchxYgc5jimuqhbaL8fct622y8z3bpE7Ic53i957+xJOwWswjHef+fcq2 Z0l+gw3BkcOzKo8EMTC8C4I7KsvEXG2kRfmujz3hrbnILDIXQxcTDgpgSwJTh3cGiSUo +RJopouRYbGuF2A5TqBakRChzLBwF5kzbGMjVRHb/o2xRZSMSaCmPhGI6uH3y++SRbKA aEIw==; 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=UfKRuEKu; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-201243-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201243-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-7035997eee1si557897b3a.163.2024.06.04.12.28.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 12:28:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201243-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=UfKRuEKu; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-201243-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201243-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 33FEFB24786 for ; Tue, 4 Jun 2024 18:28:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48D4114A4F4; Tue, 4 Jun 2024 18:28:02 +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="UfKRuEKu" Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (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 15EA014A099 for ; Tue, 4 Jun 2024 18:27:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717525681; cv=none; b=F4l4voCmPw6cwwB3HmAtPX3iWjiYPqB3ajmz2eQPsZtVALwyhcfQwC5DG/50SurYTggWH7stfnV8IfP2IZNIGAQz/09/yAov6/BuH5RWwISz9EXkw2pdg4Tkzc4MtG3MoXHFB7bQwVWfhfJuEsWDJ6YuxnZmEaXVwzwsnWAHcWc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717525681; c=relaxed/simple; bh=tgO7W51+bHcDvjyP/YA64C67mrFqdBGIc+5LxIoRFGo=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=meqAbzTTjOQSThVQYx1ehkL4iyXNedhFHnCXZLsW4Q63Ra0jx4f7MVtFm2dGVkFQsLJbRlNbExQCMqN+OZ4AzaatKHmRF/XAJNmIrp6r9pJptIinPb+i0fZiKTsCP9v/ElQ4m8RS8tXpKEVFKE/DuQ/dx0rfkh7yGQTMLA+2fIY= 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=UfKRuEKu; arc=none smtp.client-ip=209.85.167.49 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-lf1-f49.google.com with SMTP id 2adb3069b0e04-52b98fb5c32so3844248e87.1 for ; Tue, 04 Jun 2024 11:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1717525678; x=1718130478; 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=KtWwyHQ/s1Mo+jSgQ3jPju5LLIQLxY5LIc0kGaj+Rp0=; b=UfKRuEKulQPRJ1eQ1jv5CPwj5N48I2Hd/0RecNZvR1umL2CaLMmHTBGRewMLx8xPVy G8ohgactJFSAKbfIQPzAjtKfd0Sxw9ZtghZ+gPnY03Zy3F/AuVdbxqpIYaBWAInoXrKp gIaaWDULocIxS0mx9djiuvA+RM3Ihq3jAZBVqt9hPjKydR8f38k2Ee3Uek4sOlzndqk/ dD4Azb1LLUXGqSiMu5p5k1byuGyaulNDQJDToit2cIh1xnjFr2Vmb2+SP6i40KeANUvt HughqwuP0jI2ouIrSLA5Pi2guWDS3j1FF1vd4CKJq38kHz60Q3jIWz1rgtycCn6OtAv+ yGQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717525678; x=1718130478; 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=KtWwyHQ/s1Mo+jSgQ3jPju5LLIQLxY5LIc0kGaj+Rp0=; b=r1BGy/mBXctbCjZjNXpyOjsxS6K5fIaPgnCp0LSADQBWgZZz1XPnM6uXQIBFPj1dxp zuA75F92YMgI2ubeDhdKyDcBFwfXSnx9SqvUwxm3fBxgHVT+xoGNJVbdCrVj1nQBgZtT ndWaohyF4VpgOWxefyKjHNO2ORXbE3Ky85DxyJK8OrJC+LJC6CNfGdxk+sPzzX11i2ga MNFdv9U0qnNUtokg/TSNk+/PYKA7srxm8U+r4hwlhTzkqGDm95fEwHLFRMs+6H6sXv9c bPEpeWrtAd+L7LNLrIclJcaACHgUwxg5+dGW5mqtuhB5ufbzC+Ts4QmLMDyn1qyx4n38 7C6A== X-Forwarded-Encrypted: i=1; AJvYcCVjIpuNWMNfB9by0ZDvozPBV0k79p4jyga3cow4ZWTfD3urLHNrr6sfKaFKuc3xOEyC53EoxE1EWx9RcNoMzRhwWCIGOXRpZOFfjL9J X-Gm-Message-State: AOJu0YyMXDgqKrljWXBjFt/x0v9dYE6pCSBvecTILEsT7H4LIDUaavvU 2T1y8Bgyuca7SfEyaUs0ZItlpprGk6fPZfD68E7W3ASlRcY/tJgt+xrPGhCXt0cILayvUXQ5I0U 8uovjFkqn7IsAxjB+f3+Sr7KEatwPDbzyVNHaVg== X-Received: by 2002:a05:6512:2253:b0:523:9515:4b74 with SMTP id 2adb3069b0e04-52bab4ca5e9mr311493e87.14.1717525678190; Tue, 04 Jun 2024 11:27:58 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240528-pwrseq-v8-10-d354d52b763c@linaro.org> <20240604174326.GA733165@bhelgaas> In-Reply-To: <20240604174326.GA733165@bhelgaas> From: Bartosz Golaszewski Date: Tue, 4 Jun 2024 20:27:47 +0200 Message-ID: Subject: Re: [PATCH v8 10/17] power: sequencing: implement the pwrseq core To: Bjorn Helgaas Cc: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Marcel Holtmann , Luiz Augusto von Dentz , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Balakrishna Godavarthi , Rocky Liao , Kalle Valo , Jeff Johnson , Bjorn Andersson , Konrad Dybcio , Bjorn Helgaas , Srini Kandagatla , Elliot Berman , Caleb Connolly , Neil Armstrong , Dmitry Baryshkov , Alex Elder , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, Jeff Johnson , ath12k@lists.infradead.org, linux-pm@vger.kernel.org, linux-pci@vger.kernel.org, Bartosz Golaszewski , kernel@quicinc.com, Amit Pundir Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jun 4, 2024 at 7:43=E2=80=AFPM Bjorn Helgaas w= rote: > > On Tue, May 28, 2024 at 09:03:18PM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Implement the power sequencing subsystem allowing devices to share > > complex powering-up and down procedures. It's split into the consumer > > and provider parts but does not implement any new DT bindings so that > > the actual power sequencing is never revealed in the DT representation. > > > +++ b/drivers/power/sequencing/core.c > > > + * Unit - a unit is a discreet chunk of a power sequence. For instance= one unit > > s/discreet/discrete/ > > > +static struct pwrseq_unit *pwrseq_unit_incref(struct pwrseq_unit *unit= ) > > +{ > > + kref_get(&unit->ref); > > + > > + return unit; > > +} > > + > > +static void pwrseq_unit_release(struct kref *ref); > > + > > +static void pwrseq_unit_decref(struct pwrseq_unit *unit) > > +{ > > + kref_put(&unit->ref, pwrseq_unit_release); > > +} > > No existing callers of kref_get() and kref_put() use names that > include "incref" or "decref". Many include "get" and "put", so maybe > there would be some value in using that pattern? These symbols are not exported and I personally dislike the get/put pattern. Best I can do is _ref/_unref like what kref does. Bart