Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1314033iol; Fri, 10 Jun 2022 05:07:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLHfdeNMcRy99TGZq4ZqW9ZnQApMG6/c1A3DBZQiUDI15Da3F075vQQaAK9AF02xJjxJcx X-Received: by 2002:a05:6402:d0a:b0:425:d455:452 with SMTP id eb10-20020a0564020d0a00b00425d4550452mr50391358edb.259.1654862850846; Fri, 10 Jun 2022 05:07:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654862850; cv=none; d=google.com; s=arc-20160816; b=geAIhC5tHGpm2gxLhVj2+RcyyNjnROrkkYGODWZcfXBjzT0h+hMhUCTmaJtS3dxg0h aDQ1RkP5VdVu7ilJy/O+jmNejMfhhtMKthcBoZurl+F2/44CLb9gPzL5KmRc9YfPqPwN mGj68T7Sod7zRucv9ZeZmaLBF2fhSBTZ5iC5nsCPB88zS4zzu3eXb+XlGCbGWqDrNTeJ 7d5y40qMZERtjQQCeBP32AYOEDAZkQkzD/k6KCSm/fAhVucafBbMsjvFzqvjgNphyHxh 7sKnIdK+4Nv0c4snexeWem5L6SYHwBwO0TzeDen7ZbuU4uQgUWKYWXqGQw+QN70M8YIK m24Q== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TcWhFddYLioACmrYWc82+Ad5sDtEsUIBBlgwZEUKP5E=; b=Djvm4hLeMdLfgVNH+DmPuruWMBWEN9UUvnTMow9r4+MFlDsXRJeq7NNQFTpM610x3J 3vu3hTbsNh6VLgBaCBp6GodIr1rzIRvvEtLM1kKPUr2cNHvf8zYfeiU/dfeIckvb4Qiy 6e84I5fpv5lqrwRw141OUAKbly2sM8x9rDyneNnAwAlMcxRvo3HCU8CznuDcaU03pJ7W evSCCAXNMrc92Znl4IPje99gETN5HoMOHdbXVinXm66rqkMNC1bJ/0OLNIZ9ageTzCr6 zZjBHWowRK8NZkGEgmeEGYOeuhHQ/vUf4EBpAOmtbcmC7TC/8A/SisW+pEAEyoUNN+Gr QLyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jMf3p584; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d19-20020a170906545300b0070aaee0b228si12398077ejp.52.2022.06.10.05.07.03; Fri, 10 Jun 2022 05:07:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jMf3p584; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1345227AbiFJL7J (ORCPT + 99 others); Fri, 10 Jun 2022 07:59:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241978AbiFJL7I (ORCPT ); Fri, 10 Jun 2022 07:59:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C3723DA66 for ; Fri, 10 Jun 2022 04:59:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8ADAC620EB for ; Fri, 10 Jun 2022 11:59:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F297EC3411D; Fri, 10 Jun 2022 11:59:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654862345; bh=5Mr5Sik8VWTLpdnt8HV3IJSO9fv11eufUOK1EynOnpk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jMf3p584FFyuxNXad/BsqR0oTJxaZ5SnsOxDwYH8jmutGuvWhVGh+pje4ewHk+ou9 cFNEiiWEluRdFdkTUS9MiX5nIvi4vLebMBJizOJmAYgOeHe8p9x77+gk8S4Ge2CNzu DCUyZDNZlwwNn/pkP1j3x+vXBNlxIS7/wUfpZmhh9EdS71ww06gEAS1ZQnIPZOtSte 7fw0dxp+c3pGTTBBePiarFs3KYogtYcvXBLuOVjUHYhRBHBU+nlOVPJAa6BqBAK+ut CFvzykI5H2q0OTMMrsrCrkhHT2aaVt4zLuo5CQIgFI7WJ9J7y/N9X/4JEUXVTxVRqk UlVy6tQWQ6CoA== Date: Fri, 10 Jun 2022 12:59:00 +0100 From: Mark Brown To: matthew.gerlach@linux.intel.com Cc: "Zhang, Tianfei" , "gregkh@linuxfoundation.org" , "rafael@kernel.org" , "linux-kernel@vger.kernel.org" , "Wu, Hao" , "trix@redhat.com" , "Xu, Yilun" , "Weight, Russell H" Subject: Re: [PATCH v1] regmap: add generic indirect regmap support Message-ID: References: <20220607013755.594554-1-tianfei.zhang@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rGCl5PdKPhlcp1q1" Content-Disposition: inline In-Reply-To: X-Cookie: Teachers have class. X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --rGCl5PdKPhlcp1q1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jun 09, 2022 at 05:30:43PM -0700, matthew.gerlach@linux.intel.com wrote: > On Thu, 9 Jun 2022, Mark Brown wrote: > > On Wed, Jun 08, 2022 at 11:54:26PM +0000, Zhang, Tianfei wrote: > > > > ...that this appears to be entirely specific to some particular device, it's got > > > > things like hard coded register addresses and timeouts which mean it can't be > > > > reused. > I think part of the confusion is that this patch should have been included > in a patch set that actually uses this regmap. This patch really should be > included with the following: > https://lore.kernel.org/all/20220607032833.3482-1-tianfei.zhang@intel.com > The hard coded register definitions are offsets to the passed in void > __iomem base address. This set of registers provides the semantics of > indirect register read/write to whatever the register set is connected to on > the back end. Conceptually this could be considered a specific type > indirect register access controller, but currently we have very different > backend implementations in RTL. Part of our intent is to have consistent > register interfaces for our FPGA IP so multiple drivers can reuse this > regmap. ...which is all specific to your particular implmentation of this and not a generic thing that will work for anyone else who implements the concept of indirected register access and happens to use a different control mechanism. If you have to use the same register interfaces to reuse this code then the code isn't generic. --rGCl5PdKPhlcp1q1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmKjMgMACgkQJNaLcl1U h9BOswf+NM7CxR4noTaDr7F6YCmwh/BvL0+NAAA2LrOMx9N4jT5bGPcNEE9SHOL7 wqpxDbox8KS9d/tzEXB67Yzt8NYXztVXb1umqDqJ5q54JTRyvoiqk3wtLwQtC+Kk yung/rVvgcPZ3NGpvsthu28fZjmSXMQrW6uD9OLmoFHXEd5tr3SnGP+rj9BSuFhW SQFRGHOCeiSW3W7RY2/90DjOFlRH5FrZWeHwD1w1THPHcCV6TqtD0GkakoCBCIgR OZQTCC4L2Oz9adhIoEsuAkMfmj5CrQjkYpnlWtu1xFFp82lXYHAV3z6ukiPlfMVL n8FksWkktC/d2U2o9Hv8tC16MDkyMw== =ZB12 -----END PGP SIGNATURE----- --rGCl5PdKPhlcp1q1--