Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp618208lqh; Thu, 28 Mar 2024 11:03:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU9sXoDx3+xGKGEwbVHFnX21PAxKTcj4to5jJg8PczSL5gvw2le9928ETX6oZS0CxHLp+RLCTs7In6cv3NAgt9LfFlSv6xWCqCyOeS+Vg== X-Google-Smtp-Source: AGHT+IH4qsw33RpN14KT4+W+wiDAoO6Cf1g8u98UXCz1XEblGTf0lDqgcHTLWfEXwO9YvNzJmTL+ X-Received: by 2002:a05:6214:14e7:b0:698:6e84:95e5 with SMTP id k7-20020a05621414e700b006986e8495e5mr2120100qvw.16.1711649019676; Thu, 28 Mar 2024 11:03:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711649019; cv=pass; d=google.com; s=arc-20160816; b=Nzik8M9/4X7bSyF08MJSax9lD0Ew4Qd0E3GKfUcH2UZ4B4Y/bjQHUDkwOX4l80rNGH bnvWTCXjoXEBo7VQDGU96mN+19/hR8Y6tbcqphqmuKezXn9N2tQOVxJg8S2k8k943t4F 7Ubdk5LDG0lu5K3tBKrphyBXSucbGT9YIRnaNfrNl9MLwfitB8ggY2yV8oH3B+2mezV0 AxW0JQqCCW5lF/Mc/mPwKwgn/rVdF4wuOAURZ9oAFKzRKfUdofC1DwD8gCRj31oHhifV I+Nx/gJEDTHhRaUVkjLqpu7rO6d88y+TQbK7gfekBD1sPkgRSvFmFISVgN1Mz3NvOTy5 EvaA== 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=olSW0jWLIrC4vxY5yG21bb3i0NkpMQDJhW3rhvvrLzQ=; fh=puXITatu4zUPqM/uloYc8haf9WPpEkGpexE2EOnllsw=; b=LRPpCa69VX5YzuF5AJlYKM4wg01pfJm5EfrOmNDadIzhCKz4tcDQFcBcLUTmZK4LMF aXOq+tEZLZKgQnIYfXy5PPjuCY4B2xIM+5MXFbpMR8CbmXvipOdEQ26yrtfivRg2vPwi gtGwSoyWn7Rm7TXm2uloX7GXH7l57hLQCK59gqDFnHBWeCi+dYtOG54X9qDdYZFectpG gI1s6O2NuX+d+iMME2OPe5lbDbXJ1AUoR6Rno8UcH8GbfMZfRK1luNi0vnpceoMgUldU cqfOpkgen+tVyCTVV5V2TdjbXLgStIlm7xxWRQe13kx3OHuXOQbVc+3K4w0r8ouB9PTn QNJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KBYe1IuR; 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-123395-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123395-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w7-20020ac87e87000000b00430d71024cfsi1932243qtj.205.2024.03.28.11.03.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 11:03:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123395-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KBYe1IuR; 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-123395-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123395-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6034E1C2B3DD for ; Thu, 28 Mar 2024 18:03:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 99C9F131E51; Thu, 28 Mar 2024 18:03:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KBYe1IuR" Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 6CB3C130E4F; Thu, 28 Mar 2024 18:03:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711649008; cv=none; b=dyU/VtFhpOR92I+0KQCg0Wd0yrLoGh2OZ2Lh00BbRBDRqACe/k59VwlWrynUaPg4SnDoUD1tikfow0TEBMWka4EjP02Vy7OVsmtpoGqxker0EpIr5b6mUeg+ycnzxkIKLeVMqKp95SxELjQoK1+H7EDwo6+mjny2i4QuRp3cLaA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711649008; c=relaxed/simple; bh=vB1K3UeOU2FvgT3cwFX6bIQzHZMdAnkhCLXgIqkAx/8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FbOw8XRr/uUoq1XyqT92TUGozdvUVjvrI5qDf8CSs/PkJstqeMw8gbiLTUn17hUIN02+6QKPlxBInFaumPLuEGpynWD4XGzWn2eedcUdjhsjoh3/NcQQ+mkiQWONBiTQaqkN4yBOHP6PFJORKq5BHeSIOp6OMFuxxF/qLu3Uki8= 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=KBYe1IuR; arc=none smtp.client-ip=209.85.214.177 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-f177.google.com with SMTP id d9443c01a7336-1e0189323b4so8952565ad.1; Thu, 28 Mar 2024 11:03:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711649007; x=1712253807; 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=olSW0jWLIrC4vxY5yG21bb3i0NkpMQDJhW3rhvvrLzQ=; b=KBYe1IuROmE5QJaTzVoQaJKqamXjGV+ZoaZINvIedkFJbRxlJ/mqbvTh1ZCwQBq6J1 eKgQi72FgBtA+MbOS8NsYACPBaML3XrszURM3eL0UO5e/wdMVGt08t3GlpbuAOeOZWf0 tDGJRAJ2AVVIXJRaEiXZSr84rInmQxtYktX3PwhcB/JZBtcdFbtvpo3T6jRGxibfvlhK cFKiNTiS6OPpNAnwdgx3MXVP8CSCGlmr3HV16Tklx/ta0wHX3bs5h0xkYPkYVsY0tTOa 1ebnNtjiXgUf47ieun1IFa8/11CCqgQphZaj1ixRo7tCtCxQ7JdUWJ+Z9CxDe8A2PFDX NnGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711649007; x=1712253807; 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=olSW0jWLIrC4vxY5yG21bb3i0NkpMQDJhW3rhvvrLzQ=; b=Q8eoUXFNkIT4je707nOq0ez1AeV82JMetCUtwr6XaE3onEdyS3/+oZq6VOn/Kj2YWQ xzNkRLBc5i2uKjtY/VcdXnWlFgfdPlSiWSXFFbSxZNFsJZuLCIyfDCIkyd79D1Stbe2d VMcxSSSE9stv3Pz0kGh29B31l63G6HPjkxcNT8JhCwN/lcpihg32fPe5UNl07dcU+7km mgWqqcJh2X079ppDFEjdEgLU97UH/qAjSQsOIni0wuVLACbDl7WhaaQID8NGSWcO7Jc4 eUtv0uYYbGAd2TJI5ehIgxOoC6soAAkLyL+aMHdpObWQHVBXr8VSUUctUJzuLsCzL1g8 Ez2g== X-Forwarded-Encrypted: i=1; AJvYcCXbzyQaPcO3Lp3AuGE2/093BgYKWEpochKA3214kbHkafMshD4X211+Hgfzssu96/UGsLvulQbPrmJe7vcHvqlhbTUAo3sq8E+THOOFIP6gcARjyT778rs3iISrKiZjerTXlkLQ3R5RBZG3nqFDULBhMXzQ5LLsa4z00mgqSGXlRGV7xnek4ijsGPOwnJnpsQiANsiBDI3L7NsS7ATIqb9oyWAwYB8F0Eh+0O0D9jNpjj+KiCp/vXVLGIZAug== X-Gm-Message-State: AOJu0Yz26g/twb8fwv3x9KV41Zi/J4WF6cgovgebK6LknKetP8h/rbrM t/u9bUMTv93778apXMkl56rwXYISdKOK0402OzNrcxhmCnOLW8ZY X-Received: by 2002:a17:902:ef48:b0:1e0:e2b1:7395 with SMTP id e8-20020a170902ef4800b001e0e2b17395mr283743plx.14.1711649006562; Thu, 28 Mar 2024 11:03:26 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:493e:82a3:49f9:d88]) by smtp.gmail.com with ESMTPSA id mm8-20020a1709030a0800b001e12013ae07sm1901205plb.231.2024.03.28.11.03.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 11:03:26 -0700 (PDT) Date: Thu, 28 Mar 2024 11:03:23 -0700 From: Dmitry Torokhov To: David Lechner Cc: Jonathan Corbet , Liam Girdwood , Mark Brown , 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> 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: <20240327-regulator-get-enable-get-votlage-v1-1-5f4517faa059@baylibre.com> On Wed, Mar 27, 2024 at 06:18:50PM -0500, David Lechner wrote: > A common use case for regulators is to supply a reference voltage to an > analog input or output device. This adds two new devres APIs to get, > enable, and get the voltage in a single call. This allows eliminating > boilerplate code in drivers that use reference supplies in this way. > > devm_regulator_get_enable_get_voltage() is intended for cases where the > supply is required to provide an external reference voltage. > > devm_regulator_get_optional_enable_get_voltage() is intended for cases > where the supply is optional and device typically uses an internal > reference voltage if the supply is not available. 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. This is quite bad honestly. Mark, could we please reverse this shortsighted decision and have normal devm_regulator_enable() operating on a regulator? Thanks. -- Dmitry