From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f180.google.com (mail-dy1-f180.google.com [74.125.82.180]) (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 24DB32D46CE for ; Mon, 9 Mar 2026 05:36:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773034564; cv=none; b=ipswwrojd791NyNVxBUiHopxLLKLDNY4M8lfgMjYn92HY55tlS3Mk0rjRZO09/6pENDsg6V1o664/JbC/jKoZhECLNK8xjg0IJZemOds3Q1TCyghQrz3zqfxiq0LosURvG2OIi8TpSjbsewzmx4NZHiEUCzF+3VEVveQfA0QjKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773034564; c=relaxed/simple; bh=TstdYjs2JOslSfUoiNOZQUESbqPut/9hmyHHSOydmBA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ByoqeCP1D4vakL9Zl8wY2iOKv91o4tfQRIHq3UtsA2PmaPeCjw9O2p0WfZBVzCVO7xY/wXEaVyGpbYdewDVVhqPtIgqzPeR3He9qd0eFkNFk7Xj7gp0BZSoPtkpmBSryz6j6JKFUNaqeTsX2/27u0htLoXZw5gcaSqyJFH4Tqp0= 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=QjFeYRdL; arc=none smtp.client-ip=74.125.82.180 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QjFeYRdL" Received: by mail-dy1-f180.google.com with SMTP id 5a478bee46e88-2be06c02f66so5033465eec.1 for ; Sun, 08 Mar 2026 22:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773034562; x=1773639362; 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=Skm7jjW3gGTyeCMhcxvy+Ck9FxS/iCqJX+/k6WAJO7g=; b=QjFeYRdLaVWSC47+W45iJZlr2RkgAZByPUnlxQWhsMA91TdgE6m+kK6EwDNXkmnceE pKXvgbtXBMz5JnJ2cikHcvFplbwVDucSH1X28Keqh2ZppBbFNRhDM0TGyybhRMKpCx4y vxMrZtFZI9mk4j5ktA0ItsJj9TpcDm7yvfJqyGk9KA+qzI6/1IwVUUtbHkn6mRFaYMqW vQgHRzYrqQXePjFPA9j6RPtwVgTnfrTmUnNx5N7wbgGnJK/HyPImWPX5fnXZSVB4c+0W 84lTjMavxrSAwdo84x+8RqYeOzDGctdRb++rS2rBC0ZGLWNIUZgTTZkfIulHg90gc30V m1cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773034562; x=1773639362; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Skm7jjW3gGTyeCMhcxvy+Ck9FxS/iCqJX+/k6WAJO7g=; b=lug2TSmgyEzuy9KVWX1HfkollQx1DKBR7F0MNTal8fsN9bRvv2EVoSCadBii64kqzW 078XlUcfIeN0bwvLg66DS/rPWME1Q4dKKy4ISGiiqi9xds282Ry2dTEHFUqOuEFwaEgT 8wu3nSTh5weHCeHrQfv02Ci7xJ30Srsto6a/4iZ4pEWDoLCdQiHI17oOmkpsZfqLScDi XPsV/ZUpP8CszUJ7TeWPfE9E6pSMZZcRDA/t2yhU2b7oMjBV3zWZAmwk7C63thJs1Z+s 3Sm3IxjFbsdssOkOqpUrlDtU9znyPCw40iICO56uW7FmN5u6S7BX1K+Kp/8u5ytgK0oH xq9Q== X-Forwarded-Encrypted: i=1; AJvYcCWeWk50mKgrXu3V9xIbDis316K+2cXIUFFO3TrMrWl5p0czJRkX5IpwX5EIecO2Zq7whZavgr3ThUiaXCs=@vger.kernel.org X-Gm-Message-State: AOJu0Yze9uXy/Dsq+2YnUTB21auFOY4RZA2AaF9uTNZd4gq1Lx4Ccd+Y lblHDEVzASg5J0o0Fn9KOD4IIaRV/APz7QzQcnmgnyoEP7B9nO7ulS2Y X-Gm-Gg: ATEYQzxhhQaTcCKVoAhLjeZE/K3RGDwYI0zrqu3vYss9f/4zA1e8JMP6OkW1nCfykyl cpi0+Fyy/rcE7r202O/32SJwHWJ4m9koJKPleyE0WFE4ahikOAoyHDUPD3Fp3cdzMWcn3vYYJ1F ot7A2+Mza2AhCAKe90WrhJDxXanTEDPkjKyqQ/2XDwCawfSEngZUNZVyFGirwu5LsM+Xbc4081s CzFBkG67F6UWKFm32NeCMV2rKHuCAdzB05ayO5S4r40EalY+ZjRLTb0Czr7GsS9p1xO5El9csRL bCJbAnlG7uzPoQeR8br2h8UpY71XBdYis+v1RnxwBbz1vH4q0v2cwzVRInbd2q7ei3Wyq6/IfvU 9yntM2br4LBqksngmIqeY4dzycusuwyX/qpmhx1pG+ExNFEzOENrctoAiibN2qT6hlO8f1toDmJ P/qPqB6/tmnGBQ4SwBgUKR0Nhkgf6s+ec= X-Received: by 2002:a05:7300:a883:b0:2be:2798:177f with SMTP id 5a478bee46e88-2be4e0672d8mr4132718eec.20.1773034562186; Sun, 08 Mar 2026 22:36:02 -0700 (PDT) Received: from google.com ([2601:647:5e00:4acd:af9:a43b:9d9e:841c]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2be4f807a30sm7490039eec.6.2026.03.08.22.36.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Mar 2026 22:36:01 -0700 (PDT) Date: Mon, 9 Mar 2026 05:35:58 +0000 From: Dmitry Torokhov To: Andy Shevchenko Cc: Jonathan Cameron , David Lechner , Nuno =?utf-8?B?U8Oh?= , Andy Shevchenko , Linus Walleij , Bartosz Golaszewski , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Jonathan Cameron Subject: Re: [PATCH v3 5/6] iio: adc: ti-ads7950: switch to using devm_regulator_get_enable_read_voltage() Message-ID: References: <20260305-ti-ads7950-facelift-v3-0-a23fdd1a079e@gmail.com> <20260305-ti-ads7950-facelift-v3-5-a23fdd1a079e@gmail.com> <20260307114947.0b946dfb@jic23-huawei> 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: On Sun, Mar 08, 2026 at 10:32:13PM +0200, Andy Shevchenko wrote: > On Sat, Mar 07, 2026 at 11:49:47AM +0000, Jonathan Cameron wrote: > > On Thu, 05 Mar 2026 11:21:56 -0800 > > Dmitry Torokhov wrote: > > ... > > > I think this broke the ACPI case (where regulator isn't available). > > Right, and I even have an HW to test (if required). > > ... > > > > + ret = devm_regulator_get_enable_read_voltage(&spi->dev, "vref"); > > > + if (ret < 0) > > > > I think you need to check for -ENODEV and if you see than then > > see if the acpi route below applies. Otherwise on ACPI this will fail > > and we'll fail the probe. > > Yep, just make it default without even checking the fwnode type. > No need to bring the whole acpi.h into the mix. I do not think this would be correct behavior. On non-ACPI systems the regulator is mandatory, and the driver should not blindly apply scale from ACPI systems just because regulator is missing in the DTS. Thanks. -- Dmitry