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 A2124C433EF for ; Thu, 14 Jul 2022 15:08:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237665AbiGNPId (ORCPT ); Thu, 14 Jul 2022 11:08:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239349AbiGNPId (ORCPT ); Thu, 14 Jul 2022 11:08:33 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCFB6643D6; Thu, 14 Jul 2022 08:08:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657811311; x=1689347311; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=M13fIbDJULnHlBOH1WrfeY3SuDM0Ce08MRrVwA7sIjo=; b=BfVBLJiWV7y26E/JxL46ua10lh3BOpB3CVnZ+bBzJkGCkMXRFJjDTk8Q KKbLXrNcbFXxt+VDdRttTJK1yK+uHiPGBleMRxdc6c70oRsFodkH7YHg4 u07MocklZ+n5shP1FeqCrbvS1NUDK4EXaxGDVEtZiRxuWvBSn+dmWrL37 n9Bq3mCSUQQwTQow7f+2Dyedl3WseK6HhIAS6nkv6rbk3nGF+JSLYak9j C4OeM2DlQeNysBKb7TsfZQMosc7NliAJ2oGatPUl0hiEbuNrupkjB9r8m iAgu3uv03gsZDM6a6YvxH2TES1yWLA1L6GnAO+a8TnzIoxn7KYBwrfJ6Q Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10408"; a="286278935" X-IronPort-AV: E=Sophos;i="5.92,271,1650956400"; d="scan'208";a="286278935" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2022 08:08:31 -0700 X-IronPort-AV: E=Sophos;i="5.92,271,1650956400"; d="scan'208";a="546300032" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2022 08:08:28 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oC0S1-001DNj-0c; Thu, 14 Jul 2022 18:08:25 +0300 Date: Thu, 14 Jul 2022 18:08:24 +0300 From: Andy Shevchenko To: Nuno =?iso-8859-1?Q?S=E1?= Cc: Kent Gibson , Nuno =?iso-8859-1?Q?S=E1?= , linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, Krzysztof Kozlowski , Bartosz Golaszewski , Frank Rowand , Mika Westerberg , Rob Herring , Linus Walleij Subject: Re: [PATCH 1/4] gpiolib: add support for bias pull disable Message-ID: References: <20220713131421.1527179-1-nuno.sa@analog.com> <20220713131421.1527179-2-nuno.sa@analog.com> <20220714042050.GA76737@sol> <4bf06ba5994f559499c45275cd7f44bfee1bbde1.camel@gmail.com> <20220714082710.GA103849@sol> <35e8020f513a77b8a8eb12a45d48a2b1390cce7c.camel@gmail.com> <20220714120005.GA105609@sol> 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Jul 14, 2022 at 03:02:08PM +0200, Nuno Sá wrote: > On Thu, 2022-07-14 at 20:00 +0800, Kent Gibson wrote: > > On Thu, Jul 14, 2022 at 10:47:27AM +0200, Nuno Sá wrote: ... > > If that solves your immediate problem then you need to decide what > > problem your patch is trying to address. > > So my patch is trying to solve exactly this case because (IMO), it does > not make sense for consumers drivers to have to do the above code. > Moreover, they would need some custom firmware property (eg: > devicetree) for the cases where we want to disable BIAS since we cannot > just assume we want to do it. Why? This is the main question. Why do you need that _in kernel_ API. > Well, maybe we can just assume FLAG_BIAS_DISABLE in gpiolib (when > trying to get the gpiod) if no PULL is specified. However, I do have > some concerns with it (see my conversation with Andy in the cover). It's AS IS if you trust firmware. -- With Best Regards, Andy Shevchenko