Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5427109rwb; Tue, 1 Aug 2023 02:17:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlH1ZeRxucqrk7dZJBTBeP/rFgCxmcau8NoralUcJeHg/thMMx4bnMbv8cQRZNFkwYAOB5wd X-Received: by 2002:a05:6830:1d7a:b0:6b9:78b5:e30f with SMTP id l26-20020a0568301d7a00b006b978b5e30fmr12230857oti.20.1690881477995; Tue, 01 Aug 2023 02:17:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690881477; cv=none; d=google.com; s=arc-20160816; b=NzG/I7Xp15nV4mv5cD8/RIdDH3WcAJcxub9bNRwy6VZHgVE26EsbgPTmxAeRRQ0vkG jyGFwPwx7Vknp64eLgvLLG++r//T5nn8dd40OXElIRpnF3FStg2lug9GnYxOi3vDV+00 pHS2fgUoGmp3DGTk6H+tfCUJe1zL2eKUndkEaCYcR1gj17SdDR56JkFOesMjNIS/KaN8 NkFNXMWko4NOnSqJJTO1ddG6W5UF9ynE4gA7Akr8GoAjHXgrNaCVtlrNSWJmSdSDad8H vAPqSO0DEUp6V1uVi8hljdAIBnkq3nFVWiGx6PPyLhKA/pN+EYS1j/dORCstNvhu1Taw JFkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=5gvyNXQ0vLncltBn6GI+V6PMaNcihk0rI2xisnc6cdM=; fh=VRXePkykJYzSI8e9NstGSyThzddBVzvQ5loqpQj0png=; b=J9xdnzWCdZXtB5b6TIaDlIWY+NsKhHMl6k292VdF8ZXE2AI64y1Crx8WchEa952+fv P1NbnrLk7afXDnKwfyRC6cDxPsWTTsw9gQ8L0/hJADFQ+50IwqXZan1HiYMqjqY6Wov0 iQ/gTRYCXO7U2lTdLE7EaWLXne8V1Y1umlU1QJo3wgr6RDwlJS6wasAVV3i0tom8geAw NhUBqiKyqfl1Lwi9gyt4puh4n8snKgDO4pW2v2knxYpkjDF7FhHcs76tVqH/uKjxsIHm dfbq11HC1XEfcDWLkRXMa6CNNdXeD3793RPud95xGMb4KMdsQxE1L7M8D7DCLTmRh6HR v+5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 37-20020a631265000000b0055380fbd9e1si8657764pgs.483.2023.08.01.02.17.45; Tue, 01 Aug 2023 02:17:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231958AbjHAIzL (ORCPT + 99 others); Tue, 1 Aug 2023 04:55:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232302AbjHAIy5 (ORCPT ); Tue, 1 Aug 2023 04:54:57 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CE1431FFD; Tue, 1 Aug 2023 01:54:42 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.201]) by gateway (Coremail) with SMTP id _____8AxEvCXw8hko_4NAA--.32002S3; Tue, 01 Aug 2023 16:34:31 +0800 (CST) Received: from [10.20.42.201] (unknown [10.20.42.201]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Ax3c6Ww8hkZMJDAA--.45466S3; Tue, 01 Aug 2023 16:34:30 +0800 (CST) Subject: Re: [PATCH v2 1/2] gpio: dt-bindings: add parsing of loongson gpio offset To: Conor Dooley Cc: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jianmin Lv , wanghongliang@loongson.cn, Liu Peibao , loongson-kernel@lists.loongnix.cn, zhuyinbo@loongson.cn References: <20230731091059.17323-1-zhuyinbo@loongson.cn> <20230731091059.17323-2-zhuyinbo@loongson.cn> <20230731-setback-such-61815ee3ef51@spud> <041bf8a6-8d91-c2ce-6752-aa7255f946c7@loongson.cn> <20230801-whenever-imitation-b2759b212f6b@spud> From: Yinbo Zhu Message-ID: Date: Tue, 1 Aug 2023 16:34:30 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20230801-whenever-imitation-b2759b212f6b@spud> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Ax3c6Ww8hkZMJDAA--.45466S3 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx nUUI43ZEXa7xR_UUUUUUUUU== X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2023/8/1 下午3:23, Conor Dooley 写道: > On Tue, Aug 01, 2023 at 02:39:49PM +0800, Yinbo Zhu wrote: >> >> >> 在 2023/7/31 下午11:55, Conor Dooley 写道: >>> On Mon, Jul 31, 2023 at 05:10:58PM +0800, Yinbo Zhu wrote: >>>> Add parsing GPIO configure, input, output, interrupt register offset >>>> address and GPIO control mode support. >>> >>> This reeks of insufficient use of SoC specific compatibles. Do GPIO >>> controllers on the same SoC have different register offsets? >> >> >> Yes, >> >>> Where are the users for this? >> >> >> For example, ls2k500 contains multiple GPIO chips with different >> (configure, input, output, interrupt) offset addresses, but all others >> are the same. > > Right. That's admittedly not what I expected to hear! Can you firstly > explain this in the commit message, I will add following explain in the commit message. Do you think it's suitable? Loongson GPIO controllers come in multiple variants that are compatible except for certain register offset values. Add support in yaml file for device properties allowing to specify them in DT. > and secondly add a soc-specific > compatible for the ls2k500 and only allow these properties on that SoC? > Sorry, I may not have described it clearly before, the ls2k500 was only as a example, actually, Loongson GPIO controllers (2k500,2k1000,eg)come in multiple variants that are compatible except for certain register offset values. So above all offset device property was used to in all loongson gpio controller. Thanks, Yinbo