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 X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 122E3C433E6 for ; Fri, 17 Jul 2020 09:07:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E1E9A2080D for ; Fri, 17 Jul 2020 09:07:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RdncPW1l" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726458AbgGQJHC (ORCPT ); Fri, 17 Jul 2020 05:07:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726040AbgGQJHB (ORCPT ); Fri, 17 Jul 2020 05:07:01 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5120C08C5DC for ; Fri, 17 Jul 2020 02:07:00 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id a6so6817722wmm.0 for ; Fri, 17 Jul 2020 02:07:00 -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=pTJD2ese6K2dNt2vdiLR06YU7WVcQu8Yel1U2q7XjxE=; b=RdncPW1lDg4IpKF2/cfz2mxyZGwH70KBaBrCHlAamsL4R/bAvK/rxM+IWlU7qIyuan xelunPXzbnc4+mXnnIHQzV2Q7I4VLS07NC6FMJctbAWgk/gPiV3DFh6FOAWO6wBP5n1W CBPMe9ut3SIiMskcvMWaFgVY0Jsx32ZIvN1gBt6+fVgyK2uL7mCW7+CtaniJn3xckqrX mZAknbz3eKXhxSkDrzdJeP5pO6L3DJIPsYa+LtmXApSGgwyAFdQBLpMPomp9c+Dd75j7 IEfa26GW1uAFTPFBNzcDH2QJE9d4E3UfGS95nHTVqMXYwEUwvQfxFD06YcbXHpuTrTKP zUiA== 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=pTJD2ese6K2dNt2vdiLR06YU7WVcQu8Yel1U2q7XjxE=; b=DtLGX6EdGj+cbf8hMPom2zR1HHMM7c4FdE5oMh5BOtYezTXp66yMW4M1x5/O7pBgz3 RhK18OdHJOVU4I5Ec60kGfODRH88UUeYogQFLPHCQwRU5YA07/Ra5wtCFRfwHpkBPcn3 LzpabBVKFRtC7U5JAw2UC/cTJBdwyP5S8Nb7axLtAjf+1qeL2Y3v2FRTaj/O4OXwx7F+ sMZpS8TehBD7AATjFToR/vGAzNgp3ihxXuDB2fkfzwiy6DjSVYuGxIHyOYvXvSft6CBS dwDs2pd93eFrgHtZmCrL0fUvzPkdKE4PMNweMI+Xx4AQ6Wfokke9TUtAjKm18ZAdQEb3 JBiQ== X-Gm-Message-State: AOAM532DHfIKd4YY/rhNoE9BG7JROc8Y9EXIqEmzt5CfVQNzw7QBf6ky Ef1Qewv0/ZFOZR296qtMupZDuw== X-Google-Smtp-Source: ABdhPJzFwUFlTuHxJh9CJGSq2MTaZ8h+vLXDbC5cvbKZoxFQ53eDgLDHJN2B9P6MWQGOIdMYC9QPUQ== X-Received: by 2002:a1c:5982:: with SMTP id n124mr8364770wmb.77.1594976819379; Fri, 17 Jul 2020 02:06:59 -0700 (PDT) Received: from dell ([2.27.167.94]) by smtp.gmail.com with ESMTPSA id a123sm12657865wmd.28.2020.07.17.02.06.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jul 2020 02:06:58 -0700 (PDT) Date: Fri, 17 Jul 2020 10:06:56 +0100 From: Lee Jones To: Michael Walle Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-pwm@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linus Walleij , Bartosz Golaszewski , Rob Herring , Jean Delvare , Guenter Roeck , Thierry Reding , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Wim Van Sebroeck , Shawn Guo , Li Yang , Thomas Gleixner , Jason Cooper , Marc Zyngier , Mark Brown , Greg Kroah-Hartman , Andy Shevchenko Subject: Re: [PATCH v5 02/13] mfd: add simple regmap based I2C driver Message-ID: <20200717090656.GF3165313@dell> References: <20200706175353.16404-1-michael@walle.cc> <20200706175353.16404-3-michael@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200706175353.16404-3-michael@walle.cc> Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org On Mon, 06 Jul 2020, Michael Walle wrote: > There are I2C devices which contain several different functions but > doesn't require any special access functions. For these kind of drivers > an I2C regmap should be enough. > > Create an I2C driver which creates an I2C regmap and enumerates its > children. If a device wants to use this as its MFD core driver, it has > to add an individual compatible string. It may provide its own regmap > configuration. > > Subdevices can use dev_get_regmap() on the parent to get their regmap > instance. > > Signed-off-by: Michael Walle > --- > Changes since v4: > - new patch. Lee, please bear with me. I didn't want to delay the > new version (where a lot of remarks on the other patches were > addressed) even more, just because we haven't figured out how > to deal with the MFD part. So for now, I've included this one. > > drivers/mfd/Kconfig | 9 +++++++ > drivers/mfd/Makefile | 1 + > drivers/mfd/simple-mfd-i2c.c | 50 ++++++++++++++++++++++++++++++++++++ > 3 files changed, 60 insertions(+) > create mode 100644 drivers/mfd/simple-mfd-i2c.c > > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig > index 33df0837ab41..f1536a710aca 100644 > --- a/drivers/mfd/Kconfig > +++ b/drivers/mfd/Kconfig > @@ -1162,6 +1162,15 @@ config MFD_SI476X_CORE > To compile this driver as a module, choose M here: the > module will be called si476x-core. > > +config MFD_SIMPLE_MFD_I2C > + tristate "Simple regmap based I2C devices" Doesn't look like tristate to me. Haven't you made this builtin only? > + depends on I2C > + select MFD_CORE Why? > + select REGMAP_I2C > + help > + This is a consolidated driver for all MFD devices which are > + basically just a regmap bus driver. Please expand on this. I think it deserves greater explanation. > config MFD_SM501 > tristate "Silicon Motion SM501" > depends on HAS_DMA -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog