Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1627068rwe; Fri, 2 Sep 2022 00:31:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR7kc3CvrCrhQZvlxirWiyRpp611wrNsa/be0r6VlL4WpCaRPWW4mqQcIthPqF5ZoKfD6bx5 X-Received: by 2002:aa7:da8b:0:b0:448:6bd:d74a with SMTP id q11-20020aa7da8b000000b0044806bdd74amr25090742eds.152.1662103894101; Fri, 02 Sep 2022 00:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662103894; cv=none; d=google.com; s=arc-20160816; b=X9u029A6fyPP0Gau+LT00LG9PtpMNh9NJrec/Ihq5Lm7Ib0VX/XVefixekIp3W1z7R oaIernYH/cvzpZQ5bOiKTigbEjLw6TZZ0idtZ2mGv2xYm2YXxcX2URmjFscx6b29msgg FXENShlCszdPjbvW8FPiAPHUmJlH5yHIgxu0wBLJYWGoi6auB6OnZpIuXR+MBThE74s2 mfBWuLe9diwaBnZMcl6KZ7FPUCm5pCnIWJxAWLdhSKquPKTgcuvm+b2DXDR4uiYaMPLj R7LOFKFCAUqzC1/Yu1YG8dKLsfwrVR6FvyJWFi/K3ps7UyUoKxnbnulAchE8g8NSpUIN LWKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=SMcvVt8reCXiQDaxZe0FABSe8m8yw0Dev4OQmbqJmxE=; b=ulAo1jkoNOhCl2U9YyLnzHyyNo4nq7cp+MgqVinHoLjRSUQOaGzgppOxvpHhC0NQId JmYHOMy23sLVDWtGqKF3jsdXnWVrmS4JmtA21pZpcvpnPZrQZ4nJlF/EgVayu4xzw688 RCOOQ1abRcgF9x48vRk2ethRDQKubGxWh3aiRIaUCsWhpSx85mukDLQ+LqZpiYv5zwfy wH1ucCbI8WlM8LP6gHC7J1KMo4JxL0J5gqTnn87cBu2AB8e8SWSxvrN1OWugJRD+XuAG 7Tf2NM2+nlGeM6tDgVCr6yM/ofaWfIgEoELs0HVePLOVcm6sTCyHeaHHo75tFLRn0yfS aVbg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k5-20020a50cb85000000b004484fbd4d33si1152082edi.117.2022.09.02.00.31.08; Fri, 02 Sep 2022 00:31:34 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233383AbiIBHQK (ORCPT + 99 others); Fri, 2 Sep 2022 03:16:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235295AbiIBHQH (ORCPT ); Fri, 2 Sep 2022 03:16:07 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E018552DF0 for ; Fri, 2 Sep 2022 00:16:05 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oU0uJ-0006c6-5B; Fri, 02 Sep 2022 09:16:03 +0200 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1oU0uI-0005D1-0d; Fri, 02 Sep 2022 09:16:02 +0200 Date: Fri, 2 Sep 2022 09:16:01 +0200 From: Sascha Hauer To: Andy Shevchenko Cc: "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Geert Uytterhoeven , Linus Walleij , Bartosz Golaszewski , Sascha Hauer Subject: Re: [PATCH v2 1/2] gpio: Add gpio latch driver Message-ID: <20220902071601.GU24324@pengutronix.de> References: <20220831055811.1936613-1-s.hauer@pengutronix.de> <20220831055811.1936613-2-s.hauer@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 On Fri, Sep 02, 2022 at 09:42:21AM +0300, Andy Shevchenko wrote: > On Wed, Aug 31, 2022 at 9:02 AM Sascha Hauer wrote: > > > > This driver implements a GPIO multiplexer based on latches connected to > > other GPIOs. A set of data GPIOs is connected to the data input of > > multiple latches. The clock input of each latch is driven by another > > set of GPIOs. With two 8-bit latches 10 GPIOs can be multiplexed into > > 16 GPIOs. GPOs might be a better term as in fact the multiplexed pins > > are output only. > > So, this is for only one type of latches, now I'm wondering why > gpio-74xx-mmio can't cover this case (with probably small > modifications to the code)? gpio-74xx-mmio is about latches connected to a parallel bus. You can access the GPIOs by doing readl/writel operations. The latches are driven by the bus logic and likely an additional address decoder. What I have here instead is a latch fully driven by GPIOs. Yes, with enough force you could implement it in the gpio-74xx-mmio driver, but that wouldn't be mmio at all and likely completely different code pathes. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |