Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1620772rwe; Fri, 2 Sep 2022 00:22:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR6h8zV2RkytZvMD9+dRZXZIAbJJ1O3wJ62yp//HJ40wI6sbe4aUPRlA7xBquF1kU7Od1X0c X-Received: by 2002:a17:906:6a8d:b0:741:6a3b:536e with SMTP id p13-20020a1709066a8d00b007416a3b536emr17680269ejr.11.1662103379482; Fri, 02 Sep 2022 00:22:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662103379; cv=none; d=google.com; s=arc-20160816; b=VeOgpQgT7XR6z6KBkHh91aS3dsMyn5/0rmaOY84pQ6jNm+JCT1sAT9eKcgigWTEQuD MpNHvd2v/Y9Pp5ksJH9iLXjr2eLoVgig0CrUY97P4RdtK6280+1te2Bfk8UT6ngMja6M u1cBh5OHFTs5EEhgP7+y9YlJR7sr93FKiMTPbAcdD8AWJZgCOnj3vW2UC0YMplXpkYlQ 5x92MYCi1I7OgNZQ81v9asnq8Skx5NjWFUs2Tu/uNiPIbjcRxBsgSCPfeLsDBfIWEcUK WvNcRVTB3pykDSKLaRyRDLhrznBEfZQSK+jDXrInJ0yro5PUtHnWYnM4jvgv8kHPwd7z 7DxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0ztFA8rsuY2vloiv1HdRcTr25R2NxgCLNPLghGc91Mc=; b=S1uZVH3KQ03+Yuev4wYjqb3Bb2cdIg+iNixQYSKBzPYaOkGQCgp/MGBdXE9iq2O3H+ FfJRi+QoVYsOwHiwe6SbaNKLHQjE0KOjHRF8WdrwipfwbEXmgNB3iaJg+O9ms8svBlWk ncv2KHhsX9aoBP12XJi5NJKamGtSi+hQjyXfziA/dEF5F8Ll9dgy0ya0I0AwBlJQgH9U +arK6WNZLVQ9QZcOMZxr823dryGLycut6x+ISRwLvw+Mn6RYXRCvfb5tqnEF7mtiO+Xm 16qkOSsfVzNg+y2Qq9oYoW0zhWaDeGfBz6lwyPw+nQFZ/bTJrCH2yGEKUYwf9x4sSviC gr+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ItdHuTR9; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o17-20020a170906601100b0072b4791e326si942015ejj.181.2022.09.02.00.22.29; Fri, 02 Sep 2022 00:22:59 -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=@gmail.com header.s=20210112 header.b=ItdHuTR9; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233218AbiIBHUs (ORCPT + 99 others); Fri, 2 Sep 2022 03:20:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230295AbiIBHUr (ORCPT ); Fri, 2 Sep 2022 03:20:47 -0400 Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C92894DF00; Fri, 2 Sep 2022 00:20:45 -0700 (PDT) Received: by mail-qt1-x836.google.com with SMTP id x5so842999qtv.9; Fri, 02 Sep 2022 00:20:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=0ztFA8rsuY2vloiv1HdRcTr25R2NxgCLNPLghGc91Mc=; b=ItdHuTR9MapOms5sjGNpCkLjWOb+4vrB+PijQJWFD22X+KE4TdlFV7IhXu6ZNfqMv+ DJHbv3oATrDqCJZZ2Yg7IJOBk2/KKByM67vW09IoR4lumCwo0uTWEFJzVE2lhqaBEoIY rbxH//7bPev65d0IFM+vJmhYPM+YXfUGniRBaR/0FfKtNZ7TLewwo41JAHgTKZBzXbJ2 0EHv3zMxTwxCm4AfGkWAZ6XbboM/4yn8mCDJgK4dn0eVD9QSkEJnyWGcLZZqk5eU640V E5fr1bdwhlmHJ67XVbOstsYNteZphRUFcntHDMvpjEacSphh18dPitnwP75C21Qz8DNG wUyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=0ztFA8rsuY2vloiv1HdRcTr25R2NxgCLNPLghGc91Mc=; b=gzSKs8cNMaOq4KOwYR44CTGu5EkbJWPjP4GQCBYtY2YxtrFh7SqIb0UlmcgLqy6sf6 fqOlimnEC13NvzUGzmScb5SUXskHRUwaHfTtpbs7sY5Gdulbh+yYxnh8gFQeL9MO+UTh BaH3IQIybjXCsmtSeqoxz7gxUZhcqJGkH3c1venJwKyXn6bKUJJrvBzbK++VZXwJwS7k oqlYBMIjIzmxbBBKXW+soRb/a0Gc8J1YwJaEZDCbaR/7WnO5ODEmPDkNKBNsfghcmOxX xpvX5mtfafl0giay53AplBzv4sBL8vGOTysqnODRZSSikmh2IwVsvTtqDBfhgAuIAMsR Jc0Q== X-Gm-Message-State: ACgBeo3+5BmMIwvy350I8szapmXLlkz84RZ9J/DEwTcDyUloOZYBTots 3ABaXmb5rneBiRVNlET3YsaOLcs6MurZXRlF0xY= X-Received: by 2002:ac8:5786:0:b0:343:3051:170d with SMTP id v6-20020ac85786000000b003433051170dmr26872765qta.429.1662103244912; Fri, 02 Sep 2022 00:20:44 -0700 (PDT) MIME-Version: 1.0 References: <20220831055811.1936613-1-s.hauer@pengutronix.de> <20220831055811.1936613-2-s.hauer@pengutronix.de> <20220902071601.GU24324@pengutronix.de> In-Reply-To: <20220902071601.GU24324@pengutronix.de> From: Andy Shevchenko Date: Fri, 2 Sep 2022 10:20:08 +0300 Message-ID: Subject: Re: [PATCH v2 1/2] gpio: Add gpio latch driver To: Sascha Hauer Cc: "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Geert Uytterhoeven , Linus Walleij , Bartosz Golaszewski , Sascha Hauer Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 2, 2022 at 10:16 AM Sascha Hauer wrote: > 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. But this reminds me of some kind of gpio-aggregator with a specific layer on top. To me it really feels that we are (semi-)reinventing a wheel between the lines... > 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. Got it, thanks for elaboration. -- With Best Regards, Andy Shevchenko