Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp718259imm; Fri, 11 May 2018 05:26:02 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpx3xOqkcBpKTQUY/5IncO+R/dOmw2v62dKiQIZ/g6VUrmkjY4Rfabkfgjgyxo5DmH2Wiaf X-Received: by 2002:a17:902:6bc7:: with SMTP id m7-v6mr5187144plt.162.1526041562656; Fri, 11 May 2018 05:26:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526041562; cv=none; d=google.com; s=arc-20160816; b=U2Xvd3WQsXjK9Nx3fIQZPR+/6gJ85jckviIfebc6u8WAzX9HHH1KKGG+UnMEgma2qw JGH7+theF2C2LhfWH7V1fLQbSLWLPSy+aHh7vw/HC/XYO1ksKgd2uOFq86RUeQhFvMel 1hLGHBpW259rf0yUZu1LNFLZAGr1VW1F3IgmIeuX8N1EggCpgdeeV7XI6bgQGZH3DrSI P1fbpaBFdyG3vircPxDYeud5TX3fadgW3z0uvmkXBm8MWIWenfdbKMo2MFUGw7inBCYP tPRNwygApuVqynmScw1n5hSGZ9NRVREBlhMs7XzgYC2vbVCwE68XLz9ntYrWiG4/G27z LEmw== 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=DgMcvTqVLqgj0Fx6H5v8Vu1BazmJeKiYONdQuj3xyAM=; b=PI2KAfKDYeB1VZdL4XnzEr5ta3CEQgoBzw4GDZNSMN0bZd2VwVDjWdVvyVNnZAtHku DEw7sSrCtAOU35NWJk+hnCm517jlk0UtMbzJmL+zz8/2jrPeQ6rBU1LDSrF5/a0COyzM FBx/2MGGBlr9coSjZAipdILoBY64EQefY4dL0YULaFZUc4cMwUPFV9eam4hFrNiOV500 ytM29z8Y5fXJ+vg2GmkR33WisszLn9aBAURywF6B6uE2D90+rlWXXwbcmcmQk9dGUhSw m6JMp5Fb6LN+cYWRiBt7A2X37FaRr3Ha3FeR+Enlysfpt8OoZBeACUW7prmnERQNVb+O D6Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IblWEthA; 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 a3-v6si3099094pfh.365.2018.05.11.05.25.47; Fri, 11 May 2018 05:26:02 -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=IblWEthA; 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 S1752677AbeEKMZH (ORCPT + 99 others); Fri, 11 May 2018 08:25:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:53258 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750758AbeEKMZF (ORCPT ); Fri, 11 May 2018 08:25:05 -0400 Received: from mail-qt0-f174.google.com (mail-qt0-f174.google.com [209.85.216.174]) (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 CDFA7205F4; Fri, 11 May 2018 12:25:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1526041505; bh=KFf6kB94jVCvQxjSNjjGM19trRF7ZPjAFjN8zIuKGdY=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=IblWEthAhHCOsKAM/pWytU2HzarMC2EJ1mp5JglLxzEGq9vvnI/hmN9Nqsg+aP8F0 MUJaD0bf9NkGj08qt0JzrkivIOWUCGHiYi7zl/64sfcD63qkXK5fe6fOkPtV+07eWJ JBj83TLtkkrUwCkSwca6MbFP56MHwnG0I2tYG11k= Received: by mail-qt0-f174.google.com with SMTP id m16-v6so6726899qtg.13; Fri, 11 May 2018 05:25:04 -0700 (PDT) X-Gm-Message-State: ALKqPwcSnOApbrvMHgrL7q0LfdREXPmiKjXthrdwyPYVKiggbykTqRUb mazOY7R4rteI+VVB6V4IcVuPlWuppA1CLot9VA== X-Received: by 2002:ac8:266f:: with SMTP id v44-v6mr77323qtv.354.1526041504039; Fri, 11 May 2018 05:25:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.155.2 with HTTP; Fri, 11 May 2018 05:24:43 -0700 (PDT) In-Reply-To: <3fdfcc9b-90b5-191c-37e0-c99389a4e872@t-chip.com.cn> 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> <3fdfcc9b-90b5-191c-37e0-c99389a4e872@t-chip.com.cn> From: Rob Herring Date: Fri, 11 May 2018 07:24:43 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 3/5] arm64: dts: rockchip: Add gpio-syscon10 to rk3328 To: Levin Du Cc: Robin Murphy , "open list:ARM/Rockchip SoC..." , Mark Rutland , devicetree@vger.kernel.org, Wayne Chou , Heiko Stuebner , Arnd Bergmann , Catalin Marinas , Will Deacon , "linux-kernel@vger.kernel.org" , Sugar Zhang , Finley Xiao , David Wu , William Wu , Rocky Hao , "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 Thu, May 10, 2018 at 10:45 PM, Levin Du wrote: > 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 No. Once you are describing individual register bits, it is too low level for DT. > 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 > > > > -- > 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