Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6917244rwn; Tue, 13 Sep 2022 10:48:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR7J5vv9ZVAFsdKeR/sUF10NIuqaY2HnNfk0VsSGt/Ohnvwtv7kt2HhSetcJGdxiOno7hzrk X-Received: by 2002:a17:903:516:b0:176:6c04:f15e with SMTP id jn22-20020a170903051600b001766c04f15emr32191359plb.93.1663091324757; Tue, 13 Sep 2022 10:48:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663091324; cv=none; d=google.com; s=arc-20160816; b=LVJVe4tlSFg4luembCObFb9pPEJJE2kwWO559brsmIhWluvl3e4V1Bptdl0fzczl2o wr5+cd1DcSHlAIEUtRMMWZ1Ff9uVWSUqdY6PGzHCsmkop9KXNyarNCUqJ7aA0DlgW9MU FTSvtJgtVLZIhuelxVUUUdFi9KPNqMkge2PJnNoVsuO//o3TkXXAj+fiNrP7pujRaf91 MLpqIeuUS39+po4y6L7iJ3y4iyEhOJOaxEixj4ZpIwuFOkYbooCU1drulRQ9sYbUGLBg Tf8zVhRpeAQ3tjt7K3uXdBazg9TF5XGTCNn3K1GZEj/rmWu6Uyv4fOh62ezIFQtn2XR7 NWOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=irwfGqhOt7CdW4Oq/XCi4J0PV7nljjZ+X+/4OTUz38g=; b=He2RhclUtHooKDJ+y6HTX6RNiY7HEzYI1EiP0x9WWQIRFnKog2+9caZRNdYwCkSIzS QdzUBDURjUWA5rgm2Iv1RTBrqHm42pAOJbeB5zKgXrjPm12ziMeV/HTW23GzbO8LF44Y EitAqUbIx5VQx58tcW4U6ypMhMu3C5Wa9VSz1F/4lDdq3c1PVx3nK1ETvjVkbzR4kbWx 7CQyArPj9C216rb8pW8/cNJ6ieJlZ5PVMfG7ODamIZJDHIT5Bszr7/QRx9E9sUTt+3WO gd8ryIdYdf5mh2fPEmulcpS9njJ59zxmoZfY3w6XrFhfBjyadwm7q9xOYVkFYEPYxXUF oBtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NnTnDB8u; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r24-20020a63d918000000b00434ba437ee0si12341633pgg.78.2022.09.13.10.48.27; Tue, 13 Sep 2022 10:48:44 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=NnTnDB8u; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233172AbiIMRgV (ORCPT + 99 others); Tue, 13 Sep 2022 13:36:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233156AbiIMRf5 (ORCPT ); Tue, 13 Sep 2022 13:35:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36EF09C1D3; Tue, 13 Sep 2022 09:25:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C801561505; Tue, 13 Sep 2022 16:25:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8ABA4C433C1; Tue, 13 Sep 2022 16:25:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663086357; bh=8vJ/UUqlCSFJed61igiwRoW2/DOdxtHeMwQmw4L0tC4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NnTnDB8u0/XsRatUnyZHBfj7yzEf6HklHBboxKgJ0dZaV/NF16Fex9lnrUrYyQeyS Fwcm3tiUgxV8oNDhpB4IrN2URwP2yRc6q3bVFotauOkGCsquzXcl9wH7CnkQxTZPoQ cOXtnJiRZcunhjkoaeLilyuozWMwisjyZiLP1PdlwyC5AdEntmHMYMGPQCcLbf48Ej 0+d5MpMF/4ub4kLT8TBSwmWJrBu6itN8dviuBMSofHOBjDTY8ETG49ShxvJuvTjuoF Efrh+zVSYmgJWbAuUKP5h9ZMou6H3ajjH27lCVi7YzuPuiakX5Zx6YXECsZLSnQNPJ SI1g9Wzg/c05Q== Date: Tue, 13 Sep 2022 12:25:54 -0400 From: William Breathitt Gray To: Andy Shevchenko Cc: William Breathitt Gray , brgl@bgdev.pl, linus.walleij@linaro.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH 2/3] gpio: 104-idio-16: Utilize the idio-16 GPIO library Message-ID: References: <6f8b7d379a83e1509ec790bbaf0a9e15fdf26180.1662927941.git.william.gray@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3ufRt+hoOry1rdxq" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 --3ufRt+hoOry1rdxq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 13, 2022 at 07:19:03PM +0300, Andy Shevchenko wrote: > On Sun, Sep 11, 2022 at 04:34:39PM -0400, William Breathitt Gray wrote: > > The ACCES 104-IDIO-16 device is part of the ACCES IDIO-16 family, so the > > idio-16 GPIO library module is selected and utilized to consolidate > > code. >=20 > > + /* Reading output signals is not supported */ > > + if (offset < IDIO_16_NOUT) > > return -EINVAL; >=20 > I see it's in the original code, but isn't it possible to cache and return > cached value in such cases? >=20 > --=20 > With Best Regards, > Andy Shevchenko I think you're right, we're already caching the outputs for the sake of the signal set calls, so we can just return those respective output values for the signal get calls. It should also save us some cycles by avoiding the read8() calls for the outputs in the PCI-IDIO-16 case. William Breathitt Gray --3ufRt+hoOry1rdxq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCYyCvEgAKCRC1SFbKvhIj K+xAAQCBkEg0rtlQVJ8koaK1tME77efiRZW7NpitUewpqEb30wD6A2dNj1Tfmi22 +hbHskwM7K5n7Y0/InctcY0S1FK3agc= =y2tL -----END PGP SIGNATURE----- --3ufRt+hoOry1rdxq--