Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp584508rwb; Wed, 7 Dec 2022 02:24:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf7U/X9DTGGejjQb/EKWNTK+PAXH7afLkwJ47f72nt7gRi+ZBa3zCrXGirGBqrDM0iiUxts8 X-Received: by 2002:a17:90a:c384:b0:219:b576:d0bd with SMTP id h4-20020a17090ac38400b00219b576d0bdmr18894443pjt.123.1670408682996; Wed, 07 Dec 2022 02:24:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670408682; cv=none; d=google.com; s=arc-20160816; b=WThmwyUMQAfhmy/eiT+I3j+FAoX5iPSXBJd46cd1AaO+YVHUtdNSdcAocLZud48lrl EPxCkMZy6r5Fsk8ZMG3kD7D3rmEuHw0iLTllgz5GqSIvZFUqxX+l/PMJ5LXgYW6Gp3Jx ce5kMMQU5houJH5YoA1cr7wraP7d17qwvg8cj+Ga2hOr7+ycYAD6bq7t8r9qlfRyeZQx S4N2IX8AafaZ95SgM1xsP6xnuIFoE0pRzhDwR3fckSLzglpwd7hyltcDkgJLp51cijkw 5F4zfyrSklC89SBQpsFP/mjxIsplGClvRXKP5udH8HijR7+Gn3Pc0uqNITXfMknnPpvu /AVA== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=WNk7zJdv46TIkKH0Re6+VY4KpcFRhiSD6vNfUPbXKfw=; b=kTVBpN7+WkNYzATCPrCEhqhvAvLdiShDEQRuQwHqOyFDn6QUqVtpaTE/K9wZ/0RjQ8 ox4XJCdnqy1i+7NbZWNfaXFOmmNr/fFgMcd0BFONB9Np961pFjHUELl8g+Q7BM7xmDWb cyWRPJBTNOQCzxDagytk2K7uXqH/ry4hQCdXrQ6YUlN9/ffgmMNd0+u9XbulxMDTrwMp dfWqI7b9awnBb433acfeJHjmq855Jd6feRsVVUqgh+4EuEpz3/khF2SFlTZ/MshhYR12 KIDRzo1UMgYoP0vUaUIrPIFFr3suCB8EXR8eLhSVe3qKFJ3ARQ5MV2/mSz8GNvFkWKKu rRKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jPRpWa52; 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 l3-20020a17090a72c300b00219a2721d64si1085565pjk.72.2022.12.07.02.24.33; Wed, 07 Dec 2022 02:24: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=jPRpWa52; 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 S230057AbiLGJ4D (ORCPT + 76 others); Wed, 7 Dec 2022 04:56:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbiLGJ4B (ORCPT ); Wed, 7 Dec 2022 04:56:01 -0500 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C762E10041; Wed, 7 Dec 2022 01:56:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670406960; x=1701942960; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=W9p3iWoLP22mdK8lH1mdoYcGXRJk0lUpSxNqmRWLEp4=; b=jPRpWa52l55GVUEK8EZ7GkNc0Afk/p72xjIXZO5WE14JoINGYLpHRoqh gIMWNHJeMekZh7/aBTjWEgrktb3U/cDT+y7YzrLSPW8gqFwzaxCzY139R 8UD7/Yys+MDKw7373KYdJQ2N8HSSGcMgks6feuqmmnESGE9pKhaM9U9em z6AkNprKI9DbzlPO1Fe324Q1IW9bXKmSHB+fGKqjVMzYtaSoLSVKfE7dE WF5SfUjwLN7dkCEHiduJdZ69MmvG4D5TZ2/+7VXiKaVuSi1i3pTh/7Wnc 5lA/8/qaHcEe4clkY8XSOD8LJURaNEfh56bo9LEE2B64472mI1scgdg+p Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="316866808" X-IronPort-AV: E=Sophos;i="5.96,225,1665471600"; d="scan'208";a="316866808" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2022 01:55:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="648674941" X-IronPort-AV: E=Sophos;i="5.96,225,1665471600"; d="scan'208";a="648674941" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga007.fm.intel.com with ESMTP; 07 Dec 2022 01:55:53 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1p2r9b-005hPw-0O; Wed, 07 Dec 2022 11:55:51 +0200 Date: Wed, 7 Dec 2022 11:55:50 +0200 From: Andy Shevchenko To: Linus Walleij Cc: Kent Gibson , Marc Zyngier , linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Jonathan Corbet , Hans de Goede Subject: Re: [PATCH v1 2/3] Documentation: gpio: Add a section on what to return in ->get() callback Message-ID: References: <20221130155519.20362-1-andriy.shevchenko@linux.intel.com> <20221130155519.20362-2-andriy.shevchenko@linux.intel.com> 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 X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,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 Wed, Dec 07, 2022 at 01:06:46AM +0100, Linus Walleij wrote: > On Mon, Dec 5, 2022 at 2:43 AM Kent Gibson wrote: > > > My preference would be for the driver API to be extended with a new > > callback for the output buffer, say get_output(), and have the existing > > get() always return the input buffer. > > This has a certain elegance to it, as it cuts to the bone of the > problem and partition it in two halves, reflecting the two pieces > of hardware: input and output buffer. Also follows Rusty Russells > API hierarchy. The (one of) problem is that not all hardware may support input and output be enabled at the same time. What would that new API return in that case and how it would be better with get() returning the value depending on direction? -- With Best Regards, Andy Shevchenko