From patchwork Wed Feb 27 09:34:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amelie Delaunay X-Patchwork-Id: 10831473 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 6470B17E9 for ; Wed, 27 Feb 2019 09:35:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C7062C4B2 for ; Wed, 27 Feb 2019 09:35:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F9492C543; Wed, 27 Feb 2019 09:35:25 +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 D75B32C4B2 for ; Wed, 27 Feb 2019 09:35:24 +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=scWiXQ38+kjaB4ewediEJU4LsRgHCpq+WDXgrs8ZF0c=; b=bui6xOc/LlpBep w8xOzmX6aKMTnp0YnHX6/bISOtQdKt4oOqXdV37yZZ/OJHDY22kg4ds0Di2P6JxQ78o62FYH6LI6c 9eLJ6vYGSJovm2Ox9htL4LomaALn3YEBIAednzY968t6Sx8YrXI5kuVFGFnbPtQWrrWk/SXw4/7W9 purUh2kWSVKA7anCFIHxcsV7kU1bIv+qpup8Gl3ZSd1otR/6eqauEAtbvj728BzxkmOF515u6r6Cx WRtRGYWWaC1u0nsfvGKCQLjwFfyMrTcLY3UGGE7WNGvSF2wHtaIVPP8+KyOh4c9sZqAJ3Qz6glTAY hunvsLMZMcb/RFss0YjQ==; 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 1gyvcV-0003XD-5p; Wed, 27 Feb 2019 09:35:19 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gyvcS-0003WG-B1 for linux-arm-kernel@lists.infradead.org; Wed, 27 Feb 2019 09:35:17 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1R9XfS2000430; Wed, 27 Feb 2019 10:35:09 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2qtv6cx2wu-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 27 Feb 2019 10:35:09 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 8CFE434; Wed, 27 Feb 2019 09:35:08 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas22.st.com [10.75.90.92]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 31EE1275F; Wed, 27 Feb 2019 09:35:07 +0000 (GMT) Received: from SAFEX1HUBCAS24.st.com (10.75.90.95) by Safex1hubcas22.st.com (10.75.90.92) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 27 Feb 2019 10:35:07 +0100 Received: from localhost (10.201.20.5) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 27 Feb 2019 10:35:06 +0100 From: Amelie Delaunay To: Lee Jones , Linus Walleij , Rob Herring , Mark Rutland , Alexandre Torgue , "Maxime Coquelin" Subject: [PATCH v4 0/9] Introduce STMFX I2C Multi-Function eXpander Date: Wed, 27 Feb 2019 10:34:45 +0100 Message-ID: <1551260094-32570-1-git-send-email-amelie.delaunay@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.201.20.5] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-02-27_06:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190227_013516_666619_320041CC X-CRM114-Status: GOOD ( 13.66 ) 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: devicetree@vger.kernel.org, Amelie Delaunay , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org 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 This series adds support for STMicroelectronics Multi-Function eXpander (STMFX), used on some STM32 discovery and evaluation boards. STMFX is an STM32L152 slave controller whose firmware embeds the following features: - I/O expander (16 GPIOs + 8 extra if the other features are not enabled), - resistive touchscreen controller, - IDD measurement. I2C stuff and chip initialization is based on an MFD parent driver, which registers STMFX features MFD children. --- Changes in v4: - mfd: move registers #define into the header - mfd: merge stmfx and stmfx_ddata structures into one stmfx structure - mfd: change stmfx_chip_init/exit and stmfx_irq_init/exit args: use i2c_client struct and i2c_get_clientdata - mfd: fix typos - mfd: add MFD cells for IDD and TS features - pinctrl: rework registers #define - dts: add STMFX support on stm32mp157c-ev1 Changes in v3: - fix MFD interrupt bindings - fix drivers/mfd/stmfx.c:103:8: warning: 'mask' may be used uninitialized in this function Changes in v2: - move to MFD parent driver for i2c stuff and chip initialization - improve regmap configuration - take advantage of the use of gpio-ranges Amelie Delaunay (9): dt-bindings: mfd: Add ST Multi-Function eXpander (STMFX) core bindings mfd: Add ST Multi-Function eXpander (STMFX) core driver dt-bindings: pinctrl: document the STMFX pinctrl bindings pinctrl: Add STMFX GPIO expander Pinctrl/GPIO driver ARM: dts: stm32: add STMFX support on stm32746g-eval ARM: dts: stm32: add joystick support on stm32746g-eval ARM: dts: stm32: add orange and blue leds on stm32746g-eval ARM: dts: stm32: add STMFX support on stm32mp157c-ev1 ARM: dts: stm32: add joystick support on stm32mp157c-ev1 Documentation/devicetree/bindings/mfd/stmfx.txt | 28 + .../devicetree/bindings/pinctrl/pinctrl-stmfx.txt | 116 +++ arch/arm/boot/dts/stm32746g-eval.dts | 66 ++ arch/arm/boot/dts/stm32mp157c-ev1.dts | 60 ++ drivers/mfd/Kconfig | 13 + drivers/mfd/Makefile | 2 +- drivers/mfd/stmfx.c | 568 ++++++++++++++ drivers/pinctrl/Kconfig | 12 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-stmfx.c | 820 +++++++++++++++++++++ include/linux/mfd/stmfx.h | 123 ++++ 11 files changed, 1808 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/mfd/stmfx.txt create mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-stmfx.txt create mode 100644 drivers/mfd/stmfx.c create mode 100644 drivers/pinctrl/pinctrl-stmfx.c create mode 100644 include/linux/mfd/stmfx.h