From patchwork Fri Dec 1 13:44:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 843500 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3ypFxD6dbxz9tBL for ; Sat, 2 Dec 2017 00:49:04 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752960AbdLANsr (ORCPT ); Fri, 1 Dec 2017 08:48:47 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:36209 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752691AbdLANpu (ORCPT ); Fri, 1 Dec 2017 08:45:50 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 5D7F9209E5; Fri, 1 Dec 2017 14:45:48 +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 0AF8420399; Fri, 1 Dec 2017 14:45:38 +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 v4 00/10] add pinmuxing support for pins in AXP209 and AXP813 PMICs Date: Fri, 1 Dec 2017 14:44:41 +0100 Message-Id: X-Mailer: git-send-email 2.14.1 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 two registers and one less pin). I suggest patches 1 to 8 go through Linus's tree and 9 and 10 via Maxime or Chen-Yu's tree. 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 (10): 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 ARM: dtsi: axp81x: add GPIO DT node ARM: dtsi: axp81x: set pinmux for GPIO0/1 when used as LDOs Documentation/devicetree/bindings/gpio/gpio-axp209.txt | 41 +- arch/arm/boot/dts/axp81x.dtsi | 20 +- 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 | 477 ++++++++++- 9 files changed, 546 insertions(+), 197 deletions(-) delete mode 100644 drivers/gpio/gpio-axp209.c create mode 100644 drivers/pinctrl/pinctrl-axp209.c base-commit: fb20eb9d798d2f4c1a75b7fe981d72dfa8d7270d Acked-by: Maxime Ripard Acked-by: Maxime Ripard Acked-by: Linus Walleij Acked-by: Linus Walleij Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai Acked-by: Chen-Yu Tsai