Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp289081imm; Tue, 22 May 2018 19:03:55 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqNe/8M2AMCQZrT617hfnsLZVG9MdYeGr/8ZfnzoZlF7ANoO0bNjtgl2bwtQhApVifNJi3p X-Received: by 2002:a62:5754:: with SMTP id l81-v6mr905453pfb.56.1527041035775; Tue, 22 May 2018 19:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527041035; cv=none; d=google.com; s=arc-20160816; b=zbrbieCFEp9z1ZOVNr5tmCjP2RDofHSWpClTW6jXM4Dgy9FBPMXc+aJLHBtfDokcPX AXZ1cF86I/bayRyxGwlrKtMOFTLry7A7QPtzXDhM/7wRq57zVdCCLgOW0fxNZZwyboU/ X0CfNAgV7ySrIEHk0HfmSzJjvflacNxM3Nqj4uEeCRJUgrgcca3dMcaRWDF1ixn+kubV SyBuYTW+165lyWT0eKz5E9m/tX4j5WXt8CJc8jBHYa4xxE6Azdua6Pam3Qu/71B95582 0uW8JuvvmNTx6RLDSnzbMyhdhpN39RXXHcY8bW30SA9Mpi8HgIRl6Auir/Wt7a1rKhEd HE3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=9w9JoFLfJpH9A/Y4BEwD/Nhz7QjOvaaZGyiaHwhoDv4=; b=uuqwwPRbjLhNLqQ5uLdqGVak4bnNq41dgAk2Dg4G4maAyyHL/zqK38G39G3UtN5o9i hIBCQ8kNAbB5fhkKvV7ObrwRy08uqgwpQFYem5qquXlYaO6TLvKg51xlgZFlm7p/8Yj1 5a35gpt6PgtqPOiU5olRlJ3xPRrtcfQrYeuOEQchYQVOU7/bTGS0iR9QVs0tO7TVqIWB k5ay81UroOpnfnXCc3cZBwBRUCZgZXadbi4JV8BZ+lC5BFg2NLN1pzhHfQKyEuSacFYw CqLb1an9vjN1pqS9cm0WY4QoiwLrvH0nGuGNXH+lLNbSX3GNJTD6aqwDxP4OO66KCGt7 DQMA== 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 p13-v6si3408656pgs.193.2018.05.22.19.03.41; Tue, 22 May 2018 19:03:55 -0700 (PDT) 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 S1753853AbeEWCCt (ORCPT + 99 others); Tue, 22 May 2018 22:02:49 -0400 Received: from regular1.263xmail.com ([211.150.99.130]:38904 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753701AbeEWCCr (ORCPT ); Tue, 22 May 2018 22:02:47 -0400 Received: from djw?t-chip.com.cn (unknown [192.168.167.153]) by regular1.263xmail.com (Postfix) with ESMTP id 1B42AB15B; Wed, 23 May 2018 10:02:40 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from [168.168.100.66] (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 1A0483C6; Wed, 23 May 2018 10:02:31 +0800 (CST) X-IP-DOMAINF: 1 X-RL-SENDER: djw@t-chip.com.cn X-FST-TO: linux-arm-kernel@lists.infradead.org X-SENDER-IP: 59.33.100.150 X-LOGIN-NAME: djw@t-chip.com.cn X-UNIQUE-TAG: <44bf2a732710535411c1926523a7acd8> X-ATTACHMENT-NUM: 0 X-SENDER: djw@t-chip.com.cn X-DNS-TYPE: 7 Received: from [168.168.100.66] (150.100.33.59.broad.zs.gd.dynamic.163data.com.cn [59.33.100.150]) by smtp.263.net (Postfix) whith ESMTP id 55532ZBY8O; Wed, 23 May 2018 10:02:36 +0800 (CST) Subject: Re: [PATCH v2 2/5] gpio: syscon: Add gpio-syscon for rockchip To: Rob Herring Cc: linux-rockchip@lists.infradead.org, Wayne Chou , Heiko Stuebner , devicetree@vger.kernel.org, Linus Walleij , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Mark Rutland , linux-arm-kernel@lists.infradead.org References: <1526614328-6869-1-git-send-email-djw@t-chip.com.cn> <1526615528-9707-1-git-send-email-djw@t-chip.com.cn> <1526615528-9707-2-git-send-email-djw@t-chip.com.cn> <20180522180238.GA7328@rob-hp-laptop> From: Levin Du Message-ID: <6ffb43dc-55a5-14eb-eb18-3a731cdaf424@t-chip.com.cn> Date: Wed, 23 May 2018 10:02:15 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180522180238.GA7328@rob-hp-laptop> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-05-23 2:02 AM, Rob Herring wrote: > On Fri, May 18, 2018 at 11:52:05AM +0800, djw@t-chip.com.cn wrote: >> From: Levin Du >> >> Some GPIOs sit in the GRF_SOC_CON registers of Rockchip SoCs, >> which do not belong to the general pinctrl. >> >> Adding gpio-syscon support makes controlling regulator or >> LED using these special pins very easy by reusing existing >> drivers, such as gpio-regulator and led-gpio. >> >> Signed-off-by: Levin Du >> >> --- >> >> Changes in v2: >> - Rename gpio_syscon10 to gpio_mute in doc >> >> Changes in v1: >> - Refactured for general gpio-syscon usage for Rockchip SoCs. >> - Add doc rockchip,gpio-syscon.txt >> >> .../bindings/gpio/rockchip,gpio-syscon.txt | 41 ++++++++++++++++++++++ >> drivers/gpio/gpio-syscon.c | 30 ++++++++++++++++ >> 2 files changed, 71 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/gpio/rockchip,gpio-syscon.txt >> >> diff --git a/Documentation/devicetree/bindings/gpio/rockchip,gpio-syscon.txt b/Documentation/devicetree/bindings/gpio/rockchip,gpio-syscon.txt >> new file mode 100644 >> index 0000000..b1b2a67 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/gpio/rockchip,gpio-syscon.txt >> @@ -0,0 +1,41 @@ >> +* Rockchip GPIO support for GRF_SOC_CON registers >> + >> +Required properties: >> +- compatible: Should contain "rockchip,gpio-syscon". >> +- gpio-controller: Marks the device node as a gpio controller. >> +- #gpio-cells: Should be two. The first cell is the pin number and >> + the second cell is used to specify the gpio polarity: >> + 0 = Active high, >> + 1 = Active low. > There's no need for this child node. Just make the parent node a gpio > controller. > > Rob Hi Rob, it is not clear to me. Do you suggest that the grf node should be a gpio controller, like below? +    grf: syscon at ff100000 { +        compatible = "rockchip,gpio-syscon", "rockchip,rk3328-grf", "syscon", "simple-mfd"; +        //... +        gpio-controller; +        #gpio-cells = <2>; +        gpio,syscon-dev = <&grf 0x0428 0>; +    }; or just reserve the following case in the doc? +    grf: syscon at ff100000 { +        compatible = "rockchip,rk3328-grf", "syscon", "simple-mfd"; +        //... +    }; + +    gpio_mute: gpio-mute { +        compatible = "rockchip,gpio-syscon"; +        gpio-controller; +        #gpio-cells = <2>; +        gpio,syscon-dev = <&grf 0x0428 0>; +    }; Thanks Levin