Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2640517pxt; Mon, 9 Aug 2021 05:38:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFiKXF9B4kpihblUlKmWtCVSJp1HEqGpaPYXjAte3ej8hNEkcoJP1CogJUsPLiiYkCtHMw X-Received: by 2002:a17:906:76c1:: with SMTP id q1mr23100276ejn.156.1628512732910; Mon, 09 Aug 2021 05:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628512732; cv=none; d=google.com; s=arc-20160816; b=XmR2LRLB71522+nNlDmX3QnehCPubfy1H1rJpFreiCIz/nUlYBHFQVsF4VFLNEIqv9 8i84DSNqBblZrn5uYJ54MbezJAf9r9MXKGxEQin4auZ88LBLe+CEWJA97U3bxACqx6/7 0nNTIUnUzvFVSPl7puBw0hhEKnrPbpzA0cF6/3o+1ZhCS47tEnbQDXrD3GVclhO/Tsib wV4Em/9K8aieGI+XahiwAbbYw7iFoTbSM+DH0tUU2WM1mXDiaiN8AvoL/zSIXW//KZlz uFPnZrYqVX1ASenj+K7pXB98feYxn34kncdaUA9RjWQuRFH8yCzQdEoiAUyTMH0pvkdT vJiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=23XgZexrUsddqZ/0QoEhj1StKJdILOeiFyE+gUWeoVs=; b=JpXn+tCaOTRyx0V/ayoA0hQAODkixRQP870aTrfP21VThKUZgnFE+FGAPT2cytBa++ rRXHB/lN+5RTSQ3/XgtYBlXA41e+FloOLjTfJFA82lQ+yplo201HDvw3ffVvS2epGfQd oISaczDtqGXHjJZmQuTFuvbsGHAr1SH065xRLGahBb82a7i1MVDuHaFHavsrrVr11AbB zRKLPXQzlpjzav64JWKFu31QdtMLhol8DHFSjTNVtVb29aiNQCrVuyHDwJPVDT/N98ua C68jGDJ3gruWbj2yEHcwcENLc1Zs2VW7NBkZvaLb1c0YgMg1MVmmikAtS/l2JCYuO1sa vDZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j53sNv6i; 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 mp36si8357575ejc.478.2021.08.09.05.38.27; Mon, 09 Aug 2021 05:38:52 -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=j53sNv6i; 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 S234947AbhHILPW (ORCPT + 99 others); Mon, 9 Aug 2021 07:15:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234920AbhHILPV (ORCPT ); Mon, 9 Aug 2021 07:15:21 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF3DFC0613D3 for ; Mon, 9 Aug 2021 04:15:00 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id l34-20020a05600c1d22b02902573c214807so14318713wms.2 for ; Mon, 09 Aug 2021 04:15: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=23XgZexrUsddqZ/0QoEhj1StKJdILOeiFyE+gUWeoVs=; b=j53sNv6iuvmM5Crij2Oa2oSOLKhEpFibtO5Ocuc6bVkhPA0LOk94IidSd+hmmMcgQl gCvvk6g40W7Sj2r81ULlP1t/vw1NHKk8xY7MK9sGukiZjr7XpmMi8jdl0akEm3YAZFGs VO9hzxQN8u0tr+4UdZcJ5VBWBWwxoILqcVplmsxubOxrBg6IJkadzrQna68AihX1sz0o 7tNGxffIDKXB1zz5f5u1V71zQiketP3lq1RYHTN8LInFLAQb1OmGfguCmCgqbcB+caj9 mHagQPB3ENmL0gIMbcFq/phQfPFNjV+JQZ+2IByx+cA20FZrVqhBQ8r0YqOThV59y5XD PAwg== 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=23XgZexrUsddqZ/0QoEhj1StKJdILOeiFyE+gUWeoVs=; b=aHOQALih1hNgrwGNSO2pr7ffvWhsIjzaQMkJ4KVGWAx7D4qiAGKd0LClz/Bd+FLw8K ORTX0wcnzvqOnX7kjaemPYvhG2XBJ4QH/NEfw8p+HX8eeWUqptAaNOzEZQcquKgP4fos OdEfQI6rnsoCjudc3k9ZnooyK1gWLJDv63S0ZjGWkQqOF1A3kUrwBv1XseOK9cHngkwS aXk5pnlzXXiU8qQJdQuNE7Y/tAt0nyhEHaxrIV4YODz1mu2StNHmS/Y5Vuj/gdmv8t98 zxkrzr6VxfXzSIkOP7j0kSqjLl89321mQdVm58Qv4RKOqx6QYmpSiFEX1lFWjL2pN+sY RDUQ== X-Gm-Message-State: AOAM533tR2UnTQwsHUUWlCKzv1NvGRjzLTON7YL2XzMZm54HkUP/qxC/ 38pbmPJodSpjEZZreFWALcB+NA== X-Received: by 2002:a7b:c083:: with SMTP id r3mr16699033wmh.65.1628507699554; Mon, 09 Aug 2021 04:14:59 -0700 (PDT) Received: from google.com ([95.146.142.85]) by smtp.gmail.com with ESMTPSA id y192sm18749761wmy.1.2021.08.09.04.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Aug 2021 04:14:59 -0700 (PDT) Date: Mon, 9 Aug 2021 12:14:57 +0100 From: Lee Jones To: Mark Brown 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: References: <20210806091058.141-1-alistair@alistair23.me> <20210806091058.141-4-alistair@alistair23.me> <20210806114541.GY26252@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210806114541.GY26252@sirena.org.uk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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. It would be nice if someone could do some metrics on this. -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog