From patchwork Sun Apr 28 21:37:44 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: 10921065 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E417B14C0 for ; Sun, 28 Apr 2019 21:38:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3EB3284AF for ; Sun, 28 Apr 2019 21:38:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C60CB28703; Sun, 28 Apr 2019 21:38:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 69ABF284AF for ; Sun, 28 Apr 2019 21:38:32 +0000 (UTC) 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=YPUbYfw9gd/hXf0/NGPExskxFp/KB3+0FePEQYfIb7c=; b=lNzmjVPKIg61pn JBAjBowKpKBuErw4bG1EJbuHTNTQvjyiq4lMNDv6memAmYQIQA1PAWBuVnIsG66VAP+WHJtuXkyDp aTTIOYA93jtbM3DkmhpSIGdLrvIHy+oq1QB5QtUsDzTMBHvabfYtKBbLqwxDQCAzeOBfaf4cMpZFB /cpPZr031hcIdFewx3EWpoFzSkNc/fVvUA58hpIJ2b1CYi/lBeIjtUhLeTl+8KIZ0uIm6MMT1Dxg2 LNzzlnKdfYy72MC8ghiRy5alCpfEEdTDDA5wd11LTP2zcsq1FdSv8gBTuQIYeE4yqJZgWJKL/jeO3 5+W/Gs4Zd1Nlsz5nV/9w==; 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 1hKrVH-0001DK-I9; Sun, 28 Apr 2019 21:38:31 +0000 Received: from mail.nic.cz ([2001:1488:800:400::400]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hKrUi-0000f0-0I for linux-arm-kernel@lists.infradead.org; Sun, 28 Apr 2019 21:37:59 +0000 Received: from dellmb.labs.office.nic.cz (unknown [172.20.6.125]) by mail.nic.cz (Postfix) with ESMTP id 1D331635EB; Sun, 28 Apr 2019 23:37:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1556487470; bh=7x5xFVv8+BjU47uM9m7h95sc2gu0LRjw9pk+KQIVj1I=; h=From:To:Date; b=lj7Je0JJTa8Ch9lCCACOdZuOElon+JaVZS1+pfVuSOJ+ojdaFSa/xa/Ngagc6/vr0 OBgI57aJVjb8n0z7m1tWqsJ/XgBZcFecqiRRcJTneT4mLTuHGW3Ck5UN0d9VmK4lLS pmQnTC4M7/IKopTTIS3Z2isTXVMO1g80hqq4D9S0= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Olof Johansson Subject: [PATCH v5 armsoc/drivers/bus+gpio 0/5] Add Moxtet bus and GPIO over Moxtet bus Date: Sun, 28 Apr 2019 23:37:44 +0200 Message-Id: <20190428213749.7017-1-marek.behun@nic.cz> X-Mailer: git-send-email 2.21.0 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-20190428_143756_379654_02FDCDC0 X-CRM114-Status: GOOD ( 10.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arm@kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Marek_Be?= =?utf-8?q?h=C3=BAn?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hello, this is the fifth version of patches to support the Moxtet bus and GPIOs over it. Moxtet is a Turris Mox specific tiny bus over SPI. These patches apply to current arm-soc/for-next, linux/master, linux-gpio/devel and arm-soc/arm/drivers. Marek Changes since v4: - updated dt-bindings documentation as requested by Rob Herring - added Reviewed-by tags from Linus Walleij and Rob Herring 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 | 46 + .../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, 1327 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