Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2560892imi; Mon, 25 Jul 2022 01:50:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vbZk8SkshKFoxgN8faD2AksrCN3o1te0lCNhnAPGNJBZuck0YcQ9cvdMISjbqWGBN2UKLm X-Received: by 2002:a05:6a00:22c7:b0:52b:af2:903f with SMTP id f7-20020a056a0022c700b0052b0af2903fmr11874944pfj.3.1658739005612; Mon, 25 Jul 2022 01:50:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658739005; cv=none; d=google.com; s=arc-20160816; b=SgtX7U0n7OucDyJRRf2fTiut22NuQuOF0lbvdhb+zCfuNtUmJtaarDkcDDDWZhMrzI 6w/LEJ8fgnjTYD9WmCShqx4CulvDYKhU6Ps6F+HU4wNSPDgtkNvvsJ7yUfviYfxV3mOt qdfbHJkDmGXb98nz9EF8fMPRxdiT/Hqv2p0fCDO1YLcDE4cILiUxJLMGzVMQf3p1HSmi JJExVwYYx9vSAFbYjxg3oo6h1gHe5gpmjffuVs7Ljv7YraebqxhJ+nv9HuVxbHfqrKxl /YsCl6rBFZ9KmpwxQHcH5KKa7xoiBOKm74fRC1YzUaGCD163ggQmknO5tsh3de3+g0BH h/UA== 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=gBUjOXPSyxIp/ssA5bMpYCLKWAJ3HGf2reVDfO9yM3o=; b=mipRDsK6KHGu8pQ1EwNPpWV2+UNG3TSdg5oFqfFKPhm32vBbxC5bXjTMjY2/elJwDF A4WxbtMdE30z/POfqHw8PgIF9si42jEiLD8MOOI/zoxEJIMgcbQ4WH6v+oVu4UtpAFEt SWIPo6wPW9nwBRhdvi+cIC8WsNBIa5lm3pV7P/XXgpLU58bIeLyzdc8DhJ8zbAUHI3Oj LHygMrMMmF+12OBPinPdNXpbPFjsbjVbmxPDzi9hEmNJIq9EzN5ydyXSWcqXhK33jSrf gptCf/qqLUhkiePMJd7N5NLo3pl7a41Bu9j5SrcjuHztQ0GUwqrOdy4X6Xi/8jRHpLzM X57w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZcloaGBX; 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 j4-20020a63fc04000000b0040d71f1c11fsi13448645pgi.314.2022.07.25.01.49.50; Mon, 25 Jul 2022 01:50:05 -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=ZcloaGBX; 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 S233938AbiGYInp (ORCPT + 99 others); Mon, 25 Jul 2022 04:43:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233337AbiGYInn (ORCPT ); Mon, 25 Jul 2022 04:43:43 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0EFD140C4; Mon, 25 Jul 2022 01:43:42 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id z18so620205edb.10; Mon, 25 Jul 2022 01:43:42 -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=gBUjOXPSyxIp/ssA5bMpYCLKWAJ3HGf2reVDfO9yM3o=; b=ZcloaGBXNWKgwFGhN0tBCVgGN7mKJ0l57wi/gxiOCcQ3btK6lq9SuR+ZDWopqPFJwr QtH+fUQor4bu6z6i3Onr2HRzeQyO9JOs9GcWZvML3s9jvPJQnd/sk2l56CU4eOkmNXQj LqLK8afv+vA1SA6f+pxw6kwJwYDOpRk9RKfUzqG3YfKkkTmnHl6JN0Bgs4bLgrYJH4/G DwVst0E8Wq+wDqCv4Rf6WiAWX6k8ZbwXfY2/046oEtgbBla5lc4gNBqV8JGbD5c944lY EL1jChoaIjqEM9Bwbv2uv0Do0n4Vre3jmkyldcj0zTNhXTJcj/3JcVpHUBK+rQNRfl5E JX3w== 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=gBUjOXPSyxIp/ssA5bMpYCLKWAJ3HGf2reVDfO9yM3o=; b=WF8HjDlbWM9SQ/1RTZrtsH6LlgLJGTGksTCYgNwJ2ITU7nO38Iszi4G6Bs1tv6Bpak 1O1pyZuKXoovZKbMMVE87o9UpCNjtR0SN1pAQXM2uobFqaa6cV3RcfuNSHNElH7Bt1J5 fRpp2yFuJ3jWc0uQQceptnG55IsC7lhLBytAk6Y3uT3NGMeF+4Trty1rNtyUcu+6KsSj Oc1klU/bJ3GZ2kZsWgS2K+QKpyJrwaDGDHW8NO300wnOk0x7Evb3i4lOKZacgSrgRXoX RHbS5f/4uDBkgUK2IrqlbLnisADIIgCvrVtkDE6Eel2zrqAsz/INaga/ec6reAisSGPw xpHw== X-Gm-Message-State: AJIora8EWIaOeFopPOZFhx62Gi75ilx8OK2jLyURKPffWc8Qeuyn5lap MslqwBOIWchlALV5FwUUgmO+MbKmQudHFw4YPsM= X-Received: by 2002:a05:6402:254b:b0:43b:d6c3:dd96 with SMTP id l11-20020a056402254b00b0043bd6c3dd96mr11626028edb.406.1658738620885; Mon, 25 Jul 2022 01:43:40 -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: Andy Shevchenko Date: Mon, 25 Jul 2022 10:43:04 +0200 Message-ID: Subject: Re: [PATCH v6 07/13] mfd: mt6370: Add MediaTek MT6370 support To: ChiaEn Wu 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 10:30 AM ChiaEn Wu wrote: > On Mon, Jul 25, 2022 at 4:00 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. > > Hi Andy, > Thanks for your review. > Do you mean that we should move '#define MT6370_USBC_I2CADDR' and > '#define MT6370_REG_MAXADDR' after the line '#define > MT6370_REG_CHG_MASK1'? > ------------------------------------------------------------------- > #define MT6370_REG_DEV_INFO 0x100 > #define MT6370_REG_CHG_IRQ1 0x1C0 > #define MT6370_REG_CHG_MASK1 0x1E0 > #define MT6370_USBC_I2CADDR 0x4E > #define MT6370_REG_MAXADDR 0x1FF > > #define MT6370_VENID_MASK GENMASK(7, 4) > > #define MT6370_NUM_IRQREGS 16 > #define MT6370_REG_ADDRLEN 2 > ------------------------------------------------------------------- > Like this? 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? -- With Best Regards, Andy Shevchenko