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 721E9C43334 for ; Mon, 25 Jul 2022 09:07:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234405AbiGYJHC (ORCPT ); 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-Google-Smtp-Source: AGRyM1tJSXMumghoATC65twYRnzaQxdiBNYaldY1M9f4DosemyPp1f+IvX7cbVFcEYtBJ2DRVha2cAhiDgReWJ+n9ic= 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" Precedence: bulk List-ID: X-Mailing-List: linux-leds@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 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9AD61C43334 for ; Mon, 25 Jul 2022 09:07:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6758B18B354; Mon, 25 Jul 2022 09:06:58 +0000 (UTC) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by gabe.freedesktop.org (Postfix) with ESMTPS id 817B711B3A7 for ; Mon, 25 Jul 2022 09:06:57 +0000 (UTC) Received: by mail-qt1-x831.google.com with SMTP id l14so7769778qtv.4 for ; 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=EllveUakpHw56yCQQO3RHTDLa2UEwHgvwvDygfTFzr2VwaXOLYfnA2WmV5+UGnED4Z QmyEN9KG1/eagxgugSUcygGzJ1tvlfFyNaS1+oyYueebmWyrejVmoNPhJrXdHpQo/oY3 XyAeaO4fpsgVklP0xH3VIJRlzKcQlSSxC2q75Wb244JID3vPXyOsbxX86iqIOiLGw/dW F0e/88CcxYHro4odtxYObr9Gly2GWjLYmm1GS1B2d1Tk9oZSMM4FdN8EtrnP+LGJK47t XelFmNfsxQW4uhPc0isSnQfUip2+BRKhOecGYlCsgEdoXdUku7582OUTgc5HfVAbYTgg 0A2A== X-Gm-Message-State: AJIora/GGFXzwNBIVOmYijT/gcpr1LpY0ZYKfN5JekQde5lic0B1uYF0 9odY9Tc3qYtjoMYjoLb9LU973w+4/r8QpRioZ3w= X-Google-Smtp-Source: AGRyM1tJSXMumghoATC65twYRnzaQxdiBNYaldY1M9f4DosemyPp1f+IvX7cbVFcEYtBJ2DRVha2cAhiDgReWJ+n9ic= 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 Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:FRAMEBUFFER LAYER" , "Krogerus, Heikki" , Krzysztof Kozlowski , Alice Chen , linux-iio , dri-devel , Liam Girdwood , cy_huang , Pavel Machek , Lee Jones , Linux LED Subsystem , Daniel Thompson , Helge Deller , Rob Herring , Chunfeng Yun , Guenter Roeck , devicetree , Linux PM , szuni chen , Mark Brown , "moderated list:ARM/Mediatek SoC support" , Matthias Brugger , linux-arm Mailing List , Jingoo Han , USB , Sebastian Reichel , Linux Kernel Mailing List , ChiaEn Wu , Greg Kroah-Hartman , Jonathan Cameron Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A712EC43334 for ; Mon, 25 Jul 2022 09:08:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LR6z/GK4ZSKKc7DWjbstyWFrSt3JAbW89O8i1U3eWBM=; b=h+jTLXWWyt7sSr MSgry62tb0R7e8o34Vb1zVma24/c6OBKFGbkgctgItfJJDRvfKCmp8Tpa0YhKVL8qfFvZT4kg5bnM zvwuRxJub4eZ6eoS+NW0GhSN2dZU4c5yl4XWs3qc1JROsAT6Cz7bkOJ+me1y5IM/s2oMNkWgyab7j OmUBmh7n46Bf4LfR5lUdKfy5Tqe9ptaskj2kolhUZxcnACwPUZD8iOY6XGRmS5Fd/jBbug7HjTwHZ tbJhKQU36wQcZEOraki6ESjFPY8MJNxbtF3+N9py2chzZaKbjU7BEIycUBW05YtP55zkrFQEvQZwJ o8l8Ijm0PlgfDfq4ncVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFu3J-007K1P-Dq; Mon, 25 Jul 2022 09:07:01 +0000 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFu3G-007Jyr-QS; Mon, 25 Jul 2022 09:07:00 +0000 Received: by mail-qt1-x833.google.com with SMTP id u12so7795705qtk.0; 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=Ub3OT7UU4uG18RACqhEYV9LLc3iLxwFXmXZotZQjuo+1PciGV6LYWe/b/pg2n5k1Ji /5SVZCYawGGpJNQMyQI2carn2tXKhdY5Ai67XJrr4J4ddd5akgc4S+MpXMmu29zGJ7g6 nX+I0QBRzkWjDeYJTbJqgibagjJNX6Sbd+U52JhJYcU1jk87vUTm1QLlx5XLJgTa2G7B y+fAH41cFDPAZeaWYZ0autSMR/TBTc9eHTXzMWTStHIwcJy7117pWZB5v9RHnG+Vvhos dqW5yb7t/2lZJS1F+G5yH+6rsEwQAQtnTn8gsqPj/02YsJFZlkH0MMn/AkWSgID0zrla aLFg== X-Gm-Message-State: AJIora95IXYX+TALkzr/rGWwyD4HWYGHDH2YkDGpK4PLB0ndOdvrkA+V FtAA9XbaiQAbQJZhjujCg4brHON1JwVXOf6vrSM= X-Google-Smtp-Source: AGRyM1tJSXMumghoATC65twYRnzaQxdiBNYaldY1M9f4DosemyPp1f+IvX7cbVFcEYtBJ2DRVha2cAhiDgReWJ+n9ic= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220725_020658_899233_E4F40806 X-CRM114-Status: GOOD ( 14.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel