Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp932795imm; Wed, 23 May 2018 07:44:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpkrhtvSi1oHYJ1+0oGN1WXeeo+uamRqymZ5vVTZTTFD+uejzVtwGvppZFI3dvb3YN39lF+ X-Received: by 2002:a62:c95c:: with SMTP id k89-v6mr3166623pfg.47.1527086672695; Wed, 23 May 2018 07:44:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527086672; cv=none; d=google.com; s=arc-20160816; b=iIltC3JuJP9qOyd8BNP4E9APRxC/zWMd6OvTwdJ7qD4hexkZ3grRynoqaC52zc3/ws DtAPXGulT1SWD81E20Q1fcwlRZdYDvn9Lh+sfj93srmG5cPw/dsxJJqxRXkDtznl0sUM 04hbLNmtMUVVcL3zHLXOWdm/c8krw4exsZfwMJ9pNJAcIVdcEC5fslWOXwqI4Q3ybXpC wIV/MUe8CPKJ0tyNzdestd5nYZje3esJWvuBb6SKlReQZ2mse791JyRDk8Ojb90Jc89Q 5OqVUVBqyBI4DMHE26m86cLynuFAQA55bCJeNAd2af+NAYywiXQp9mPndgr/U7DP8/jT yAzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=4TTSJmWib7UIxGG/QMX/LXg9xqx9iDk9K3xyT4eQTsw=; b=Tf6H6nRsTWXUrz4z3RLFo5KIhSgqbLPNSLZwBXbgYYXwi1gQ8QGbOE0s8z6DmwnX5a lMrX4j++bNLuhXqiSYOuzwJBF9gT3+d3iVJiwoBgPXQu12MZgYdlnuYRysaue3wV5GYb kLtCuBTGdsjR799xwfbC19hPxcdE2dgh0s4DYxD+8HvGsiH5iCT/ztGOS41OEVKUgIu3 qrrNXxZZgF5s68ZekcKnvCZpJayBI107s9LfCCmQ+rzi7zPy4kj+5MSQ+lQv3YtJIu9h RZHAA9a/T8F08oOzlvf0fdxF5wErWBb36e14BwBnL8g2QiY5LDY3VD55c5kFcwbCA40K RQOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YCwakMDf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e33-v6si18460544pld.231.2018.05.23.07.44.18; Wed, 23 May 2018 07:44:32 -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; dkim=pass header.i=@kernel.org header.s=default header.b=YCwakMDf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933360AbeEWOnb (ORCPT + 99 others); Wed, 23 May 2018 10:43:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:58710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933199AbeEWOn3 (ORCPT ); Wed, 23 May 2018 10:43:29 -0400 Received: from mail-qt0-f177.google.com (mail-qt0-f177.google.com [209.85.216.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9DD1120873; Wed, 23 May 2018 14:43:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527086608; bh=5NcArPajKgm0oK7Gx5689mRvh9csS+SoqMcg9eR6hoU=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=YCwakMDf6KsY6SNGfDMsysVpeMfNVso8IOMGNd/MJhsenKuLm4SYdMGdawejeBBls +/oykd/sA0SoArf+icL8AZxQRGAbW39qfOEhaLaaUDaSjzTzj2bmT/NflVM+lFxOAE gfcL3CoeDz3Fk4Bz6QwdSHc2KmtCUfw6ZKEa6KrI= Received: by mail-qt0-f177.google.com with SMTP id e8-v6so28373963qth.0; Wed, 23 May 2018 07:43:28 -0700 (PDT) X-Gm-Message-State: ALKqPweBQWbvDo0XkiHK8kAt9eZeyrv9bOF9JzfXk9whDn+qWDWjGJvb QAFSo8VlkCegDB7/aUHZlLWTUfdCTGK1feDkyQ== X-Received: by 2002:a0c:aa9a:: with SMTP id f26-v6mr2857279qvb.106.1527086607828; Wed, 23 May 2018 07:43:27 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0c:9b02:0:0:0:0:0 with HTTP; Wed, 23 May 2018 07:43:07 -0700 (PDT) In-Reply-To: <6ffb43dc-55a5-14eb-eb18-3a731cdaf424@t-chip.com.cn> 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> <6ffb43dc-55a5-14eb-eb18-3a731cdaf424@t-chip.com.cn> From: Rob Herring Date: Wed, 23 May 2018 09:43:07 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/5] gpio: syscon: Add gpio-syscon for rockchip To: Levin Du Cc: "open list:ARM/Rockchip SoC..." , Wayne Chou , Heiko Stuebner , devicetree@vger.kernel.org, Linus Walleij , "linux-kernel@vger.kernel.org" , "open list:GPIO SUBSYSTEM" , Mark Rutland , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 22, 2018 at 9:02 PM, Levin Du wrote: > 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"; Yes, but drop "rockchip,gpio-syscon" and "simple-mfd". > + //... > + gpio-controller; > + #gpio-cells = <2>; > + gpio,syscon-dev = <&grf 0x0428 0>; And drop this. It may be used in the kernel, but it is not a documented property. > + }; > > 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 > > -- > 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