From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4AB7C04A6A for ; Wed, 9 Aug 2023 13:00:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232165AbjHINAs (ORCPT ); Wed, 9 Aug 2023 09:00:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232127AbjHINAr (ORCPT ); Wed, 9 Aug 2023 09:00:47 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E82D2106 for ; Wed, 9 Aug 2023 06:00:47 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-99bfcf4c814so985920666b.0 for ; Wed, 09 Aug 2023 06:00:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691586045; x=1692190845; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=BkQfk41wpqfjz+mLvTVXwnfN3tFzJusZiA/ZzblZA/c=; b=JOt/neGsXumf2WLwlF0maWpAxYugaJRAPqX2QsPsvyHfvEorQnvr2rifTBwv0cxtYt OK/482mz0avRMRrBF7JmOgcLMPsmGgRPTB5plHb+b1/whOCnWs5CAf++wq3rCa9F6k3L XMXUEu+L85QAl34800PQFNkBIB+OiX0duWdMqPg2UUBVigdodRQphjXlXpJYZyhDKX8r k5Sg24NFQb8BL9eTraIpLvpYqzOCmDE1nIIgOIpt/T+DuF0VosMneN4Hx6sY8LKhM+pT QPMdzI9YPaDPkFCFLHV2wtnam9AVovJuKgZHI226oYAhei4exylUorWsXSLTku0TBS6M J7ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691586045; x=1692190845; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BkQfk41wpqfjz+mLvTVXwnfN3tFzJusZiA/ZzblZA/c=; b=gGg7xGjunEOOjcatWo5AFr/XP3yxyuFtBE9Pl2YrEDrDMwf5hP9nHLUYRwlsNddL4Z BtjgPBRg/at6h11G82birLZjNiTAMtLwMlYeI0Nq5ufWNK6Hxo7JFh1BME4vp7Tf2EaM msM1xJVYR6HdKW81yroYZ2BMDdaloWjec6/hdm/7sTeTCMHGPVhBSkwcHkancpwFKHaL cxCJHQuEGUZTNSda3zEiq9bnbR0aFduApge8+0GjDlVocFO7yDD7ErUv63twTQyphfOB 9dnFNtlvSYPkKPu9v8jOgjeBUcq62/u5+AQmO7xUSMFC9EZcGOO1gPxnJzZ2dIJFR5Xr g6wA== X-Gm-Message-State: AOJu0YzW/8sGTdvFfh4Fl35xf/XLwEeH5gz8Hpy/Y9MhEj9rQTG1XRhG ldUSnEPtLfNFRDSYvdse3zKnXQ== X-Google-Smtp-Source: AGHT+IG/xFtqsZIi/wA1IMhYIyCrPe8A6tlho6R+B+aFuU7npNcg9qbHmJn2OSrG0KdQ6W7qc2IZ4g== X-Received: by 2002:a17:907:77c8:b0:99b:f8e7:130f with SMTP id kz8-20020a17090777c800b0099bf8e7130fmr2114166ejc.15.1691586045471; Wed, 09 Aug 2023 06:00:45 -0700 (PDT) Received: from [192.168.1.20] ([178.197.222.113]) by smtp.gmail.com with ESMTPSA id bw5-20020a170906c1c500b00988f168811bsm8049495ejb.135.2023.08.09.06.00.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Aug 2023 06:00:45 -0700 (PDT) Message-ID: Date: Wed, 9 Aug 2023 15:00:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH v3 1/2] gpio: dt-bindings: add parsing of loongson gpio offset To: Yinbo Zhu , Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jianmin Lv , wanghongliang@loongson.cn, loongson-kernel@lists.loongnix.cn References: <20230807074043.31288-1-zhuyinbo@loongson.cn> <20230807074043.31288-2-zhuyinbo@loongson.cn> <91f57b0d-a6e9-c039-40b6-0a1a9af5f7a0@linaro.org> <78c5a043-3e2a-48d6-88bd-2f91cc6d1347@loongson.cn> Content-Language: en-US From: Krzysztof Kozlowski In-Reply-To: <78c5a043-3e2a-48d6-88bd-2f91cc6d1347@loongson.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 09/08/2023 09:28, Yinbo Zhu wrote: >> >>> - gpio-ranges >>> - interrupts >>> >>> @@ -49,11 +82,16 @@ examples: >>> #include >>> >>> gpio0: gpio@1fe00500 { >>> - compatible = "loongson,ls2k-gpio"; >>> + compatible = "loongson,ls2k1000-gpio"; >>> reg = <0x1fe00500 0x38>; >>> ngpios = <64>; >>> #gpio-cells = <2>; >>> gpio-controller; >>> + loongson,gpio-conf-offset = <0>; >>> + loongson,gpio-in-offset = <0x20>; >>> + loongson,gpio-out-offset = <0x10>; >>> + loongson,gpio-ctrl-mode = <0>; >>> + loongson,gpio-inten-offset = <0x30>; >> >> I still think that you just embed the programming model into properties, >> instead of using dedicated compatible for different blocks. It could be >> fine, although I would prefer to check it with your DTS > > Okay, I got it, and if I understand correctly, you seem to agree with > me adding attributes like this. > > And, if using this method that programming model into dts properites, > then when adding a new platform's GPIO, there is no longer a need to > modify the driver because gpio controller is compatible and different > platform can use a same compatible. Uhu, so there we are. You use this method now to avoid new compatibles. No, therefore I do not agree. > >> >> Where is your DTS? > > > Sorry, the dts containing gpio nodes are only available in the product > code and have not been sent to the community yet. Does not help to convince us, but it is your right. With this and above explanation, my answer is no - NAK. Best regards, Krzysztof