Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp677075pxt; Fri, 6 Aug 2021 10:56:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwE/czWVSEUZ+NgDDE6cT4f11EM66sbRzaJPOSoQ4c7gs65kcsdjqy6iXw95AN6QjDpGyw1 X-Received: by 2002:a17:906:1685:: with SMTP id s5mr10686897ejd.370.1628272568434; Fri, 06 Aug 2021 10:56:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628272568; cv=none; d=google.com; s=arc-20160816; b=uqw/AWx6opo+Zdn86LMBpBlwBwT2nYXxMkzxOro9n+fZ+airKfmH9fnP/L7KHdQL31 JKZKyoD0zvrB9C2aJRoBr0ppzp8XPtGlotG9RJDjXuXrSxvqDU1SGOIKfUSb7rNhPL9M 7fKbQnE6nmgxrw1tJRiC5XNWQDi9P70FfxQrU+er5CGMEEy+YrGTHEXpbcWYODROTvGd xghxu+Be7wbq6PTv96MwIfnD7Wxk5awc0APyUfB5eNhfYtkXrreowKokrPBU5OuGBxe4 9D6Krr92U4MTlIcq+WzH2UpNOLLdnWpUNCiS4onKFkMoa34F9ES/BLGNkjZACBuWD5E/ s11g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ao79obpEPPskpMIsAF+BwCRQV4+3TwtItjUwkJCwJvU=; b=Kp9Huqt1TwUapdSmEzlWobwDsytqre99dDP+UVgeUKohWWXPT1yjZsExnI7wuOCLKb 0+xzQxYjO8bSRz8sASiqQAd37sZSFPJjjKy3drPZzb6Z03olzqq+RK3rjkBIqRGdtVbH SaMSumxRLxNpfat+KlG/ldggkuZwIcFVMVrHp267jB6y8PG8rO7BFDq+hlqjZFnYO4bl EkpBBzRUBtsm+zZiR7WVlEKXRqIeoLg1aPLNQ5x0aFkvAHURWJ0sMl1KRNcehBINodzg FGOiv3n0DrMO/zJVWeve2bT6ih88wOKL2GRCPLXNEfznk0IpKdR/sE32pprfRxycRqNL tLEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hm183JOE; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id me18si9605455ejb.340.2021.08.06.10.55.43; Fri, 06 Aug 2021 10:56:08 -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=@kernel.org header.s=k20201202 header.b=Hm183JOE; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243038AbhHFLqO (ORCPT + 99 others); Fri, 6 Aug 2021 07:46:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:52328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241873AbhHFLqN (ORCPT ); Fri, 6 Aug 2021 07:46:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6A62F60EBC; Fri, 6 Aug 2021 11:45:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628250358; bh=lc7TjjkywpgZUl0uKJvryhmrqgXPv4TdZTjYg6zyHyw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hm183JOENzsjSiX628aQnr1XsYwuCzVRLy9DTh7ni9/LUnxWIHFKwi4IRB7T8LNFy ms2tvAQlatOLOm+QP9KKtPLAFC64lPOT8eqdsfiymOW9yyXNGdUbma+TMKzJ2hSKLX 0UI1m6JFr1D5iAtViAQmXoDNUlzuqoY7SnCACcorr1Cz/2xOZ0BW98ZYmOZJr6O1qk HM3KCT4LNk8IggmlnhAC+P9IpZG11VhdKuzwVeipNyLR8eZlY8MOxnY/ymxJdBPgZt jNJhZRYuHpMixPJAKCnCN1XZs6Ll/i9BzxkLFfnSom8WIFrPj2dUtooEUyCm7e9z1k 5CTyOD1TWOQAA== Date: Fri, 6 Aug 2021 12:45:41 +0100 From: Mark Brown To: Lee Jones Cc: Alistair Francis , robh+dt@kernel.org, lgirdwood@gmail.com, linux-imx@nxp.com, kernel@pengutronix.de, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com Subject: Re: [PATCH v9 03/12] mfd: simple-mfd-i2c: Save the register client data Message-ID: <20210806114541.GY26252@sirena.org.uk> References: <20210806091058.141-1-alistair@alistair23.me> <20210806091058.141-4-alistair@alistair23.me> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pDtNmxPr5KTxcQ6Z" Content-Disposition: inline In-Reply-To: X-Cookie: MOUNT TAPE U1439 ON B3, NO RING User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pDtNmxPr5KTxcQ6Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 find 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. --pDtNmxPr5KTxcQ6Z Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmENIOQACgkQJNaLcl1U h9DxJQf/TuyP2y3UfrP+x/Wbj5TUX4a0xU78jS7hhKqNUubUfUVUt+3e2HWDFn0S 7L/kD0+2R2LgseDvTaEesgsh2pG3zoFdmLUESXJ2jXjNFMEs5ghnl2f6UFN0Xhbq WhwTOq7czFXuPrsGn/ENBhS4CMZtEy9VyBGADad+9ywJ9mSVrk+G1C3kVL9noefx TFIMsSOYOyeoFy3SQSGpOuSzvEfc3QT84QLdO0iF3EHyR4pyTaRSbDhMrvCuiQ1v y4icrwxHH3yH28LcErkBRzsDrwoRrVW5E/a0R3L6cK9niAl5cMxIkvu7w/rg/WqZ bwM487Xppc5FK6NmjakYEKnrOsmPQA== =v6hN -----END PGP SIGNATURE----- --pDtNmxPr5KTxcQ6Z--