From patchwork Thu Mar 7 12:52:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1052859 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=nic.cz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="N9UxiQsw"; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="IRf9RCXG"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44FVtP5BY7z9sNB for ; Thu, 7 Mar 2019 23:53:32 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=SLh3Vg2+E1ka8sFjPEoSgRfSfK2YJg5f7iEOpe+AexM=; b=N9UxiQswHZG7BC D7xqvRPIN7YkAjgQr7ir9DXI0dmlWjr6kjh2PISDOCVStrkgjXC8d6OayDLQLzr7hR5IbXotytyDj 9v0yf8K0lQAqHS1KlXAIoiwF2KSCF7+69RsumWT9eEn7bGB21804sKSZ8nuu2pekUSbGIqxjwBkG9 4lMpjV3mRs8xCdTJg2STv9Y57rODrubJuY5o45MXFhS6P5c2ExPE+VxShbA5uI7apYGjXOMXTzCpP 5nwzg4jqoybhc8ehHo0AHaz38e2P191AE28tvsm0LECsPjzBq+XWysfwyJttogjJfLd77yfisjtA/ GRnE9e/oQinUxKb4A2tQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1sWa-00076P-Jd; Thu, 07 Mar 2019 12:53:24 +0000 Received: from mail.nic.cz ([217.31.204.67]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1sWV-00074V-Ug for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2019 12:53:22 +0000 Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:cac7:3539:7f1f:463]) by mail.nic.cz (Postfix) with ESMTP id 36116633EF; Thu, 7 Mar 2019 13:53:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1551963195; bh=gtOfD2MZKCSmq4GCwQ4L9gKprttf0yWXffULGODrOZs=; h=From:To:Date; b=IRf9RCXGKqw1/xwqyWmOquYFPnPpmle0+KCjBdpw5hAIBaAx3JN8NvygJJD50NqVy SU0v+Jul/G3LLfezQsWXdSYUao+BcUmhr3EAZUJRfBAaR1ES1Rl/G6+32xg3Esoyfg e9Qw7u/yLhUct/f6+gIF51NLaw0+hZZdsD9ZI5dk= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Linus Walleij Subject: [PATCH v4 armsoc/drivers/bus+gpio 0/5] Add Moxtet bus and GPIO over Moxtet bus Date: Thu, 7 Mar 2019 13:52:46 +0100 Message-Id: <20190307125251.724-1-marek.behun@nic.cz> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190307_045320_358136_DB9E1CA7 X-CRM114-Status: GOOD ( 12.51 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [217.31.204.67 listed in list.dnswl.org] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Tony Lindgren , linux-kernel@vger.kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= , linux-gpio@vger.kernel.org, Shawn Guo , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Hello, this is the fourth version of patches to support the Moxtet bus and GPIOs over it. Moxtet is a Turris Mox specific tiny bus over SPI. I know that merge window is now closed, but I am trying this anyway now, since Documentation/process/2.Process.rst mentions that even when merge window is closed, "An occasional exception is made for drivers for previously-unsupported hardware; if they touch no in-tree code, they cannot cause regressions and should be safe to add at any time." These patches apply to current linux/master, linux-gpio/devel and arm-soc/arm/drivers. I would appreciate reviews for the changes I made. I removed the Acked-by, since the changes in drivers/bus/moxtet.c are non-trivial. Marek Changes since v3: - added module_description file in /sys/bus/moxtet/devices/*/ - moved debugging into debugfs: - removed input_value and output_value debug files from /sys/bus/moxtet/devices/*/ - added input and output debug files to debugfs/moxtet - added support for interrupts into moxtet driver: Some modules send interrupt via a shared line for all modules. In addition to this, they also send interrupt information via the SPI shift register, so that the system can distinguish which modules exactly sent it and won't have to check all modules. This is also needed to fix some bugs when one module sent IRQ and then another module sent another IRQ before the first was handled by the system, but the handling was already in progress. Since the shared line is falling-edge, the second IRQ was never handled. - since moxtet driver is now also interrupt controller, device-tree binding documentation is also changed Changes since v2: - addressed the issues in device tree documentation pointed by Rob Herring - cosmetic changes suggested by Linus Walleij - added sysfs ABI documentation for /sys/bus/moxtet/devices attribute files as suggested by Linus Walleij Marek BehĂșn (5): bus: Add support for Moxtet bus dt-bindings: bus: Document moxtet bus binding bus: moxtet: Add sysfs and debugfs documentation drivers: gpio: Add support for GPIOs over Moxtet bus dt-bindings: gpio: Document GPIOs via Moxtet bus Documentation/ABI/testing/debugfs-moxtet | 23 + .../ABI/testing/sysfs-bus-moxtet-devices | 17 + .../devicetree/bindings/bus/moxtet.txt | 44 + .../devicetree/bindings/gpio/gpio-moxtet.txt | 18 + MAINTAINERS | 12 + drivers/bus/Kconfig | 10 + drivers/bus/Makefile | 1 + drivers/bus/moxtet.c | 886 ++++++++++++++++++ drivers/gpio/Kconfig | 9 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-moxtet.c | 179 ++++ include/dt-bindings/bus/moxtet.h | 16 + include/linux/moxtet.h | 109 +++ 13 files changed, 1325 insertions(+) create mode 100644 Documentation/ABI/testing/debugfs-moxtet create mode 100644 Documentation/ABI/testing/sysfs-bus-moxtet-devices create mode 100644 Documentation/devicetree/bindings/bus/moxtet.txt create mode 100644 Documentation/devicetree/bindings/gpio/gpio-moxtet.txt create mode 100644 drivers/bus/moxtet.c create mode 100644 drivers/gpio/gpio-moxtet.c create mode 100644 include/dt-bindings/bus/moxtet.h create mode 100644 include/linux/moxtet.h