Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp694911lqh; Thu, 28 Mar 2024 13:25:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUQxrS8FYMGHGCNDY58fxIGGE68hK+UaqJm9cWN8SWjib3Jk22GsJjSAnY6o7NZO0JeqLVRva3dRpTkdhNY21WucpzziysASLp4qGeXgw== X-Google-Smtp-Source: AGHT+IGXqvMLuLF0aKaUq9I+1VhU+KOH7IZs72z3o6v8wxpb18BInlUk2nAi03Ofu16vNZZgepmn X-Received: by 2002:a05:6a20:7fa8:b0:1a3:adc3:ce29 with SMTP id d40-20020a056a207fa800b001a3adc3ce29mr326648pzj.15.1711657501900; Thu, 28 Mar 2024 13:25:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711657501; cv=pass; d=google.com; s=arc-20160816; b=xvOIy++mGSYGiGTLYI96FcfHAv08yMNclPgQFQxVUbwuAs2yD4HYlmFLvWft6coQQv +vXEeqbQ4tRgwv2RaiK5+O0PVeAkhguvgiXJP255yqGA1D1n4kjqtSykdJpPArdRPnbJ l/H5A7KrWUpfHMuQ/SDIPMloGPBNsWknM9RO2vdF0z/C5ZxMbg1ZNPprh8c3h98sZlo9 d2G9Lm5Lw3x2y2xjEBVIfcmydtYQlG32REqMLOgIJCbdZrm8vnOCVtkIiw8PmvRsuygq uc0Gb3g/DTlYsS1/8o4nCmhRDvDiKassvt2HZvK6GKBiv5onJdw68V9kUfJMyQQfeLNH pRJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nEayUKz9gKaOZC4X5AV80mwdg3zyZD5G0L3PubFSTFo=; fh=C9qkUv8j1e248wVYRXvhH4kBa+85/+td0L1pTJXky1U=; b=xufqZlaJpnLCVDjZhMmYKsSkYfM9Kux9ZfsJa0+GS7I97LhD/MBcnz2ezyzFl567qS 7UMNTFajoYtAIvSYegzxvhCXtl1QcMD2fSi8TXULNhHO669yxV9rW07ZV/DxEd8ZcYX/ 6hcQnMz9tA1ZdHqOKwX+Asgti6oBqSWxoMYirZHL3RDDGeiVjStSEKjPSlIRXK5uxEI5 fVJxrJvA3EAV0OElf5Uva82rx+bEo17VW5UiNd1TdOpPWVMDwK6HXqv6ArtWhbay5EWl 8x1Q+0ZiQtUE7kmZ4/G7yW23aT78jFtGkUwMqpe7rg8cigi3ndaRqFI1rHQVueQgFjSA VVOg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OkYuNZhr; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-123573-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123573-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m13-20020a170902db0d00b001e10a87c43asi2179881plx.205.2024.03.28.13.25.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 13:25:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123573-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=@gmail.com header.s=20230601 header.b=OkYuNZhr; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-123573-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123573-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 8D0452986E2 for ; Thu, 28 Mar 2024 20:25:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AA2A813A875; Thu, 28 Mar 2024 20:17:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OkYuNZhr" Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.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 440B014265F; Thu, 28 Mar 2024 20:17:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711657077; cv=none; b=fgEn3gZtyyXLodiQKCXLH5M9JyzEMpqh/bCkWW+ug8mQIJNmxLwHLhkCuc463nhoobMDNoEpSS8kQ70SiA69YMoWCxNYS1WaPWogFsd6MOI6nhvYH2Gfgf/ZUoAaEyJPuwLWtIXKSvGfYkD5jMzpLr34NXadhy1M0F349UutNdg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711657077; c=relaxed/simple; bh=9jYHvj/0a/yHqut5NhaqVyMqutJHLvv2Ne7s1n0MDn0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YFf0nubeL0AwpF/IklEFyFvW9+9gdMml8F7kfGAeVaOpxQjRiC5NwT81Ehb0O59yfO/9ZTvIKBfVtBv/LXqG+bkDKYuNaGIio2Gqe2kQLelN+PwqNECTU9M+auQpS3mzrT/rNphFLYMwnL+ukp64Smeox0zuw2lv678O8vKL8AM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OkYuNZhr; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1e0bfc42783so12571685ad.0; Thu, 28 Mar 2024 13:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711657075; x=1712261875; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=nEayUKz9gKaOZC4X5AV80mwdg3zyZD5G0L3PubFSTFo=; b=OkYuNZhrmbLKklSR7dNY25GnY5vV5LmFstQgyDJTbIHdIQrNEWmglY+T5BMK954Amp xiJCjwCKI8/wWFXp/tYMuhHkYVx1nrvy49WdZr0QuyclNV7aHJLjI0aqOblJvJuIEXgg jp5E1gevsiXqfrELSilL9lm5XlbRBLt+4gP01Rpnk/xW8wL7rGBG4VrABemXdpqyTghM LMU2vRbPaY+WCZSENuLeo/JutjHgO7MWpvZ+AITEwsfgTbAmu+E91gPUnpWaTD1kGy2N bMUv0Yacnp4vYL0MxLMdsI6XZx5PxopvPrOJEpvOorICKX52pUxxvJ24WdCtrUCUvftt 60Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711657075; x=1712261875; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=nEayUKz9gKaOZC4X5AV80mwdg3zyZD5G0L3PubFSTFo=; b=lu8P5QGFchgahQV1oNsHoEqGaJ4+mVMDkaaMgPC0KwWw2FumeXG+6/jxQmMVSwyoi7 SS3JIbjB+6XGZIHFvn2p2ecvxGu5bwk+RLPLR2hMdLWoaqa/qVuH6vqJDJgYbVaPFi8X x2DHlf5DIGrDWL1xPCOZV4bBM4fK4t47DBVpaekNfkf3aJ32Z5EhCaRLyNiiqsrmb3Wf e8mQcqQDqLmyFwFvV9dyLdFdv8HPbI3OLziXNbs3QgzelQ6GmwCYy8FVchbthxFcEbej 7z3FGegzgkmlr5Z5jcJGN2Z8v1YfeFwQzs1JOrgm8Lfe6Rm06rk8t42kcSi+Mqu8G3Do 65Ow== X-Forwarded-Encrypted: i=1; AJvYcCWP2afHBegpe2vRiZCt4Snwy5+kMIX15f7WH8wBlCkggt4LS7ybz3H1fVW76CJ78n0nD8RwcpH7z/8bwZ7vhtJDq9v8Kt4UQT4cOgFKlt6rtKRSWTuWNPK1z3KiOTuFGCfVjM6PnCk8qVRNcFLLnrdLvupqfgCTRIPpWlPE9Qrk/7wZfiWz/FzMWQGkEucxNJhS/eo+YpE14MOKaHA+4EJl9D6C+PxHutWFsWK8zjoyeuJX5O5bWMi8vBuRFw== X-Gm-Message-State: AOJu0Yy5Ci2Z6FYWGbWdqMVG+3l7l8PWuoEwW/+l+V/7OkI/4Blb4dPN 2PAlekdab84rwGQSzcnk8wa83eu7NG8udZU5biSRXuTdHPEpJ3RHYrUsyOB9 X-Received: by 2002:a17:902:8549:b0:1dd:7da:e0a9 with SMTP id d9-20020a170902854900b001dd07dae0a9mr508604plo.69.1711657075433; Thu, 28 Mar 2024 13:17:55 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:493e:82a3:49f9:d88]) by smtp.gmail.com with ESMTPSA id h1-20020a170902b94100b001dd0c5d5227sm2022519pls.193.2024.03.28.13.17.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 13:17:54 -0700 (PDT) Date: Thu, 28 Mar 2024 13:17:52 -0700 From: Dmitry Torokhov To: Mark Brown Cc: David Lechner , Jonathan Corbet , Liam Girdwood , Jean Delvare , Guenter Roeck , Support Opensource , Cosmin Tanislav , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , 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: 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> 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-Disposition: inline In-Reply-To: <043b347b-2652-4ffb-a8e0-954a89899ade@sirena.org.uk> On Thu, Mar 28, 2024 at 06:18:32PM +0000, Mark Brown wrote: > On Thu, Mar 28, 2024 at 11:03:23AM -0700, Dmitry Torokhov wrote: > > > So because we decided that we could not have devm_regulator_enable() > > because of (IMO) contrived example of someone totally mixing up the devm > > and non-devm APIs we now have to make more and more devm- variants > > simply because we do not have access to the regulator structure with > > devm_regulator_get_enable() and so all normal APIs are not available. > > 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. > > > This is quite bad honestly. Mark, could we please reverse this > > shortsighted decision and have normal devm_regulator_enable() operating > > on a regulator? > > Nothing has changed here. Yes, unfortunately. We could have: reg = devm_regulator_get(...); ... err = devm_regulator_enable(dev, reg); ... err = regulator_get_voltage(reg); and not multiply APIs, but we do not have devm_regulator_enable(). Thanks. -- Dmitry