Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp132355pxk; Wed, 9 Sep 2020 00:41:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxEEtiijFWvffm/evyCXY3pxali9plDAFwdZIDWhVpRVJ9lWhCr0fgl4iUP77GLPk6Obju X-Received: by 2002:aa7:ca46:: with SMTP id j6mr2707354edt.155.1599637265862; Wed, 09 Sep 2020 00:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599637265; cv=none; d=google.com; s=arc-20160816; b=xai2jbYbwqQoLmYgsg76Wc+b07dPEg5MW3obSH/iwq9TxrNk1fZm6p0RAPCKPt9tqf a4WLpXuVXf/BvlkudhGffN0eSOpE5LL6/DswhsCAcHUVfOxXDFARkeJIg6mgR8V7MV6x Jez+Ix45OmX37Z5NN7gOXtsgdOVA0zW25K4kzIWpIAPbqXi0PrKS8D7U8B+YV7l50RiY 3ZgfpPa7UuotLpzL9WKOYPMKLzUvCkN19TSSVnnNuA/KKnbspnhsFSaRo7TfL9nnGq9+ 3SlzH9WDgfdE9LaZK1NNMyjTUBGbuVyje4l5IXf/U2dEwqMVlhJ7rOf3VtASVuVYpovd VOEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wWgDfU9nZzKqdvbVx8y3VyybzRdiTj4qfLQtg4MRrko=; b=ZYQqRuiVOXOo12rj3xdr7C9GXLxBwKsE4ZRzg7NqxUceipXwkq+g5iw9HdT8djUlho kW/i/BICAnYfs5iNUJKjrQtKq45OXnpAQWq/CtNbAlWfT/TrtgBmjbQyDnDUItOGz7P8 vVe2ENYflhjfUH2YszVQ7cIvYxhSRV827rzNPdVRrvVekoGASylsPG5GNgYy16q39fF7 fLY2Rm5tgMOB1e+V4C0butYU0sXtz2QFUy/XIcUW15vWxxheIodn/TnC6EDpx0Jaa2lH kPERc5KgR2cjFil8vegJwTtWDJv15NbLrECqf5YYG80wEsT1XV77bgahICFf5bX4xZOz J+sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vKfNkPvS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s19si890761ejv.149.2020.09.09.00.40.42; Wed, 09 Sep 2020 00:41:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vKfNkPvS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1729521AbgIIHhT (ORCPT + 99 others); Wed, 9 Sep 2020 03:37:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730256AbgIIHhE (ORCPT ); Wed, 9 Sep 2020 03:37:04 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B07F5C061573 for ; Wed, 9 Sep 2020 00:37:03 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id m6so1812837wrn.0 for ; Wed, 09 Sep 2020 00:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=wWgDfU9nZzKqdvbVx8y3VyybzRdiTj4qfLQtg4MRrko=; b=vKfNkPvSqiCi09QBOevuKE3WTzNxDu6Exs/ueisabXStQuSK3AB5ekMSlyhO5Ekvzn Qd42VrxYIuys9XrdUyMAgBTxiOfliJDL/us5t5yVi/CRjDKifwYXMMWmsN6IENcrBNn0 2u8lOJf7c5sdSWLaXG0j1K1QdQv4UacDhefcSjtVSzcPgMBw8i7Y0T/8F8iaeOaJBbOC 3HmFIgTcbFfE1C1wPpIcIN6tQoefM20O7EQEn6KaMJVASgtpOz3Z/0JtPUDnMhAB31Ou wuNA7DVOA9MllnqftEPlF8ZOYjL6ksA2pJQPP8YeU0qTjxikv/kDs9yYbovFv+EyyUnz xU6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=wWgDfU9nZzKqdvbVx8y3VyybzRdiTj4qfLQtg4MRrko=; b=AfeI9zOZmpJKo7/kbgeJskOQVDrVxUHIWOUGGmw3+BdMpUBz/qGs4v9gdegVmseawT t+6jk+qwTh5Vv72R6TWknN2WHJg3xcS3uBpeUlspoFhJq+MoMOgt8X8wwEaFgsDidaSV WqQSdXfh2CF5IgNQcOYCss+DyT+Ggbko/iNjpQzyuhAsZxYI+q+CU3jt7lAegNXmGukq ZbJf64DmQ4NPXC2U+RTA2atlT41Yu4RfFXKLA2ZpCwALWZU2dLfvVnOsJHyEcE39qHUf 6v/EC/NZvfgoqao23d9yUmAFvwo2beQySuNmsZUM4LZIQIL8jPoYeIFTtVy8o9ePdnOm i/lQ== X-Gm-Message-State: AOAM531bm4bZqmq5WZfaIcvf0X3wpWyTgCg82cqGDLGW/lWO2UVwlemo bsGFGUUbP7jqhAZ0LE36AApWoA== X-Received: by 2002:adf:e391:: with SMTP id e17mr2316189wrm.289.1599637022185; Wed, 09 Sep 2020 00:37:02 -0700 (PDT) Received: from dell ([91.110.221.179]) by smtp.gmail.com with ESMTPSA id 91sm3266190wrq.9.2020.09.09.00.37.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 00:37:01 -0700 (PDT) Date: Wed, 9 Sep 2020 08:36:59 +0100 From: Lee Jones To: Gene Chen Cc: Matthias Brugger , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Gene Chen , benjamin.chao@mediatek.com, shufan_lee@richtek.com, cy_huang@richtek.com Subject: Re: [PATCH v4 9/9] mfd: mt6360: Merge different sub-devices I2C read/write Message-ID: <20200909073659.GA218742@dell> References: <1597661277-27862-1-git-send-email-gene.chen.richtek@gmail.com> <1597661277-27862-10-git-send-email-gene.chen.richtek@gmail.com> <20200828104053.GM1826686@dell> <20200908114819.GO4400@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 09 Sep 2020, Gene Chen wrote: > Lee Jones 於 2020年9月8日 週二 下午7:48寫道: > > > > On Tue, 01 Sep 2020, Gene Chen wrote: > > > > > Lee Jones 於 2020年8月28日 週五 下午6:40寫道: > > > > > > > > On Mon, 17 Aug 2020, Gene Chen wrote: > > > > > > > > > From: Gene Chen > > > > > > > > > > Remove unuse register definition. > > > > > > > > This should be in a separate patch. > > > > > > > > > Merge different sub-devices I2C read/write functions into one Regmap, > > > > > because PMIC and LDO part need CRC bits for access protection. > > > > > > > > > > Signed-off-by: Gene Chen > > > > > --- > > > > > drivers/mfd/Kconfig | 1 + > > > > > drivers/mfd/mt6360-core.c | 260 +++++++++++++++++++++++++++++++++++++++------ > > > > > include/linux/mfd/mt6360.h | 240 ----------------------------------------- > > > > > 3 files changed, 226 insertions(+), 275 deletions(-) > > > > > delete mode 100644 include/linux/mfd/mt6360.h > > > > > > > > > > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig > > > > > index a37d7d1..0684ddc 100644 > > > > > --- a/drivers/mfd/Kconfig > > > > > +++ b/drivers/mfd/Kconfig > > > > > @@ -913,6 +913,7 @@ config MFD_MT6360 > > > > > select MFD_CORE > > > > > select REGMAP_I2C > > > > > select REGMAP_IRQ > > > > > + select CRC8 > > > > > depends on I2C > > > > > help > > > > > Say Y here to enable MT6360 PMU/PMIC/LDO functional support. > > > > > diff --git a/drivers/mfd/mt6360-core.c b/drivers/mfd/mt6360-core.c > > > > > index 677c974..e995220 100644 > > > > > --- a/drivers/mfd/mt6360-core.c > > > > > +++ b/drivers/mfd/mt6360-core.c > > > > > @@ -14,7 +14,53 @@ > > > > > #include > > > > > #include > > > > > > > > > > -#include > > > > > +enum { > > > > > + MT6360_SLAVE_TCPC = 0, > > > > > + MT6360_SLAVE_PMIC, > > > > > + MT6360_SLAVE_LDO, > > > > > + MT6360_SLAVE_PMU, > > > > > + MT6360_SLAVE_MAX, > > > > > +}; > > > > > + > > > > > +struct mt6360_ddata { > > > > > + struct i2c_client *i2c[MT6360_SLAVE_MAX]; > > > > > + struct device *dev; > > > > > + struct regmap *regmap; > > > > > + struct regmap_irq_chip_data *irq_data; > > > > > + unsigned int chip_rev; > > > > > + u8 crc8_tbl[CRC8_TABLE_SIZE]; > > > > > +}; > > > > > > > > This is not a new structure, right? Where was this before? Surely it > > > > should be removed from wherever it was in the same patch that places > > > > it here? > > > > > > > > > > No, it is merge from header file to source code for unuse in other sub-module. > > > > So where did it come from and why don't I see the removal in this > > patch? > > > > Change is in the bottom of this patch. > There is a little confuse part in "[PATCH v4 5/9] mfd: mt6360: Rename > mt6360_pmu_data by mt6360_ddata" > The "PATCH 5/9" change mt6360_pmu_data to mt6360_ddata instead of mt6360_data. > I will update PATCH v5 to fix it. > > [PATCH v4 9/9] > diff --git a/include/linux/mfd/mt6360.h b/include/linux/mfd/mt6360.h > -struct mt6360_data { > - struct i2c_client *i2c[MT6360_SLAVE_MAX]; > - struct device *dev; > - struct regmap *regmap; > - struct regmap_irq_chip_data *irq_data; > - unsigned int chip_rev; > -}; > > [PATCH v4 5/9] > diff --git a/include/linux/mfd/mt6360.h b/include/linux/mfd/mt6360.h > -struct mt6360_pmu_data { > +struct mt6360_data { > struct i2c_client *i2c[MT6360_SLAVE_MAX]; > struct device *dev; > struct regmap *regmap; Oh, you've renamed it whilst moving it. That is probably not best practise, as it causes this kind of confusion. -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog