Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp576012lqz; Sat, 30 Mar 2024 09:03:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWw+G6vEcU9YVHoafC3+CVBEesGDcGZxEw5ctU6ELktZ0LFpm+GVPXvGoNt8FjywF1RC2y4LNMiC9k1XgKjJ1o56EsXeBeO2V+tfJ1mHw== X-Google-Smtp-Source: AGHT+IGri4SZe0HWzRSqA81gHrHk3fcrkqmZMNOITw2EBvtBhTOEzBZ2sHpqj2RLgLONC/opemqZ X-Received: by 2002:a17:902:d492:b0:1e0:e2a4:1b1b with SMTP id c18-20020a170902d49200b001e0e2a41b1bmr6718931plg.0.1711814592499; Sat, 30 Mar 2024 09:03:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711814592; cv=pass; d=google.com; s=arc-20160816; b=bivDUNvQxq+oOrxS32WfHIk4YEGrmP2f4YK2Ebqwkk6M+yd229oM2KEgS5TePEwpG5 GYU9OsyMSLTsqWXcEnuKCJ7hwFLoxmm2zjyMLnbT412OcmnBfXhwupb17eRDw+7RdEIl 0f0bY7wjJ/zmV8OH7+cqsG611Ex6p1Hsnoj+mLk1UK7Y1Yq+bBflR2LwKHc8FOiK89xb e8ENqXWfUFlx1DziYeOtrcIixjCKAO/EDPjtzp+DIR9pOLCSk8ehxFRb8kXqscSyIQqa uXYuJ6tRFXBtiUzwdnIzuykpvgMFnlc8T4T38deqhnkDo6es34ssyK9dhBBB90t3GrRc M7cQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=3R67sHq2IqJNGzxvy15U2WnEU3g6L1ndX8RdLT1e16w=; fh=wU6kEv3ABnqgQCk9TFXzQDyDRR606Mde9GFpGJuThu0=; b=Ua3C/ERCleTnVG14gk8b+ue1ezM+4gIi70++iT38ErPvYcK8qKy4hrjh4DLvdxHzmE zH2IrYHas5epaD5Z/3U17x/9MPYksgYZPNhgve2q4XvaLn9eIPEx/o+QzGCA3UrRFIJP ZJ29Qf5qLD//3nHGithSSCkgZX0hep+fGuT0OEaHiq+k7C8Gz+1/a+J3J7AAQHLQyX7U C85A4Qt525UArYr7aG8jF/TQnNM9F6ClOb+rnBPM/iBrGGUjgakcwL+QoUzRRJGSwwaM iZWTSQKOH/hplmC6aND+rdQxngAuwaL3NkmtyjmK06Nm+VPZxA9iDhL4Qg0E5uAYlQJ7 6rrw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tJSGLSLA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-125772-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125772-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m24-20020a170902bb9800b001e0f504a755si5534890pls.208.2024.03.30.09.03.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Mar 2024 09:03:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125772-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tJSGLSLA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-125772-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125772-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 BE1DF28320C for ; Sat, 30 Mar 2024 16:03:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 603FF3BB2A; Sat, 30 Mar 2024 16:03:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tJSGLSLA" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65C471C0DEF; Sat, 30 Mar 2024 16:03:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711814583; cv=none; b=rMZoabn8Pvy3/WtUdRbXOs+8zhGhQA/RSXa5wUkSA3iw1DvTYO9EY+NNqa1Wx0J3HqWF5YckGDm4wgss6j+NFPSS+h2w7/3MwxRaHtPm46fwYWoA2M9vcjv7RiYywjOJeA2PPwtFU3Jjo6+UcMWmpI2/vKlM6JAhG42vlE2l1E8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711814583; c=relaxed/simple; bh=UluV6B2CNyYDGwjho9wujbbGinHQfPzIlXhBRj5/jwM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=oSjZgNoXUwlQZ3YIF8tDweDnZY/Z/rNXWQJ5FcFyikeipYs3JsisERVBm3/F9Va4IIvMVanmNwvhVfWch71gxoE4t+7TK0zWmfxIjYOGzg3UiQd/71sx7Rrl7ayJ5u9VNjIzwYzVLzPa3BaF3TlyatDDkSUvddPYtRwYewVszGs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tJSGLSLA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8FA4C43390; Sat, 30 Mar 2024 16:02:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711814583; bh=UluV6B2CNyYDGwjho9wujbbGinHQfPzIlXhBRj5/jwM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tJSGLSLAib4ZkmpSDD8pBKfDUosNtVmyEkJK8+xeWQ2RVi+l2/uiyFl+ZHsK26w2U sg/JDS8+wJ4obfWX5+RA0jLYrKoWy/69TMOHt8NNbHMZtVMkHNn1Z2pUxdRFSzdJkK vVA8ONMxBpcbAY/3IuiPJx1zA6f8BCOpWj8nrAz3O+sVZhjJ1CMT8KqZOmnp24ZXko Ujh4f2a5wNvRBBuguv9c7t/Xs5Fiut1pLT5B13kgANH6zi0BgtXTQNJ97kcxjmQnJ2 QkbJ2xinb1NCih5rlauTuDtUaTWelA9jhVrKB8k9/dY3YxvINFjmR3JcJTHfGgX5Kh MtPcc26yM2Pmw== Date: Sat, 30 Mar 2024 16:02:46 +0000 From: Jonathan Cameron To: Mark Brown Cc: Dmitry Torokhov , David Lechner , Jonathan Corbet , Liam Girdwood , Jean Delvare , Guenter Roeck , Support Opensource , Cosmin Tanislav , Lars-Peter Clausen , Michael Hennerich , Antoniu Miclaus , Greg Kroah-Hartman , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-iio@vger.kernel.org, linux-staging@lists.linux.dev, linux-input@vger.kernel.org Subject: Re: [PATCH RFC 1/7] regulator: devres: add APIs for reference supplies Message-ID: <20240330160246.6b74bd3b@jic23-huawei> In-Reply-To: <8d98fab7-d73b-45c5-a46a-ace57907d25b@sirena.org.uk> References: <20240327-regulator-get-enable-get-votlage-v1-0-5f4517faa059@baylibre.com> <20240327-regulator-get-enable-get-votlage-v1-1-5f4517faa059@baylibre.com> <043b347b-2652-4ffb-a8e0-954a89899ade@sirena.org.uk> <8d98fab7-d73b-45c5-a46a-ace57907d25b@sirena.org.uk> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 28 Mar 2024 20:25:31 +0000 Mark Brown wrote: > On Thu, Mar 28, 2024 at 01:17:52PM -0700, Dmitry Torokhov wrote: > > On Thu, Mar 28, 2024 at 06:18:32PM +0000, Mark Brown wrote: > > > > I don't follow what you're saying here? What normal APIs are not > > > available? AFAICT this has nothing to do with a devm enable, it's a > > > combined operation which reports the voltage for the regulator if one is > > > available which would still be being added even if it used a devm > > > enable. > > > You can not do devm_regulator_get_enable() and then call > > regulator_get_voltage(), you need a new combined API. > > I think the theory here is that there are so many instances of this > reference voltage pattern that it's useful to have a helper for that > reason alone. Exactly that - this is just adding a convenience function to remove boilerplate. -20ish lines of cut and paste code per driver. Jonathan