From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 508A6E7544A for ; Tue, 3 Oct 2023 10:45:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231839AbjJCKpR (ORCPT ); Tue, 3 Oct 2023 06:45:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231753AbjJCKpO (ORCPT ); Tue, 3 Oct 2023 06:45:14 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 187AAAC; Tue, 3 Oct 2023 03:45:10 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="362215516" X-IronPort-AV: E=Sophos;i="6.03,197,1694761200"; d="scan'208";a="362215516" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 03:45:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="786058702" X-IronPort-AV: E=Sophos;i="6.03,197,1694761200"; d="scan'208";a="786058702" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga001.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 03:45:04 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC1) (envelope-from ) id 1qnctg-00000002SXq-1k5x; Tue, 03 Oct 2023 13:45:00 +0300 Date: Tue, 3 Oct 2023 13:45:00 +0300 From: Andy Shevchenko To: Ceclan Dumitru-Ioan Cc: Jonathan Cameron , linus.walleij@linaro.org, brgl@bgdev.pl, linux-gpio@vger.kernel.org, Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Walle , Arnd Bergmann , ChiaEn Wu , Niklas Schnelle , Leonard =?iso-8859-1?Q?G=F6hrs?= , Mike Looijmans , Haibo Chen , Hugo Villeneuve , Ceclan Dumitru , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] iio: adc: ad7173: add AD7173 driver Message-ID: References: <20230928125443.615006-1-mitrutzceclan@gmail.com> <20230928125443.615006-2-mitrutzceclan@gmail.com> <20230930150531.083c51d4@jic23-huawei> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 03, 2023 at 01:33:36PM +0300, Ceclan Dumitru-Ioan wrote: > On 9/30/23 17:05, Jonathan Cameron wrote: > > On Thu, 28 Sep 2023 15:54:43 +0300 > > Dumitru Ceclan wrote>> +config AD7173 > >> + tristate "Analog Devices AD7173 driver" > >> + depends on SPI_MASTER > >> + select AD_SIGMA_DELTA > >> + select GPIO_REGMAP > > If you are selecting it, why does it have if guards in the driver. > > I prefer the select here, so drop this if guards. > > From what i checked, selecting GPIO_REGMAP does not select GPIOLIB but only REGMAP. > > Also, in the thread from V1 Arnd Bergmann suggested: > " I think the best way to handle these is to remove both > the 'select' and the #ifdef in the driver and instead use > 'if (IS_ENABLED(CONFIG_GPIOLIB))' to handle optional gpio > providers in the code. " Why not simply to be dependent on GPIOLIB like other drivers do in this folder? -- With Best Regards, Andy Shevchenko