Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1673973iog; Sat, 25 Jun 2022 16:26:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vw1jbqtgaRES00z2F7bWIPzllXGXsVxiMf1Tvunr+0zSp4XBTaP1+nJEpffjNtWV6shlyt X-Received: by 2002:a05:6a00:2995:b0:525:398b:8585 with SMTP id cj21-20020a056a00299500b00525398b8585mr6622255pfb.7.1656199597364; Sat, 25 Jun 2022 16:26:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656199597; cv=none; d=google.com; s=arc-20160816; b=FlWSX8RUyWOCEBH5bYbWhMV7UEPhtZgnn6c7Ljbwc+gep1X0nZi6w9IQChEIyl1qVq QLUYfS/vGnLjf/kVm35sI05oTE7+AqxuvXhJdckPtfFrfvVl/Dz+wG3yE3uFqi5JGitH N9UT7rBNhcy2Wtyd/n2ooDn0Mx5+KmKKTPb3FPju2eg7A1w+cW2i1D5oWkj808USEvAf Y5S6PgIN6Tz2vd1QI2svLXsKUF9xP83ksTUpjO6VmiaKIcx6ZxZ7/EYoZVgpCM/ij5YF PcLFwReNooAcmAnx071CQc3Rl4uSa03W0Wuii1dwQmVBUWA8eyjvrGli/UtlaLrt6aJ0 0PKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Kz4CQpOKhPTyDsa60xKPIiVM3jnSyd80mVmcmJIhuHQ=; b=Glcd82jtMkrUkp8tB3hUr7QQz2hn6lFzMt1BLNEe3CjukbXHaP6LBTQjLM1qv7WGBA S2+iaJ1Kz2vYr1RaOZBhWLT1ZrjnHx+dkYoEpfI4ORDyauX8iC+CNOT/KVxqiBmmAwLt suPkK23+9Eo7URqD3QY3Mmjendx2zODqxX33ymp0p/BDTVa2nREjdVLMinG29y25o1gD kHot87uTlpxdSYD++jGcFdkimUrTMWHJLzuKmi3WKZk27qdMVwgpQHpN+GwWeOFvvWjK rOd1rglV45aeuhKP/vqogq1rwRwmAmc8n9vBawQlChl1FfLQmYUcFxZJgEUosWVLfQ3X qbpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f0R0dNNf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z15-20020aa7888f000000b0051c20f51870si8814485pfe.320.2022.06.25.16.26.25; Sat, 25 Jun 2022 16:26:37 -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; dkim=pass header.i=@linaro.org header.s=google header.b=f0R0dNNf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233723AbiFYW73 (ORCPT + 99 others); Sat, 25 Jun 2022 18:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233295AbiFYW72 (ORCPT ); Sat, 25 Jun 2022 18:59:28 -0400 Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B95C713FA9 for ; Sat, 25 Jun 2022 15:59:26 -0700 (PDT) Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-3176d94c236so55014277b3.3 for ; Sat, 25 Jun 2022 15:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Kz4CQpOKhPTyDsa60xKPIiVM3jnSyd80mVmcmJIhuHQ=; b=f0R0dNNfG+cy3gFp7wt9apjvTZnUDWzypyV4qpxTt0EYhTusE7dczqOjHtdnJ6vezN zHCYjY76OuU7+5Kurfz9oaZcDHK4a3uwUh3eDulaNbh8hB6891r6dpwGNRRrYLaL0rGI lXHEoGEl0PVXK+UANPXZuirl60K+W2t2Kir2E6bca3VxQvvETRSmzmqghmbYWZRf2c+O qQ7Uwvryau8aALkvZtL19zhwrXOxRQuMK4ocOgSBgDpdEydMdiCLF+mETnI5hsInX+0a 9Jd7mhj/C6OsaaKO0Au+5T+hKmp/3hxrDjcU/5FKa/Ui/MGI9jYcSPGrFadHuCt/y8Bb VoKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Kz4CQpOKhPTyDsa60xKPIiVM3jnSyd80mVmcmJIhuHQ=; b=qXo7sh5WXZ+qa1J5rv+qj8Do2lhj2JC80C91klER6+BYM1+dULuQKHyfECD22iw+So JwXpFNf/z6VVAZ0jIdqhD7F50sHkdWmeY9TkkEiFx9aXG7OOZ5xIuKVfDVYl7Z9WE2Or LqM4axnGf3IJwuzaDzrMdxq5Oe/rjWyWw8fS661js3/3UwRspfzk4t23WZ6qQ7quNlH6 hQR/rUtAiVpF67YPcKsat1reb239o+5EcHYlJPafgZu+gB49cqVV0HRVcjuHXrYXpJbk XDvXtPQen9So6hmMLNTpcV1Pif+QLdC3p5IrfSoARqtjxmL5vgqdWGoyOGvL3+4QLVdH +qSg== X-Gm-Message-State: AJIora9MnLGxDuS277CNpHzh/v2HB+If+Md3gdFdz5QZxA6RAhTzUyl/ hJmLNrgjceVoDTXiYiLGG95buJOuwk96JWox/pAebw== X-Received: by 2002:a0d:eace:0:b0:317:87ac:b3a8 with SMTP id t197-20020a0deace000000b0031787acb3a8mr6860068ywe.126.1656197966000; Sat, 25 Jun 2022 15:59:26 -0700 (PDT) MIME-Version: 1.0 References: <20220427144620.9105-1-pmalgujar@marvell.com> <20220427144620.9105-3-pmalgujar@marvell.com> <20220603090618.GA27121@Dell2s-9> <20220613080452.GA1884@Dell2s-9> In-Reply-To: <20220613080452.GA1884@Dell2s-9> From: Linus Walleij Date: Sun, 26 Jun 2022 00:59:14 +0200 Message-ID: Subject: Re: [PATCH 2/5] dt-bindings: gpio: gpio-thunderx: Describe pin-cfg option To: Piyush Malgujar Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, brgl@bgdev.pl, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, rric@kernel.org, cchavva@marvell.com, wsadowski@marvell.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Mon, Jun 13, 2022 at 10:04 AM Piyush Malgujar wrote: > Thanks for the reply. > But as in this case, we expect a 32 bit reg value via DTS for this driver > only from user with internal understanding of marvell soc and this reg bit > value can have many different combinations as the register fields can vary > for different marvell SoCs. > This patch just reads the reg value from DTS and writes it to the register. I understand that this is convenient but it does not use the right kernel abstractions and it does not use device tree bindings the right way either. Rewrite the patches using definitions and fine control and move away from magic numbers to be poked into registers. Yours, Linus Walleij