Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2944154lqp; Mon, 25 Mar 2024 14:01:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWhQFtDjtVbKh2HhjBPVvnB9/91Colv/uTUc07ShlXFExbRW3gLHSna3MOKjLld6/VLwGL+EhvaPRRFsvm4lFUfzfcETuMgBDVppUyi/w== X-Google-Smtp-Source: AGHT+IE1+kO7Y0CL16imtJDW867hRv21o9+WqdBD3wVwtJ9T2tuQejct7qE8DovbWtqMC1u+JKSG X-Received: by 2002:a05:6a00:13a1:b0:6ea:89e5:99a3 with SMTP id t33-20020a056a0013a100b006ea89e599a3mr9178615pfg.8.1711400488337; Mon, 25 Mar 2024 14:01:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711400488; cv=pass; d=google.com; s=arc-20160816; b=R1lihN2nsRUFetumVXs4nQPnTjtR0MhYb2gZY7S7PYW9wyy6TNEyKkqxkKcYLArsj1 Yv+WFwHNjOSjB2OPjzPNA2n2sBRF56B5TGFN69/8RbBl/Wq9+ZeSfHOER5ZzFzzc6zCT d9zfmIMETn3CYffi3FDRGIgstwTzuZzXPmLuN24RN5O3vp5CJXPBKocNYMeTX+kebr6X QOLprpIWfgzheu8C9rgsLTtUYOq5c7NyR8DwxHopk0xi1m48FGTMeqVF4oWHK5tYCAue c8fQgHP26DriRg9VRYgQeO8XebdXyfyvy6iK8EHgB54CNtORiipNh2vM+KZwlK9ezD+t QBxQ== 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=y/Copnmio+r4JHJn7cH1SHr0SKFHmhJFbDXHchbZThs=; fh=ENVnmP2k6M2NExOP4FFMzMM82spDkwgpv+82XquqQp8=; b=L8X6VyNX7GVvbOvM94dnDmczrWoo8ity9kUX2QPLKkq7GTZQpjIeR4ayl99zR6s4ll 8T9LL6GwMiEY+vBL1U2mw4BXvkta0ac0PAR6EMWnA7p96aVL0t2eRd6kIP+Y38bcw0h8 ZRLdDZ25zI5vVeVPw1woO0GuYS6jGhGjVkA4txWJAgyb55HqEu3Cu05lCV55XAAzXQQ1 DmGPWeb/LoCkG7UTnZGiDa6C95PJvEjdCP0wzg4Ifju9B6nSQ4s6UQmmVS1+F7Hl2RDk oW617ev3eP2de4Cxq7No5yQebAqWFYlwm2oPITiAXpRw0CvB9e/+RQ2OCNtMqJgYQ+Ye 7NYw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=iuCw32tm; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-117906-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117906-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id h12-20020a056a00000c00b006e6cc8f90f5si5606287pfk.274.2024.03.25.14.01.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 14:01:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117906-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=iuCw32tm; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-117906-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117906-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 BDB0EC21416 for ; Mon, 25 Mar 2024 20:16:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 222E14C634; Mon, 25 Mar 2024 20:14:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="iuCw32tm" Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 7C9204C637 for ; Mon, 25 Mar 2024 20:14:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711397675; cv=none; b=u7ZQP3AdMprOv9PigQSoZoqlERgYE3h5flAynmbxXKHoGYPgHG1LjIGB+zIEcZVhoC7zxSQ0am4rlrfN5vuwfkIKsVYRDWs7prR7v3JU146Ypebd/mhp9RJb5Rjdk2N05uSzA4B1q4CRWs+1ZzNkdOszcvvN6bzjxU8iAKrxYM8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711397675; c=relaxed/simple; bh=y/Copnmio+r4JHJn7cH1SHr0SKFHmhJFbDXHchbZThs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=X/vey5XF6im0g1IeWHkbysCeHYvtvX/gLUu9Z/5rP3Bzl8aAuzRgue/BrqIvF2+VEqdvDi8l4BAuyfPq1EtZUEFeSEKuFusNibvKbSEahbTcR6Ml15bLMQ2X2EhGfR3ZvTpC8CZ300okpEY+Lq2yTugVp1b1NM7H2IHmLgMs7uc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=iuCw32tm; arc=none smtp.client-ip=209.85.208.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2d6dda3adb9so11226971fa.1 for ; Mon, 25 Mar 2024 13:14:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1711397671; x=1712002471; 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=y/Copnmio+r4JHJn7cH1SHr0SKFHmhJFbDXHchbZThs=; b=iuCw32tmWhnvpIewveu6AYiYQem76Mvuok28exwJhKuuVd9PPE3un09zFyzpvWdRCI TZAgsWjtKBs9iUKm9xLnRdpCeXrwLHmzTQ12WFULfOw+pLRcf7IpcXjAmu1DzvQqeWJa s8H0kNyJtbA4e3VwLQPNXDk32TUumk7eYDBv/2xA0aYs71xBTurLoZfCp838PSBMSuTv Oo5XXzKCJ5hoknalahHv1ODni1grES9CSg6/6j+6Tx8jrdqkaynTSv7IwSTKM0eowuw2 aGtWqxcOV8O7XK07cWN8s+HEZF58qR1/aQAeA65XXbZSlyXcWWJaH/snXMGk23zF4h/w x6kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711397671; x=1712002471; 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=y/Copnmio+r4JHJn7cH1SHr0SKFHmhJFbDXHchbZThs=; b=NXzVj+NEm2j0f7Kb6IJNNg3VHDkxaWe7O/ySKhWmibkUO8izWg/+Fw5c7QjX7xnbiP qVVg5KtED5ThtP51PozmzHnhzbDQo/ZUtpVh8SFW+b0sbwVqrFQnlQ/q3LEV9gn62K2S C5ySykau0+UoZymBpU9rOWXcH7vdOVfYMF7cU34xcxij+1njqwO7mtHx4cD9ewSsS6n+ 6P6UqrLSo7jmXBfsGKlT/d967YipLRUgrxH0xsfhjnHr33o9D52ffggmItH5OI/jMbnI LhTpQYdD2aDb4LfgnN1XMzKsTthFpi1DVnrf4iuUp3JihFVzC1KS77ku1JVAVn13Oie/ 6UZQ== X-Forwarded-Encrypted: i=1; AJvYcCVjS/P/Y3KkPyZVUk8vGNBGnL0XGoEnU/Xt3GfltMoaEQzICY4NCtfgTLNabbicY/5E8WqsXKw9xBTWaeUJrCQPdSjR8fna2h7MWd7N X-Gm-Message-State: AOJu0YzvoE7ZwaClDbGhvX7ytYs79CwG87c6wQuUG6jDA2iLDc6hm22G Z572DSmP+DoOvsbdZTvi+CAzkKWq7UqnmGnZyhn5Ph3y8fpTX/9eMFUBk6OlTg9eKkl5gwRHhcS aDGQks/VyO873SB9aZjdjbrP8uTV+NHMVR8KIOQ== X-Received: by 2002:a05:651c:b0f:b0:2d6:a2cd:bb8c with SMTP id b15-20020a05651c0b0f00b002d6a2cdbb8cmr657809ljr.10.1711397670501; Mon, 25 Mar 2024 13:14:30 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240319-adding-new-ad738x-driver-v5-0-ce7df004ceb3@baylibre.com> <20240319-adding-new-ad738x-driver-v5-4-ce7df004ceb3@baylibre.com> <20240324130135.35f4b0eb@jic23-huawei> <20240325200625.5a07cec4@jic23-huawei> In-Reply-To: <20240325200625.5a07cec4@jic23-huawei> From: David Lechner Date: Mon, 25 Mar 2024 15:14:19 -0500 Message-ID: Subject: Re: [PATCH v5 4/7] iio: adc: ad7380: add support for pseudo-differential parts To: Jonathan Cameron Cc: Mark Brown , Julien Stephan , Lars-Peter Clausen , Michael Hennerich , =?UTF-8?B?TnVubyBTw6E=?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Mar 25, 2024 at 3:06=E2=80=AFPM Jonathan Cameron = wrote: > > > > > But given that this is a common pattern in many IIO drivers, maybe we > > make a devm_regulator_get_enable_get_voltage()? This would return the > > voltage on success or an error code. (If the regulator subsystem > > doesn't want this maybe we could have > > devm_iio_regulator_get_enable_get_voltage()). > > > > If the dev_err_probe() calls were included in > > devm_regulator_get_enable_get_voltage(), then the 10+ lines of code > > here and in many other drivers to get the regulator, enable it, add > > the reset action and get the voltage could be reduced to 3 lines. > > I like this proposal a lot. RFC, so it's visible outside the depths > of this thread? Yes, I can send an RFC separately so it doesn't hold up this patch/series. > Particularly good as it will keep the regulator opaque in the same > fashion as devm_regulator_get_enabled() > > As you say, we have a 'lot' of instances of this (quick grep > suggests > 50 in IIO alone and smaller numbers elsewhere). >