Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1974622ioo; Mon, 23 May 2022 07:23:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmjWFEeXlrgDCces8s2UvEXVVAMP5TpEWZUH+lZHvtddfhzCMa/BiDW90k/ZhodEuXk+5/ X-Received: by 2002:a17:902:e88d:b0:161:cf94:6000 with SMTP id w13-20020a170902e88d00b00161cf946000mr23043255plg.62.1653315813813; Mon, 23 May 2022 07:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653315813; cv=none; d=google.com; s=arc-20160816; b=JI8HWh2N3xVODknV4lHVzJOgdVY0TjZwyEonXy1nd/6f3QXLcLsVTiuQz6ZHAY1jcD OH+akaYlWMLuf4+9/lO00BB7cL/aagKnWAR9TVpma8xfU4RcYHqoTI5A64+EUwWztt5X SJ/gPlwH+fdeB1ryfbXDvTbsOGsMQi+zAqTx/rbweSifTcoCt7UCTThdQycQe+FeoHfM aFsqXL5FsNgZEhdABLOFTQgWZ0117hAwk+4t8dFXG8PJFmiw7kT6XHS1YkduRR+lak75 BQLN5je1r9ZbrMAW8WN5VG3MZkhEAlmzUEyo86NFH3wFibRv+CwPxp09o2XKe2SfvJIM gCGQ== 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; bh=N6EnHNW72poBEAFOl9gSp7lOZY9kd68M75fXJVPe+FI=; b=htR4vpfgKFsJWmcTQOrAze0HpcM0fBneiLewRT8gcQJxuAtkz+a01kHpMlIkjQ6pE9 E4+KFzns0OTOmQj+LBj3hctDp95CICxq9zvrTWXOJkYTn4Y8Tf0ogpuAtcWP8UX9D1UE rSDH2ZZbNPCmqUyWVdig6vinvjorpElYbfVnePapZiUhX7PTy+8RixVEneSGbu/TCRBu FEjG1pdlWHHVuPBjUEcKSnHLdYOybcvTgrX17Hk+eW7Cc7J3WllqPBfsMkipFk1H9/46 iLhTaVm5+jvh1zpBwCKNlDd25c/jWWoiCmyClwEs5L6602aJ4TrptzywGD1jOBHDSCmj 8r2A== 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:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id pi1-20020a17090b1e4100b001dc3f088349si18617526pjb.139.2022.05.23.07.23.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 07:23:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9942C53E17; Mon, 23 May 2022 07:22:52 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237006AbiEWOWi (ORCPT + 99 others); Mon, 23 May 2022 10:22:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236989AbiEWOWf (ORCPT ); Mon, 23 May 2022 10:22:35 -0400 Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF4952529D; Mon, 23 May 2022 07:22:34 -0700 (PDT) Received: by mail-oi1-f175.google.com with SMTP id e189so17965382oia.8; Mon, 23 May 2022 07:22:34 -0700 (PDT) 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=N6EnHNW72poBEAFOl9gSp7lOZY9kd68M75fXJVPe+FI=; b=n+evG+gbjWhetTxmwEJgCmnp3B/BnCsxA/5gdh2ciYda0uqVoXbz2djuILdZRR9+PB kRBdjeZ3FV0bAsLpxcq8Iz7ho2fVx1STG3hgeup3Lui2vIYfLrsAcgUR0tNdXnEyJQb6 DSD8l7bAFUZfbWCodzfc9lTKY9cykBiR+7UmXG/dOdjuOjbxl+4H1IiHS/YNJzpWUfLb HEGszbeP29LXYxs09avSz1OCWRNK/QJboSiAw26qh2GRBRBGv25dxLH3Tn+FSCQR7E4K LOdwWVW0xHpfCiuhdoJJhMVlut4Vl4ChmR1wrX/ZdLeEkT8r+WxyoAkk024HDNDxjQJW K/+Q== X-Gm-Message-State: AOAM5301FfpMY5p5neAktAxewZxscOHUXr+moSqEGflRSMPINCPRcrph iYM4f8gGefgSo895KwAN51hZJMnkd++3aw== X-Received: by 2002:a05:6808:3097:b0:32b:1198:25ea with SMTP id bl23-20020a056808309700b0032b119825eamr5082893oib.196.1653315754129; Mon, 23 May 2022 07:22:34 -0700 (PDT) Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com. [209.85.210.42]) by smtp.gmail.com with ESMTPSA id i12-20020a056830010c00b0060aea5bbc87sm3994359otp.18.2022.05.23.07.22.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 May 2022 07:22:34 -0700 (PDT) Received: by mail-ot1-f42.google.com with SMTP id g13-20020a9d6b0d000000b0060b13026e0dso2197689otp.8; Mon, 23 May 2022 07:22:33 -0700 (PDT) X-Received: by 2002:a25:e04d:0:b0:64d:6f23:b906 with SMTP id x74-20020a25e04d000000b0064d6f23b906mr21745041ybg.380.1653315743376; Mon, 23 May 2022 07:22:23 -0700 (PDT) MIME-Version: 1.0 References: <20220522155046.260146-1-tmaimon77@gmail.com> <20220522155046.260146-12-tmaimon77@gmail.com> <86cd6a37-70ad-3a90-bc8a-dcd8b41f1175@linaro.org> In-Reply-To: From: Geert Uytterhoeven Date: Mon, 23 May 2022 16:22:12 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 11/19] dt-bindings: reset: npcm: Add support for NPCM8XX To: Tomer Maimon Cc: Krzysztof Kozlowski , Avi Fishman , Tali Perry , Joel Stanley , Patrick Venture , Nancy Yuen , Benjamin Fair , Rob Herring , Krzysztof Kozlowski , Michael Turquette , Stephen Boyd , Philipp Zabel , Greg KH , Daniel Lezcano , Thomas Gleixner , Wim Van Sebroeck , Guenter Roeck , Catalin Marinas , Will Deacon , Arnd Bergmann , Olof Johansson , Jiri Slaby , Shawn Guo , =?UTF-8?Q?Bj=C3=B6rn_Andersson?= , Geert Uytterhoeven , Marcel Ziswiler , Vinod Koul , Biju Das , Nobuhiro Iwamatsu , Robert Hancock , =?UTF-8?Q?Jonathan_Neusch=C3=A4fer?= , Lubomir Rintel , arm-soc , devicetree , Linux Kernel Mailing List , linux-clk , "open list:SERIAL DRIVERS" , Linux Watchdog Mailing List , Linux ARM Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Tomer, On Mon, May 23, 2022 at 4:03 PM Tomer Maimon wrote: > On Mon, 23 May 2022 at 12:01, Krzysztof Kozlowski wrote: >> On 22/05/2022 17:50, Tomer Maimon wrote: >> > Add binding document and device tree binding >> > constants for Nuvoton BMC NPCM8XX reset controller. >> > >> > Signed-off-by: Tomer Maimon >> > --- /dev/null >> > +++ b/include/dt-bindings/reset/nuvoton,npcm8xx-reset.h >> > @@ -0,0 +1,124 @@ >> > +/* SPDX-License-Identifier: GPL-2.0 */ >> > +// Copyright (c) 2022 Nuvoton Technology corporation. >> > + >> > +#ifndef _DT_BINDINGS_NPCM8XX_RESET_H >> > +#define _DT_BINDINGS_NPCM8XX_RESET_H >> > + >> > +#define NPCM8XX_RESET_IPSRST1 0x20 >> > +#define NPCM8XX_RESET_IPSRST2 0x24 >> > +#define NPCM8XX_RESET_IPSRST3 0x34 >> > +#define NPCM8XX_RESET_IPSRST4 0x74 >> >> What are these? All IDs should be incremental, decimal and start from 0. > > Register offset, we use the same method in NPCM7xx. please refer > https://elixir.bootlin.com/linux/v5.18/source/include/dt-bindings/reset/nuvoton,npcm7xx-reset.h > > and the driver asserts the reset according to the reset include definitions So if they're easy to look up the values, you could do without the definitions? Cfr. the interrupts properties in .dtsi files, where we typically just use the hardcoded numbers. If you do decide to keep them, a comment explaining their origins would be useful. >> > + >> > +/* Reset lines on IP1 reset module (NPCM8XX_RESET_IPSRST1) */ >> > +#define NPCM8XX_RESET_GDMA0 3 >> >> IDs start from 0 and do not have holes. > > This represents the reset BIT in the reset register. Likewise, I think it's a good idea to document that in a comment, cfr. https://elixir.bootlin.com/linux/v5.18/source/include/dt-bindings/power/r8a7795-sysc.h#L8 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds