From patchwork Sun May 30 16:13:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauri Sandberg X-Patchwork-Id: 450387 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11D27C47091 for ; Sun, 30 May 2021 16:50:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EEF00611EE for ; Sun, 30 May 2021 16:50:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229931AbhE3Qvr (ORCPT ); Sun, 30 May 2021 12:51:47 -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 X-SA-Exim-Connect-IP: 90.191.105.164 X-SA-Exim-Mail-From: maukka@ext.kapsi.fi 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: devicetree@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