Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2215911rwb; Fri, 11 Nov 2022 06:37:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf7YYTC5IzvNVxx0ruDdTfW4Zpu/+NJoc7dtj40m35xG14V3c6ZlmWoLte4eGyqxlEGXHtoN X-Received: by 2002:a17:90a:c712:b0:213:13f2:1635 with SMTP id o18-20020a17090ac71200b0021313f21635mr2131612pjt.242.1668177462523; Fri, 11 Nov 2022 06:37:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668177462; cv=none; d=google.com; s=arc-20160816; b=ZzdNNJj1PVcU5ROUgpt0Vamm0Hj0Op/JsXGIzN6khh9sx1LT14WY/NYJZFRWpysdR4 ZcG3bx7DYpWn0+zuYwunaqLIzrTipYcp5kb63GWZ1hmNXPQpgarCk2jB0sBgDHAcPRmn tjOSiiNOMR+o7dNW3v/Gv4DPnnDaz4YRjBqlS/C/sX3vTpXFWc3CnqEel6fhQfW29k7E x3F/6R1NsM0MAyV0VtmvO0//cs7X/S2ybOPmzucMf6ukOR0bXivLs8bSuO/SgDpUXVAO tDTGjuHsTOCRSHoIf0o037cHefk28qMkCHCswP1ADWwK33IzCPWa6H5C3g8DcoFQ4ug+ moRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Izp/PldGBCDuzSof+raMAm3TqZm/Dghv17V/1CXJtHA=; b=xV3XvRHFznLUWhu9E9gydxETS1KQ8P/EgrY7GNKfKy0siHAgiynCmVRxeqfJaPyGKv sXZECeurlKUx0ub4ITaZR/Nvmto+yEMNWe/OGaVVBM285Gt+A0OhK01y3MSC9aqMkIey 8hGVy3g3/8vNfN6aOwygb8pTevxR/N7jx1msYetQFy+RFhncEYTCdpVw5pmtKp8mLGej OG56UGyXj6+SKNx0y4Twqe1bvIan+0NFXOgW6iYSyleLo4AiM/Nr85JGZTvoF0MTJzHD 3I2YfR/pBAJNttzrDpLi9s7sg88D1wFpqV6U38plnaP0FpVFxjCgkPS7hEuMwDbA/Qyq nG1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iTMk8I71; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iw7-20020a170903044700b0017d9b373175si2305967plb.415.2022.11.11.06.37.30; Fri, 11 Nov 2022 06:37:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iTMk8I71; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234349AbiKKOEy (ORCPT + 91 others); Fri, 11 Nov 2022 09:04:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234324AbiKKOEf (ORCPT ); Fri, 11 Nov 2022 09:04:35 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7ED486D74; Fri, 11 Nov 2022 05:58:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668175130; x=1699711130; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=L/FQc/AZs3Ei3xk31ePXcOsPPfQIhow5g5Op2Rjvb7g=; b=iTMk8I71/ZqKg3nqhBDQdL+7Ei+LWVV3clLmO1BFGCK0bj9BlbhxxEP/ y3knZu+77OwLRmFHlIXpyoBnocjT4oamKcVEpIrUD2J9jRkAaNWC1CM62 VI0XjSrLov7z8Qkl+lERDjk+PrdEX29+7X6vqEUTXymhFOiNj5fYUXIIW +5mSKztNkHj/ynwvUY/TX5lP0EvdBB3rO/sXb7uR6KFAGLAZ7yGckhsje BQX00NIITHxQ58/0bcLjr+BTjtmwvJluq5ZCdtf5RBCczs97fiVzMGydK pRN3w8e0bx6w10QT9ERLIHZ5dTeBgRGVnetsVpQGzwbuUxgNFbdX+/vZK g==; X-IronPort-AV: E=McAfee;i="6500,9779,10528"; a="397893595" X-IronPort-AV: E=Sophos;i="5.96,156,1665471600"; d="scan'208";a="397893595" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2022 05:57:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10528"; a="632038222" X-IronPort-AV: E=Sophos;i="5.96,156,1665471600"; d="scan'208";a="632038222" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga007.jf.intel.com with ESMTP; 11 Nov 2022 05:57:55 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1otUXZ-00AjQU-2g; Fri, 11 Nov 2022 15:57:53 +0200 Date: Fri, 11 Nov 2022 15:57:53 +0200 From: Andy Shevchenko To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Mika Westerberg , Hans de Goede , Thierry Reding , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org, Linus Walleij Subject: Re: [PATCH v2 5/6] pwm: lpss: Add pwm_lpss_probe() stub Message-ID: References: <20221108142226.63161-1-andriy.shevchenko@linux.intel.com> <20221108142226.63161-6-andriy.shevchenko@linux.intel.com> <20221110073831.ggudvgl6jzgbo2vb@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 10, 2022 at 12:01:50PM +0200, Andy Shevchenko wrote: > On Thu, Nov 10, 2022 at 9:38 AM Uwe Kleine-K?nig > wrote: > > On Tue, Nov 08, 2022 at 04:22:25PM +0200, Andy Shevchenko wrote: > > > In case the PWM LPSS module is not provided, allow users to be > > > compiled with a help of a pwm_lpss_probe() stub. ... > > > +static inline > > > +struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, void __iomem *base, > > > + const struct pwm_lpss_boardinfo *info) > > > +{ > > > + return ERR_PTR(-ENODEV); > > > > Would it be more consistent to return the same value as the pwmchip_add > > stub does? > > Then I will lose the ability to distinguish between absent driver (or > device) and actual error during the probing of it. Any suggestions on > how to do that better? Independently on the above, I think that _probe() != _chip_add() semantically and having the same, and we know weird, return code doesn't make it anyhow better. I believe that -ENODEV is the best fit here. That said, I leave it as is for v3 and we may continue discussing it there. -- With Best Regards, Andy Shevchenko