Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1995929pxj; Sun, 30 May 2021 09:52:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdaeONpP1ylAcyIz3dWmbsblywsMaA8dGBrTkPAxAWTV74PWAHIj7zdO+m61edWWvGPvv8 X-Received: by 2002:a92:c682:: with SMTP id o2mr8577940ilg.186.1622393570292; Sun, 30 May 2021 09:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622393570; cv=none; d=google.com; s=arc-20160816; b=ZTSjoTzro8Hh8uJCPxQ3GexTwRJSKDWa5hkzftYrxfBrdRuAPifS36q9FXjeVWyEws UVVZQaPxp0L7xDpmpOarHT1co9cW7HNhlUZ3fSMINn9CZlE5O3++Es9DAxiPnUYj99AL l4EJ58v48+TDlP5++dnC+NkCffiSEM8kbvz53SUmD7zlcPicIJP7VkCYV7nGX3ifxmM/ tBvlt+EzY/YjF5tqFmt3TFik5BmopKc75xtuMtNpGKDYUG+9xnMhverhyM6nixHf/ABq sXt7A9HTsWExFar6k0/wW+HfxNMpA9egk2DaTJ2nScwSjyCPsIai1ELwoqYZfBO5w65F OsTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from:dkim-signature; bh=VKO4ovngf+sWSmcrnz3MEUgc27yXWFhNYyo4X/LTgik=; b=00IKprFXG7iI23m+R4TGMva26f4gkZNPS6DT9lEPDngZwZvyLknxtPMDIPEaicW3fy doLQvn8qS2wPVjRygCZCM3jO0BqxguqVlpZnpCQLOcjC59Y69F4+fvD/QP6d3eBPCDuh PeRCKtu5cdRxDvsXk2xzoyVIfbnNKuEcTrG1KeDLL3m9+NA50CwxZ9R2Vk1E1x/Mhvyy 6AlTcrUmFJyP+7LUSbEei9ggqZBXPJGzz539Ep8CoRnS5ITflybVcp4QsrEgYZZfP/qa 6nuPGT1rCExjgVyNtLCE/vLd8CjeenNDc5WvIr+cPSm0y8xw2tRES7tYUgWM3qHo/q0E oihw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ext.kapsi.fi header.s=20161220 header.b=zPFBXpOQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si13043021jaj.50.2021.05.30.09.52.37; Sun, 30 May 2021 09:52:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@ext.kapsi.fi header.s=20161220 header.b=zPFBXpOQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229904AbhE3Qvs (ORCPT + 99 others); Sun, 30 May 2021 12:51:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229911AbhE3Qvp (ORCPT ); Sun, 30 May 2021 12:51:45 -0400 Received: from mailserv1.kapsi.fi (mailserv1.kapsi.fi [IPv6:2001:67c:1be8::25:1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9A81C061574; Sun, 30 May 2021 09:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ext.kapsi.fi; s=20161220; h=Subject:Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=VKO4ovngf+sWSmcrnz3MEUgc27yXWFhNYyo4X/LTgik=; b=zPFBXpOQy9g9b2PNHUBzRKcBBx MOS1X5ZT2WSbWB1ARQO1NKMAyJ98y2AMa+6SkQNjuz2SfRG+qU79v5uA/qGW8RW3W0Z/xOuShfx/K hvu+m6EGPSJGCDW8KxBK93JI9u4Tc+e3fRQ/fWVdm51zbD++eT++hYnSv1FOnXc+qQFFROPhORhIg vqVdACuWipJXqomPi3gX8TJO/ZgGt7T52Qj0y+LbUWqTyD+gJMiKyzuqD4ExbRqUSVtERd8RUIR22 NnGh3+r1Gg5Yn+ekbRoZXbvwjrATdt4JEjL0th/BRTLL2DWk2MACf8KLpZDGlM3RR6aS9vIW6SnbD EraEVerQ==; Received: from 164-105-191-90.dyn.estpak.ee ([90.191.105.164]:50307 helo=localdomain) by mailserv1.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1lnO6D-0001d2-7T; Sun, 30 May 2021 19:15:39 +0300 Received: by localdomain (sSMTP sendmail emulation); Sun, 30 May 2021 19:15:33 +0300 From: Mauri Sandberg To: sandberg@mailfence.com Cc: andy.shevchenko@gmail.com, bgolaszewski@baylibre.com, geert+renesas@glider.be, linus.walleij@linaro.org, linux-gpio@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, drew@beagleboard.org, Mauri Sandberg Date: Sun, 30 May 2021 19:13:31 +0300 Message-Id: <20210530161333.3996-1-maukka@ext.kapsi.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210325122832.119147-1-sandberg@mailfence.com> References: <20210325122832.119147-1-sandberg@mailfence.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 90.191.105.164 X-SA-Exim-Mail-From: maukka@ext.kapsi.fi X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mailserv1.kapsi.fi X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, TVD_RCVD_IP,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Subject: [PATCH v4 0/2] gpio: add generic gpio input multiplexer X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on mailserv1.kapsi.fi) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello all! I changed my email setup because there were serious issues with it previously and patches were not delivered to people. Hopefully it's working now. Because of that I am sending updated patches in v4, which consist of the same functionality as in v3 added with cosmetic changes to Kconfig and updated author email address. Drew gave acked and tested-by tags in [1] so I took the liberty to include them in the patches. For convenience I am including also rangediff between v3 and v4 below. Thanks, Mauri [1] https://www.spinics.net/lists/linux-gpio/msg61277.html 1: 1ca26bb53ab6 ! 1: 496558967cd8 dt-bindings: gpio-mux-input: add documentation @@ ## Metadata ## -Author: Mauri Sandberg +Author: Mauri Sandberg ## Commit message ## dt-bindings: gpio-mux-input: add documentation Add documentation for a general GPIO multiplexer. - Signed-off-by: Mauri Sandberg + Signed-off-by: Mauri Sandberg + Tested-by: Drew Fustini + Reviewed-by: Drew Fustini --- + v3 -> v4: + - Changed author email + - Included Tested-by and Reviewed-by from Drew v2 -> v3: added a complete example on dual 4-way multiplexer v1 -> v2: added a little bit more text in the binding documenation @@ Documentation/devicetree/bindings/gpio/gpio-mux-input.yaml (new) +title: Generic GPIO input multiplexer + +maintainers: -+ - Mauri Sandberg ++ - Mauri Sandberg + +description: | + A generic GPIO based input multiplexer 2: dcd76ada9d34 ! 2: 782e009ba54b gpio: gpio-mux-input: add generic gpio input multiplexer @@ ## Metadata ## -Author: Mauri Sandberg +Author: Mauri Sandberg ## Commit message ## gpio: gpio-mux-input: add generic gpio input multiplexer @@ Commit message pin. Reported-by: kernel test robot - Signed-off-by: Mauri Sandberg + Signed-off-by: Mauri Sandberg + Tested-by: Drew Fustini + Reviewed-by: Drew Fustini --- + v3 -> v4: + - Changed author email + - Included Tested-by and Reviewed-by from Drew v2 -> v3: - use managed device resources - update Kconfig description @@ drivers/gpio/Kconfig: config GPIO_MOCKUP + help + Say yes here to enable support for generic GPIO input multiplexer. + -+ This driver uses a mux-controller to drive the multiplexer and has a -+ single output pin for reading the inputs to the mux. The driver can be -+ used in situations when GPIO pins are used to select what multiplexer -+ pin should be used for reading input and the output pin of the -+ multiplexer is connected to a GPIO input pin. ++ This driver uses a mux-controller to drive the multiplexer and has a ++ single output pin for reading the inputs to the mux. The driver can ++ be used in situations when GPIO pins are used to select what ++ multiplexer pin should be used for reading input and the output pin ++ of the multiplexer is connected to a GPIO input pin. + endif @@ drivers/gpio/gpio-mux-input.c (new) +/* + * A generic GPIO input multiplexer driver + * -+ * Copyright (C) 2021 Mauri Sandberg ++ * Copyright (C) 2021 Mauri Sandberg + * + */ + @@ drivers/gpio/gpio-mux-input.c (new) +}; +module_platform_driver(gpio_mux_input_driver); + -+MODULE_AUTHOR("Mauri Sandberg "); ++MODULE_AUTHOR("Mauri Sandberg "); +MODULE_DESCRIPTION("Generic GPIO input multiplexer"); +MODULE_LICENSE("GPL"); Mauri Sandberg (2): dt-bindings: gpio-mux-input: add documentation gpio: gpio-mux-input: add generic gpio input multiplexer .../bindings/gpio/gpio-mux-input.yaml | 75 +++++++++++ drivers/gpio/Kconfig | 16 +++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-mux-input.c | 124 ++++++++++++++++++ 4 files changed, 216 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-mux-input.yaml create mode 100644 drivers/gpio/gpio-mux-input.c base-commit: c354c29524eeabba63da51f30a09b85ec9dc853a -- 2.25.1