From patchwork Tue Dec 5 14:46:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 120655 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5836516qgn; Tue, 5 Dec 2017 06:48:38 -0800 (PST) X-Google-Smtp-Source: AGs4zMbdv63ki1L1UyPt0wVuJzX4AQP0jzOf5TK/VjQ/CI7bLH8hQHS+OUmV3dL/h1+vbFXhcOHa X-Received: by 10.84.247.9 with SMTP id n9mr19086247pll.112.1512485318046; Tue, 05 Dec 2017 06:48:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512485318; cv=none; d=google.com; s=arc-20160816; b=0UBV+o/63kFRWx9Dn241aGCzyxeEVsWJg0cx7nv27n4q4i59PsbggIMqGKdTtrnjdz c58jvHQpb9aJbZOkmPupdQ0bdvlMLYArbExqJx/hsVXSiO7FM9XcYay/aS6KATIglD/a vF6KtzjNZyTRzx9sEmexaUzzMAkBdttpsW3pV7BnQn/HDeG1gLbfCr5Gsn6B/AWD4Qb7 ce6LPSynia6dtZYGlByBppCeMPlI6peVzmXmrLNXbY3jypqiWs0Z5FoV/eQSCLZdrJkR GUu1SJlhRHn1Wk1m4Bj2ip5AWv/voQ+tvH+dN+2vmIsz20gT264WLlf//JLPUSmrL0Z0 Ouaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=uQ+FYK0V5dWufX+LCFFJ1D92QNICt0hlOkJAnkZQ0Hs=; b=WTwTzdw9lnS2xEXuDGk9Ikb0KZPADUMPV4MgU3f9v+kzVutmaFfYs7NqGDkpRXX1Vk uNk5Ciq8S4qsV2A4qqi9aOwSP2k4yRygvfqZBXcz7PuJP75YIJo1Ul5soDt6d2IPC2QR FUMO+fRY7YFL3lWRAjJNXg5JeZt1C8WCMvROUzzW8mM2d2DThxsZrShXdJ1ZvJjuj0EN kNOBwQsxcCx7LV95D9sOvJMPHg5sCjIXkyIWotVwNfwMhei3uHqKEKmyY17N10vwCEFu lcdawT17SNtCqeccyIRNEqmts7XWjYZvO9wb1aPvvxiU83bvNAx3K5cRoc9uCv82cBHS IPvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q15si198459pfl.112.2017.12.05.06.48.37; Tue, 05 Dec 2017 06:48:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752586AbdLEOsg (ORCPT + 6 others); Tue, 5 Dec 2017 09:48:36 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:54759 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752235AbdLEOsf (ORCPT ); Tue, 5 Dec 2017 09:48:35 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 475AC2073A; Tue, 5 Dec 2017 15:48:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id E96262055D; Tue, 5 Dec 2017 15:48:32 +0100 (CET) From: Quentin Schulz To: linus.walleij@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org, linux@armlinux.org.uk, maxime.ripard@free-electrons.com, lee.jones@linaro.org Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, thomas.petazzoni@free-electrons.com, linux-sunxi@googlegroups.com, Quentin Schulz Subject: [PATCH v5 00/11] add pinmuxing support for pins in AXP209 and AXP813 PMICs Date: Tue, 5 Dec 2017 15:46:38 +0100 Message-Id: <20171205144647.17594-1-quentin.schulz@free-electrons.com> X-Mailer: git-send-email 2.14.1 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The AXP209 and AXP813 PMICs have several pins (respectively 3 and 2) that can be used either as GPIOs or for other purposes (ADC or LDO here). We already have a GPIO driver for the GPIO use of those pins on the AXP209. Let's "upgrade" this driver to support all the functions these pins can have. Then we add support to this driver for the AXP813 which is slighlty different (basically a different offset in two registers and one less pin). I suggest patches 1 to 8 go through Linus's tree and 9 via Lee's. v5: - add reference to pinctrl dt-bindings in driver's dt-binding, - add statement that this driver employs per-pin muxing pattern, - add a patch on top of the patch series to fix checkpatch warnings, - add a few information to the Kconfig to make checkpatch happy, v4: - separate dt-binding patch when adding pinctrl feature, - use - instead of _ in DT node name, - remove muxing operation from pinctrl driver when choosing LDO mux in order to not interfere with the regulator framework, - add adc_mux to specify specific mux value for ADC (different between AXP209 and AXP813), - misc modifications (header include reordering, unsigned int -> u8, new line removal), v3: - add defines for GPIO funcs, - use again get_regs function instead of drv_data (which was implemented in v2), - use of_device_id data for device specific data (gpio_status_offset and pins description), - change compatible from axp813-pctl to axp813-gpio, - use axp81x DT label instead of axp813 since AXP813 and AXP818 are similar, - add dtsi include for all boards embedding axp813/axp818, v2: - add support for AXP813 pins, - split into more patches so it is easier to follow the modifications, - reorder of some patches, - register all pins within the same range instead of a range per pin, Thanks, Quentin Quentin Schulz (9): gpio: axp209: switch unsigned variables to unsigned int pinctrl: move gpio-axp209 to pinctrl pinctrl: axp209: add pinctrl features dt-bindings: gpio: gpio-axp209: add pinctrl features pinctrl: axp209: rename everything from gpio to pctl pinctrl: axp209: add programmable gpio_status_offset pinctrl: axp209: add programmable ADC muxing value pinctrl: axp209: add support for AXP813 GPIOs mfd: axp20x: add pinctrl cell for AXP813 .../devicetree/bindings/gpio/gpio-axp209.txt | 49 ++- drivers/gpio/Kconfig | 6 - drivers/gpio/Makefile | 1 - drivers/gpio/gpio-axp209.c | 188 -------- drivers/mfd/axp20x.c | 3 + drivers/pinctrl/Kconfig | 10 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-axp209.c | 476 +++++++++++++++++++++ 8 files changed, 537 insertions(+), 197 deletions(-) delete mode 100644 drivers/gpio/gpio-axp209.c create mode 100644 drivers/pinctrl/pinctrl-axp209.c -- 2.14.1 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html