From patchwork Mon Oct 2 12:08:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 114580 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp605599qgn; Mon, 2 Oct 2017 05:10:08 -0700 (PDT) X-Google-Smtp-Source: AOwi7QARJGR+QO1q+vRMxMsLaiShdGINmCrQ3fslRZDTF3tf1Cco4CGs3FVfvQeBCeL9QrZeior+ X-Received: by 10.84.149.197 with SMTP id a5mr13643624plh.55.1506946208684; Mon, 02 Oct 2017 05:10:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506946208; cv=none; d=google.com; s=arc-20160816; b=BOwIHuOnsoFRB0PA5UE8qs1yIwac/5jSAWCux9C1Gi5u9WbbZ/S7XHG83G479MoNuJ n9AaXUqcyvKfZJ/8/SqvjTLkkt8W/Yp3lab+JMl8PVnuBlCsn7a/mZ+XZ6uE2GjucCRT EpbUbP2n7F2GPz3kFzRu14j7hbp6/q/KLmwj7HJ57p79OspYm9FSBmdLBDdpkGHPe0sR Buk7rRq5p0e4Q7sXuBhN5AwfIVXC8gDfmRgQ4fRncNWP8JZ+607YYxabuBNz5qM1L6cS mEJCIk4G6eeQ6/5fMQnObzG05YKhf631GwzfCBY8CcUbbma3+uhrWEZ6To6XAnI41rFF MUmw== 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=EZZ4ftOmj951a9Fi1nglDO6F13ZQzTIPR+n/bdwKHwo=; b=F1pZW8Uv7+z/FKuRtylrxUmLGGt9/hY2WyN3A8uneJNl4OSQxIxNLYt/rACSpu58qk ugGKGdb3uWhs641ukbK/U4OZU0lKaP/pgK/qhLRWOQw4PBg87FCwuE9Y3Hmx+cM4wN1F qhpH6ifh9bQWz/4CQTUoifZoabO6RXERe89f8LSWVc0rinYjzGTEo6rAG1lRKxHLjI2G B0JGp5yvFBASK+4o2GJ5PkDIOxsCFqAZ3/qRsyzCF5N5J0Ehkw6akAKrSZJ/UsCKhOMS 00na0di2k0XLWTEU9HAQyfh2vDsQ8RmThxpMn/sL8FZuP25E7t2BSi92HBTSyh0RCdQP IsFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 g10si8374574pln.421.2017.10.02.05.10.08; Mon, 02 Oct 2017 05:10:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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 devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751266AbdJBMKG (ORCPT + 6 others); Mon, 2 Oct 2017 08:10:06 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:45510 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179AbdJBMKE (ORCPT ); Mon, 2 Oct 2017 08:10:04 -0400 Received: by mail.free-electrons.com (Postfix, from userid 110) id 1C3F72077D; Mon, 2 Oct 2017 14:10:01 +0200 (CEST) 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 B88132077D; Mon, 2 Oct 2017 14:10:00 +0200 (CEST) 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 v3 00/12] add pinmuxing support for pins in AXP209 and AXP813 PMICs Date: Mon, 2 Oct 2017 14:08:42 +0200 Message-Id: <20171002120854.5212-1-quentin.schulz@free-electrons.com> X-Mailer: git-send-email 2.11.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 a register and one less pin). I suggest patches 1 to 6 go through Linus's tree and 7 to 12 via Maxime or Chen-Yu's tree. This version of the patchset is based on Chen-Yu's patchset for AXP813/818 regulators[1]. 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, - drastically simplify structures, - rebase on Chen-Yu's patch series for regulators, - add GPIOs pinmuxing for LDO regulators, 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, [1] https://www.spinics.net/lists/arm-kernel/msg608384.html Thanks, Quentin Quentin Schulz (12): pinctrl: move gpio-axp209 to pinctrl pinctrl: axp209: add pinctrl features pinctrl: axp209: rename everything from gpio to pctl pinctrl: axp209: add programmable gpio_status_offset pinctrl: axp209: add support for AXP813 GPIOs mfd: axp20x: add pinctrl cell for AXP813 ARM: dts: sun8i: a711: include axp81x dtsi ARM: dts: sun8i: bananapi-m3: include axp81x dtsi ARM: dts: sun8i: h8homlet-v2: include axp81x dtsi ARM: dts: sun8i: cubietruck-plus: include axp81x dtsi ARM: dtsi: axp81x: add GPIO DT node ARM: dtsi: axp81x: set pinmux for GPIO0/1 when used as LDOs .../devicetree/bindings/gpio/gpio-axp209.txt | 30 -- .../devicetree/bindings/pinctrl/pinctrl-axp209.txt | 67 +++ arch/arm/boot/dts/axp81x.dtsi | 20 + .../boot/dts/sun8i-a83t-allwinner-h8homlet-v2.dts | 2 + arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 2 + arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts | 2 + arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 4 +- drivers/gpio/Kconfig | 6 - drivers/gpio/Makefile | 1 - drivers/gpio/gpio-axp209.c | 188 --------- drivers/mfd/axp20x.c | 3 + drivers/pinctrl/Kconfig | 6 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-axp209.c | 459 +++++++++++++++++++++ 14 files changed, 565 insertions(+), 226 deletions(-) delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-axp209.txt create mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-axp209.txt delete mode 100644 drivers/gpio/gpio-axp209.c create mode 100644 drivers/pinctrl/pinctrl-axp209.c -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai Acked-by: Chen-Yu Tsai