Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3362657pxt; Tue, 10 Aug 2021 01:38:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/OZ1EEf9kiYvNmuBMiDAS9gGMuv+RqkojQq6xL/uBqPFIAGP1Vx5cLJfQwDda8ItRFLW6 X-Received: by 2002:a17:906:72c8:: with SMTP id m8mr12570021ejl.508.1628584710117; Tue, 10 Aug 2021 01:38:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628584710; cv=none; d=google.com; s=arc-20160816; b=tx9ASXpRLiG+p9h0SueOWohahDlA8mqecw+Ch/7Q6qfxDiRufRa6+DJRm4lgnjbwNX W8hL6lnKtnjm9H2wqTfg1nyIuY08iNTvKANLGQozMIjBgneUUNGNP3MP/y8B1D0u3uN5 hbn2mt6Hv/VBULRXIV7zKWWWKwnRmNOdg+L/dA3n9c9nf9J56afmU3GIgfCMl0yihwXn 1T2LHUOd6Vvn3JWIeGfFQcmoQT/eZrpSYVFF1uqujt3leWSAYZA0Wtr4sjjRwhY1uuIV AUCe+h7oiIdO6vNsZN8k9uT4AEqpcFVYKeArPJ2DXuAvstD+OT1KfDuD6HrGZErBEYGu GYPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=CRgVYbQb3U4KJJpbnla1/MQYFRgYupowMXh7LlyjTy4=; b=SfFp4Z2FKI3jiDGclZB9LZkPFlSUJzmX9GKYCOAk3KfBnf1tnGwmUx6a/TSXXdhDlN 9w8QlOCrKPtpDEjK2jbkKkILqdSBBT0KlDev9WDbFbYImpjuf5nFNgRAbwxTnguJygTZ finmIymd/nz8Opp8F/joKlrxPpFm8ePvR+onrwIU1OuhfRXV1Cut2/RmuZCzp+xiRWZZ zfxPB4bQzKSiJleAamPUXRrwvYTjAg/m2FC+8m4D0Z6i6fvvbbCuEeYvP+6cvsE4Bl+i e6LZx7ntE8MOc19zprGIGxA5fKvKwtn2JOSIu+RsPqtgqujAlySEmSruNNIVgRMLNATZ ybLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HKjXrr24; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nd15si1204842ejc.463.2021.08.10.01.38.05; Tue, 10 Aug 2021 01:38:30 -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=@gmail.com header.s=20161025 header.b=HKjXrr24; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234316AbhHJHEX (ORCPT + 99 others); Tue, 10 Aug 2021 03:04:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231535AbhHJHEW (ORCPT ); Tue, 10 Aug 2021 03:04:22 -0400 Received: from mail-il1-x12b.google.com (mail-il1-x12b.google.com [IPv6:2607:f8b0:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62D55C0613D3; Tue, 10 Aug 2021 00:04:01 -0700 (PDT) Received: by mail-il1-x12b.google.com with SMTP id w4so4870773ilq.13; Tue, 10 Aug 2021 00:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=CRgVYbQb3U4KJJpbnla1/MQYFRgYupowMXh7LlyjTy4=; b=HKjXrr24nvourgRK3JgGuh+okvDa3fKScHfrZ9mdXbwcUZEvneA7wqhLLz1IL01do7 Zx/tgmLFIaWkVs/NMgHgZNNrYctRA3K1ttkhCoBN/OYAD7/G5F5fumM8xbrHjRltruCU XxbKWzJsibd9olGRGfG/nmT3EojJV0TYwTLuc+oRlqE0b14tvDtHdfh6va/vLhDSrpqg 3W0gctggh0Hb00Sz3IOKRWF/JYtKDia5XNgvpZO4asUNHue3Kzq2QLfcRYwk/Yc5knGy n4NAH3djoYqsti4yTK+M9MlyvP3cWBrpUQaMis5DtNu0LD3FS1649633h5NMzU2I1tLG JHMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=CRgVYbQb3U4KJJpbnla1/MQYFRgYupowMXh7LlyjTy4=; b=idm9eh61BZTMhRB0zlUn9VHkjQfNBGB2+1EES2Qh3DwCCJLrcKwljZDagU926enuCd 8H3z9VbTPmv4RLHtODDsXIlOK90r69ZpkM0HohImPT5LmgmiyzvrEGhLe5vywALPLqu1 2cD+qHX/WQq9XOqzlV9Qd4i7CrRUu/mwuNJL/8xMNacCaosvywaPvr1HUZeZghgk8gZ8 rVEBrAideQo1VwNJERObwQDspps/W7FdeezuSIKPEVIlSda97PCSsN/HhhSzHvbYAr2D fiknsv4ZUqRfX13Hk9gXgdjaWCC27NpVMTr53i79LphWCyfa01077o47Kuq0GPfbaIR/ U2Fw== X-Gm-Message-State: AOAM532p/ZPklehcwaqokR2fH4SPkpuEkui2mTExRFAtv6NMKq5PFD9O Q5S+vFtbxGLqTq1IYZs3KFX0j4YwenbdzhsrldY= X-Received: by 2002:a05:6e02:1d8d:: with SMTP id h13mr452911ila.40.1628579040897; Tue, 10 Aug 2021 00:04:00 -0700 (PDT) MIME-Version: 1.0 References: <20210806091058.141-1-alistair@alistair23.me> <20210806091058.141-4-alistair@alistair23.me> <20210806114541.GY26252@sirena.org.uk> In-Reply-To: From: Alistair Francis Date: Tue, 10 Aug 2021 17:03:34 +1000 Message-ID: Subject: Re: [PATCH v9 03/12] mfd: simple-mfd-i2c: Save the register client data To: Lee Jones Cc: Mark Brown , Alistair Francis , Rob Herring , lgirdwood@gmail.com, dl-linux-imx , Sascha Hauer , devicetree , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 9, 2021 at 9:14 PM Lee Jones wrote: > > On Fri, 06 Aug 2021, Mark Brown wrote: > > > On Fri, Aug 06, 2021 at 12:38:36PM +0100, Lee Jones wrote: > > > On Fri, 06 Aug 2021, Alistair Francis wrote: > > > > > > + i2c_set_clientdata(i2c, regmap); > > > > + > > > > > No need to store this here. > > > > > Just do this in the child device: > > > > > dev_get_regmap(pdev->dev.parent, NULL); > > > > Note that dev_get_regmap() is relatively expensive compared to a simple > > driver data reference since it needs to go search for the device to fin= d > > the regmap, it's not the end of the world especially in the context of > > doing I2C I/O but storing it isn't a terrible idea. > > It would be nice if someone could do some metrics on this. I updated it to use `dev_get_regmap()` in version 10 of the series Alistair > > -- > Lee Jones [=E6=9D=8E=E7=90=BC=E6=96=AF] > Senior Technical Lead - Developer Services > Linaro.org =E2=94=82 Open source software for Arm SoCs > Follow Linaro: Facebook | Twitter | Blog