Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp287980imm; Thu, 10 May 2018 20:46:16 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpf3OC0a3v9R9GzUypJzHwvGGSVXCgB8bXC4WU4uuKBW6/C/R8mGzT5MYDT/70pOVeJBiM6 X-Received: by 2002:a62:ecdc:: with SMTP id e89-v6mr3834200pfm.33.1526010376632; Thu, 10 May 2018 20:46:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526010376; cv=none; d=google.com; s=arc-20160816; b=lhNPyvq+nlI763ujLtLe4G8n2598YVtzTINecWSccoIONOxqUCCRdcX45QVoqeZlB2 sclWvnxUrKy82yGDHVTzMG+XES9gjThkqT+dIlO8bFHJYgUw9S1PGkS8mUQLox1nc3kw fGGpKRoknKY0wNCBv44gx9mpYOln8SR1+bv31LDgn+jpEBvw+qr4cvyiizvtDLgIj/yq rymymDeLT0Br7EUJsrfCgDwRyUVbHn7MjIzlkdfIzVUmYABQIswIcnjMd7O9O+NAmpHj VOl1rBWnCp3spE4oMwTciMm5mwPQIAAFnag/P4XiR6lGBDbCSe/T+rvXpk8J7c90P99C XG/g== 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=u1GvzvgaqyDXiesNu7vKh4SwaFO77c1uLs25J4lkvsY=; b=qR1SJLT8JOD+ZmcJN0cfZkNj++13Hk9wCgZlj/QuLqXQXiwY4vXtw+QbV7VgLytfvQ cs4POnZWH2HqyribCZDMXqnR7SSF6PYRG/6frSfRM8YGqGKUa0g6QBokFCkPKnGEzPFA hcGYMOfWX1eR8xy5D+gHKqt2TC6vhcw6WTVHHI9TQNFdiEv+Dy2zpanytDryg9EoVhLx dPlI+TuU51xhz1SHN5h+0RxZn78CoYX7XmbvdfNh7IbNUhXEPBpm7KU9EKNzeYpuLsyC DtZVYsOD7227vqPFed6pmKpUzykie6PHbJVrjVK4bAbwd3hQBLJZHHZ2ajbUg2ziN7dR /4xQ== 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 q80-v6si2311009pfi.109.2018.05.10.20.46.01; Thu, 10 May 2018 20:46:16 -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 S1752119AbeEKDpu (ORCPT + 99 others); Thu, 10 May 2018 23:45:50 -0400 Received: from regular1.263xmail.com ([211.150.99.137]:52170 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750751AbeEKDps (ORCPT ); Thu, 10 May 2018 23:45:48 -0400 Received: from djw?t-chip.com.cn (unknown [192.168.167.239]) by regular1.263xmail.com (Postfix) with ESMTP id 0CC06DCD0; Fri, 11 May 2018 11:45:45 +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.35] (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 38648399; Fri, 11 May 2018 11:45:40 +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: 183.57.25.242 X-LOGIN-NAME: djw@t-chip.com.cn X-UNIQUE-TAG: <14b209c465b9d4dad2f279c56d4daae4> X-ATTACHMENT-NUM: 0 X-SENDER: djw@t-chip.com.cn X-DNS-TYPE: 0 Received: from [168.168.100.35] (unknown [183.57.25.242]) by smtp.263.net (Postfix) whith ESMTP id 227736MLN4Y; Fri, 11 May 2018 11:45:43 +0800 (CST) Subject: Re: [PATCH v1 3/5] arm64: dts: rockchip: Add gpio-syscon10 to rk3328 To: Robin Murphy , linux-rockchip@lists.infradead.org Cc: Mark Rutland , devicetree@vger.kernel.org, Wayne Chou , Heiko Stuebner , Arnd Bergmann , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, Sugar Zhang , Rob Herring , Finley Xiao , David Wu , William Wu , Rocky Hao , linux-arm-kernel@lists.infradead.org References: <1525943800-14095-1-git-send-email-djw@t-chip.com.cn> <1525943800-14095-4-git-send-email-djw@t-chip.com.cn> <76f2bbde-e158-a186-f136-9fb610a810c5@arm.com> From: Levin Du Message-ID: <3fdfcc9b-90b5-191c-37e0-c99389a4e872@t-chip.com.cn> Date: Fri, 11 May 2018 11:45:24 +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: <76f2bbde-e158-a186-f136-9fb610a810c5@arm.com> 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-10 8:50 PM, Robin Murphy wrote: > On 10/05/18 10:16, djw@t-chip.com.cn wrote: >> From: Levin Du >> >> Adding a new gpio controller named "gpio-syscon10" to rk3328, providing >> access to the pins defined in the syscon GRF_SOC_CON10. > > This is the GPIO_MUTE pin, right? The public TRM is rather vague, but > cross-referencing against the datasheet and schematics implies that > it's the "gpiomut_*" part of the GRF bit names which is most significant. > > It might be worth using a more descriptive name here, since "syscon10" > is pretty much meaningless at the board level. > > Robin. > Previously I though other bits might be able to reference from syscon10, other than GPIO_MUTE alone. If it is renamed to gpio-mute, then the GPIO_MUTE pin is accessed as `<&gpio-mute 1>`. Yet other bits in syscon10 can also be referenced, say, `<&gpio-mute 10>`, which is not good. I'd like to add a `gpio,syscon-bit` property to gpio-syscon, which overrides the properties of bit_count,  data_bit_offset and dir_bit_offset in the driver. For example:                 gpio_mute: gpio-mute {                         compatible = "rockchip,gpio-syscon";                         gpio-controller;                         #gpio-cells = <2>;                         gpio,syscon-dev = <0 0x0428 0>;                         gpio,syscon-bit = <1 1 0>;                 }; That way, the mute pin is strictly specified as <&gpio_mute 0>, and <&gpio_mute 1> will be invalid. I think that is neat, and consistent with the gpio_mute name. Thanks Levin