Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2045661rdh; Sat, 25 Nov 2023 11:16:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8jGq9klkO6EaqLWgIgG+lD4X3VH/2EN5ssXQoeYGkzSYjPsqMZLmiSDU+f5pvwcPFhCuF X-Received: by 2002:a9d:7f0c:0:b0:6ce:37a2:a93e with SMTP id j12-20020a9d7f0c000000b006ce37a2a93emr8074338otq.3.1700939805754; Sat, 25 Nov 2023 11:16:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700939805; cv=none; d=google.com; s=arc-20160816; b=SmEEUcMdZQNK3gZ+cTENJPVitT0hhXMZLBdAYqtZlMwjgYLUveSbqe6Ti5ZHqL7fAc /rVb4REAla3gao3pjvBDk2eYNLKE7sXA921/OU+gnuWbb9q1xFjWL5+OOxvmYoY7H9KS NwF8yfwNvWlPAGnFPtLnE+Uk/p+WL5gJ2yQ0yY/mD9J6xy42nEvR1qLyNYreF3PKQwPN +MTBx+bBJXskTgOacWfSkQ6aDo/k/6Lt93vb+QMbIetmT8BgI0i0LnZ4THOUr/pM6Ag+ VGHigdy4ZEksQrM46i7btZOFM3xjdNGhdgLAzkvjmH/oAsiETy0u6QM9WSy5QROYK2cq R7nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=e5WxdFNcNvW8Z8WKf6Z8p+CdqolyIewdS3vMJvcLlJk=; fh=IoJHHrEVqo4e6vSeStieGsqQNuzptXvQjFFAYOnR0Bw=; b=TRwD5mxdUaRbW311pTjQbvOFk9XyPv4rmppzuYFN2GGO2O7zGsfUzyiD6E8o63LKiF qE36Q00XkmwDSkCsmPhVjeFOdUstAobRjApxlhFIeZe3hzSCMce6Vc//zgKRCppugTxU 09ZPnxFyi6oC2kbsXdrisX9lo606FyQh7SmaC0q0HHLRDcKh+LwuuS49vFYLGbA2Apb5 J/wOb3hvvSHiL6Qy7zQIE8JJ2OyZO6jXYtUl3IYdXCRcX+QC7aFHSfgw/IB9oo0nURN4 Uh9hQ8SSwesVVHia/Eq2Q914FUNEnO3UQ8k7gVkzPL7pnE2/Bw7kEtSby08Tm7OPzfru LWkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YTzcUKjF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id s1-20020a63e801000000b005bd2b2ffcefsi6552103pgh.523.2023.11.25.11.16.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 11:16:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YTzcUKjF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 76A96807C6ED; Sat, 25 Nov 2023 11:15:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229653AbjKYTPc (ORCPT + 99 others); Sat, 25 Nov 2023 14:15:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjKYTPb (ORCPT ); Sat, 25 Nov 2023 14:15:31 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49459C2 for ; Sat, 25 Nov 2023 11:15:38 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF474C433C8; Sat, 25 Nov 2023 19:15:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700939737; bh=5U6ilYOb9JOBKF6J2hmo2yKz7KIJBaspaNBWIMEXAHk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YTzcUKjFn88nrPC276FOv9e7ls8eMT58+rj30j/T4s2A7y3BkJMBbmH7QOYsaopqG LY6qRwSxN5IgfrjsRcrHhFwV6XZt51lQWyev1EXhJUU5t4zIJ/Pti9u3uCujYw1rhG TIRznnqXUt49PChQSzcOKOdbQN1x3kI7b4oBukIdo6d3+HwEVSCf7bCN+PpJc+wUJG JDxpIlCLZM5KbsdJnaCXMS3wFVVxrCj2EU1GHNKd9V/9RnRUUJtGOpe3yUvWuVl6Pu EvDhAVVIBcrRnnknE9+T+3JCPvTMVnpVzCGYZHkgG2Eqz91LFEgQmrtmC7zRKNQuAt F22rScENy/EdA== Date: Sat, 25 Nov 2023 19:15:29 +0000 From: Jonathan Cameron To: Andy Shevchenko Cc: Petre Rodan , linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Lars-Peter Clausen , Angel Iglesias , Matti Vaittinen , Andreas Klinger , Rob Herring , Krzysztof Kozlowski Subject: Re: [PATCH 2/2] iio: pressure: driver for Honeywell HSC/SSC series pressure sensors Message-ID: <20231125191529.2ed1ddfb@jic23-huawei> In-Reply-To: References: <20231117164232.8474-1-petre.rodan@subdimension.ro> <20231117164232.8474-2-petre.rodan@subdimension.ro> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sat, 25 Nov 2023 11:15:50 -0800 (PST) > > > > > + ret = devm_regulator_get_enable_optional(dev, "vdd"); > > > > + if (ret == -EPROBE_DEFER) > > > > + return -EPROBE_DEFER; > > > > > > Oh, boy, this should check for ENODEV or so, yeah, regulator APIs a bit > > > interesting. > > > > since I'm unable to test this I'd rather remove the block altogether. > > if I go the ENODEV route my module will never load since I can't see any > > vdd-supply support on my devboard. > > No, what I meant is to have something like > > if (ret) { > if (ret != -ENODEV) > return ret; > ...regulator is not present... > } > > This is how it's being used in dozens of places in the kernel. Just utilize > `git grep ...` which should be a top-10 tool for the Linux kernel developer. As per my very late reply to previous email. Nope. This regulator is never not present. It's just a question of whether the firmware tells us what it is, or it is supplied with a stub regulator.