Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2580758imi; Mon, 25 Jul 2022 02:31:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tISnJmJAEoXPRR9mGwRJQtBCb7Qbwep4bM2LlK/Bq9oXG3wdw9658SRKwLJqYXxFhKCoHM X-Received: by 2002:a17:90a:a40a:b0:1f2:979:397d with SMTP id y10-20020a17090aa40a00b001f20979397dmr13036657pjp.179.1658741494168; Mon, 25 Jul 2022 02:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658741494; cv=none; d=google.com; s=arc-20160816; b=xGzUaRouK33SDJ3lUPu94fw7Hy9QBayemVby+wBBch4lKz+LhztCy3k2r4Xv8lzTmK plAULpzga4jqv7loWWQfkUSTeLepXW/v+S+WoEFmHZR8G1FnHia36ANpzu34VNhvPRor O/tfvkEpicvcIO6+IMU9+Blw0JVmiQG0AS8xcRB/j1CSV/gdnGgHUyMrA+PHif2d3WAU WpQSZ3zsmTmdBpbqjY2z5w+DvXSR4ZP/QqMFsIfEC1Riy5Ndoo2LH8GaKk9B9FgcMWL7 7ULvpdCk8DxTnY9AB4OlJPxLNVqua7DBixx6Zv140o2sLGWkZaRQnhuAcvHTqQj1RqVg EuzQ== 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=IY0j+H2edk5UsmI6A7sNzAv0qZHfigoVGkZeFtNqZD0=; b=KKheH7Fo/19uzyvkXpCzC8ERvDZozQ1aTf+tbJXIne5wkHU9fzORIBArONVSNHvu1t MhWZ1qSY9KRWkT3lSR1KvKw/sqBu+sbspP6/+HGAyAnUzWAYpK13RYdOvfTEicUgIzOo 3zkNB8XhuvySlZDCdP4ZMkaM2+I4M2iZucy5WaVtdOSL1Jf5dTTaD677PEWyIkWythAq ovqJToORH7DLgiGfR4M9pNBJYMzGh6tPRWL7BWSdKfZO0R/L9+PpupRux+/wHZnLPJy/ mqnjAga3MUId44vmlSvDAOzGpSJpx+UF4gkR9Ihp6LoqoO0SSxSpHIyGNtUj7JUPgrNL 8F+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OAft5TUY; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h8-20020a056a00230800b00528a105625esi15673175pfh.316.2022.07.25.02.31.19; Mon, 25 Jul 2022 02:31:34 -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=@gmail.com header.s=20210112 header.b=OAft5TUY; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234450AbiGYJHC (ORCPT + 99 others); Mon, 25 Jul 2022 05:07:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233274AbiGYJHB (ORCPT ); Mon, 25 Jul 2022 05:07:01 -0400 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60F4CFD38; Mon, 25 Jul 2022 02:06:57 -0700 (PDT) Received: by mail-qt1-x832.google.com with SMTP id r21so7748394qtn.11; Mon, 25 Jul 2022 02:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IY0j+H2edk5UsmI6A7sNzAv0qZHfigoVGkZeFtNqZD0=; b=OAft5TUYAXK6FHwdudrZ3/ylDTgyd7ApXgH3mCQQrEy/AppLvKLTFrPAuRaeFgFtA7 It8xo2DsjfOuep3j9cWzIbiJND3QEGySnwIZHLW7+dtLSlt+35HbGtRezBb37b4ET1YA T08HOavE/cN4KrCVfDqvDb9AfqV938ASpM6+DesVsCpK+wJIO8i1UyBgvsftmWjtDjOG FhD3Z5NBfgipr391g2noPdoBVxJJl+Zl02FqMF/RSg8CvI8FVka2TxagkUfxCYyIA8lN BEkxNh5JboG7/J/TGmZM68ALnFQGOS8vaYU/EgWzrbg9AQ2GE7pMqCpLXdsGFwSSNDLe gkfQ== 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=IY0j+H2edk5UsmI6A7sNzAv0qZHfigoVGkZeFtNqZD0=; b=CuO4WS9fHj7VN8m6j+pML9Pkk2VxzX1EGGfV5AocQGxASyIkm+oDI6cGGjpxYQS1wj MgoBaBcr9TVQTlvZ6+rCGOCqHFR0n+lJvCkF6QZ7Dft8q5jdkNB8CTBKj/ZPEbam45uH yVnWSetf2SQ0/YsgTbZXXGoJfz7UsravSecdNGpgTW3CGWiOHp6wkz1Qss92rSrZxDgu uUUZ3MOUicf/gytf6qRqm0ysv2WysQ0iPlDd+r7VxU6jMjd5cLHPiNXs4+sVtVr7+nwl 7L3DfNLmI+M93bhCzR9cVq49SiMCCZNieYFIgdiw/bKTeBBCxg50E33kATDcfqNKS4Dm bckw== X-Gm-Message-State: AJIora8XD7u4mPqVqKVejm2eiq4pZClJi5Nkh22yITWTxd7QCmXwsBcY FMBc65rlcVCecyHA7xj6lcOa+fOSthViakHrjQw= X-Received: by 2002:ac8:5d49:0:b0:31f:aa:e632 with SMTP id g9-20020ac85d49000000b0031f00aae632mr9318617qtx.427.1658740016501; Mon, 25 Jul 2022 02:06:56 -0700 (PDT) MIME-Version: 1.0 References: <20220722102407.2205-1-peterwu.pub@gmail.com> <20220722102407.2205-8-peterwu.pub@gmail.com> In-Reply-To: From: ChiaEn Wu Date: Mon, 25 Jul 2022 17:06:20 +0800 Message-ID: Subject: Re: [PATCH v6 07/13] mfd: mt6370: Add MediaTek MT6370 support To: Andy Shevchenko Cc: Lee Jones , Daniel Thompson , Jingoo Han , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sebastian Reichel , Chunfeng Yun , Greg Kroah-Hartman , Jonathan Cameron , Lars-Peter Clausen , Liam Girdwood , Mark Brown , Guenter Roeck , "Krogerus, Heikki" , Helge Deller , ChiaEn Wu , Alice Chen , cy_huang , dri-devel , Linux LED Subsystem , devicetree , linux-arm Mailing List , "moderated list:ARM/Mediatek SoC support" , Linux Kernel Mailing List , Linux PM , USB , linux-iio , "open list:FRAMEBUFFER LAYER" , szuni chen 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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 On Mon, Jul 25, 2022 at 4:43 PM Andy Shevchenko wrote: > > ... > > > > > +#define MT6370_REG_DEV_INFO 0x100 > > > > +#define MT6370_REG_CHG_IRQ1 0x1C0 > > > > +#define MT6370_REG_CHG_MASK1 0x1E0 > > > > + > > > > +#define MT6370_VENID_MASK GENMASK(7, 4) > > > > + > > > > +#define MT6370_NUM_IRQREGS 16 > > > > +#define MT6370_USBC_I2CADDR 0x4E > > > > > > > +#define MT6370_REG_ADDRLEN 2 > > > > +#define MT6370_REG_MAXADDR 0x1FF > > > > > > These two more logically to have near to other _REG_* definitions above. > > ... > > You lost me. Namespace has a meaning, i.e. grouping items of a kind. > In your proposal I don't see that. If REG_MAXADDR and REG_ADDRLEN are > _not_ of the _REG_ kind as per above, why do they have this namespace > in the first place? oh... Sorry, I just got the wrong meaning maybe it should be revised like this, right?? ------------------------------------------------------------------- #define MT6370_REG_DEV_INFO 0x100 #define MT6370_REG_CHG_IRQ1 0x1C0 #define MT6370_REG_CHG_MASK1 0x1E0 #define MT6370_REG_MAXADDR 0x1FF // Move it to here #define MT6370_VENID_MASK GENMASK(7, 4) #define MT6370_NUM_IRQREGS 16 #define MT6370_USBC_I2CADDR 0x4E #define MT6370_MAX_ADDRLEN 2 // Rename ------------------------------------------------------------------- Thanks! -- Best Regards, ChiaEn Wu