From patchwork Fri Dec 1 13:44:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 120333 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1158916qgn; Fri, 1 Dec 2017 05:47:49 -0800 (PST) X-Google-Smtp-Source: AGs4zMZZMlYMK+S2lA2SH+7/1QMbNXdhQxaRZbGntamWWVPSmQidizF3tIC/+m3fwv99xGIj6ILk X-Received: by 10.101.81.68 with SMTP id g4mr6004398pgq.166.1512136069042; Fri, 01 Dec 2017 05:47:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512136069; cv=none; d=google.com; s=arc-20160816; b=PYDlziP3AcsxZCJwiCLbn/wjqIT+1pL2GRvVZ10fKjsh6r77CgMip7Y9wFHrT9t5ZL 69/iPR0Z5nlPttxLc76VcArsi+u+mvpJTV8iiu+lEOP8yEmsXRQmxutrLHqh5tRUjguH dQi1t8pUmQBID2jxQBhpYt97kxUUr+iXhCv/zQgGh7hhysSZaEycDOQMEQXz8EjG4AKc gQFIcyDub3F9FtlTNfbbl9i8qzuyDDWAGoi2aXM9rw5lf4VYuCVtqoPDXbRQGJ1nA6wo c6xxZoEiTbqnRVB11ZOrGOjbkG5+A06k4LRwHy/AUrXfJG5se/frE1fNBgN5zK9pxSLH QxLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=5BpkQRdheLoSYHqBpXDd0b60cL3O/TkQhx7/bCAGz30=; b=l5opJ32szc6e1jKT3/gz9EZ1mmVmazYCchTuwzXFU4/SoSegiZvlrRoCgFnxk7aRHn GEx8LZbBrcG13HlYiRe3mOqmBUcskwZGShhOfp3wplixnJ47YQn0JgnupSKPIiJbwL+8 82ZaLyBEKQqxWnXS4xVk4f5c69UqPBtYM0VYpws2U/fWItK3xgD9nWVvkGXHo22or74x +zqaIOAsYFW9w/M2h336Q89d8v/C+uHutqSsZMszk0pVA9EL4zy2e1hseZJUZ6tf18PC MnXGliU9kYDfLaCt0LwkyH+t/68CgKKpbGm3t10Hh89Sp0jvFfTHJ4NOSNmPSAx/scjq Tyrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 a23si5203261pfa.111.2017.12.01.05.47.48; Fri, 01 Dec 2017 05:47:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753217AbdLANrV (ORCPT + 28 others); Fri, 1 Dec 2017 08:47:21 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:36239 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752874AbdLANpv (ORCPT ); Fri, 1 Dec 2017 08:45:51 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 55FF5209E9; Fri, 1 Dec 2017 14:45:49 +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 F405E2097F; 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 03/10] dt-bindings: gpio: gpio-axp209: add pinctrl features Date: Fri, 1 Dec 2017 14:44:44 +0100 Message-Id: <7fdc42fd2d3572069292ebe1376bb446beb4d8a9.1512135804.git-series.quentin.schulz@free-electrons.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The X-Powers AXP209 has 3 GPIOs. GPIO0/1 can each act either as a GPIO, an ADC or a LDO regulator. GPIO2 can only act as a GPIO. This adds the pinctrl features to the driver so GPIO0/1 can be used as ADC or LDO regulator. Signed-off-by: Quentin Schulz Acked-by: Rob Herring --- Documentation/devicetree/bindings/gpio/gpio-axp209.txt | 28 ++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) -- git-series 0.9.1 diff --git a/Documentation/devicetree/bindings/gpio/gpio-axp209.txt b/Documentation/devicetree/bindings/gpio/gpio-axp209.txt index a661130..4705020 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-axp209.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-axp209.txt @@ -1,4 +1,4 @@ -AXP209 GPIO controller +AXP209 GPIO & pinctrl controller This driver follows the usual GPIO bindings found in Documentation/devicetree/bindings/gpio/gpio.txt @@ -28,3 +28,29 @@ axp209: pmic@34 { #gpio-cells = <2>; }; }; + +The GPIOs can be muxed to other functions and therefore, must be a subnode of +axp_gpio. + +Example: + +&axp_gpio { + gpio0_adc: gpio0-adc { + pins = "GPIO0"; + function = "adc"; + }; +}; + +&example_node { + pinctrl-names = "default"; + pinctrl-0 = <&gpio0_adc>; +}; + +GPIOs and their functions +------------------------- + +GPIO | Functions +------------------------ +GPIO0 | gpio_in, gpio_out, ldo, adc +GPIO1 | gpio_in, gpio_out, ldo, adc +GPIO2 | gpio_in, gpio_out