Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp304664imd; Fri, 26 Oct 2018 08:48:46 -0700 (PDT) X-Google-Smtp-Source: AJdET5f/CwDnovVBnTWCethONr0/ZuQifVjfOZjD8qtP+ASJi73+UPQUSUruPIJO9tXEXEHtETtX X-Received: by 2002:a62:68c3:: with SMTP id d186-v6mr4345591pfc.195.1540568926476; Fri, 26 Oct 2018 08:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540568926; cv=none; d=google.com; s=arc-20160816; b=gQOE48+zgt1nl1RU8L1SKnm0zvDxzWLtuyuhk6fO8tB7IAWl1XqaIp0YjqeZuGcHBK MQviqZNCC3cmhMvEduqKt7rlAnuxi+dCT3DltYAt1x7S/fUbN0o22wMCtnsPwSzHJkKi Zb1g9e8XOdCQss2W/vkSaxju9QaCs4Mh52BaYca4YXp+6wq3ZN0nNcj6HEsQ0plvuQJc nyXPYUFrhebQKi1/qedgzMZGSLKLnJPjcYNizLGlxam7Tu3q32m43wuao15iuVgD3X7g 5qhsVo7oKKt3T/VEZnlUfvfyWstmmUyewDI255SMKD5DT+HEXvDsyPy28FOC6lSG68Qk fjdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Wzv1EIHIo+xf7l4NuQvWMa9Y1tL7EVaHiE9dv/HkItQ=; b=mjzGw5t0o8cv4pvsxtMuedRGHbxJDreLlKWesy5paSW0psielZ29PAbPAnvC+xi0jc GT9y7Hf1aYVVb3j19sR5rnpLyuCZMVun0vSAM3Zx+kX6S9KBmE1FiBu39RwOsqrNmxa8 jqCeSkDSvakW6ePBAxu1vYtdvf2bXXRpH5f+J+3rJxeg2K4nN+XoPT/bIvj2BTkzy8xF TpKXQ4e1vLX4SFT7eJKgcpXTyrJw7BYaz/AsZIRi3DEFncacXycyrFu/3a3PZRY7YMTo ckH+kSOvF0tixFoK0AVWGVt9W1m/FSnXvorptBP5y0QQzQEgH5xXSfWgF0yIPjF7b9sN AMCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=oyxsJg8l; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w33-v6si7628261pga.590.2018.10.26.08.48.30; Fri, 26 Oct 2018 08:48:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=oyxsJg8l; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727535AbeJ0AZc (ORCPT + 99 others); Fri, 26 Oct 2018 20:25:32 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:38074 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726113AbeJ0AZb (ORCPT ); Fri, 26 Oct 2018 20:25:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Wzv1EIHIo+xf7l4NuQvWMa9Y1tL7EVaHiE9dv/HkItQ=; b=oyxsJg8lYNhBrd36t4RcKr1sG utISkXj0D16nPsTZVegJuFOj0zBXcrgWrPnOISVgDNTb2hQEBv1ZiqFuJw6DuHhLtUo90GcrVzanL Bsb3vsF9+2CO+uHZFUv25u/ELdMnWq+HjhEoBbl0uIFiyT0/a9cSZ0VreX1apaWyBuLfo=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gG4L1-0003oi-QV; Fri, 26 Oct 2018 15:47:51 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 5A8C61122667; Fri, 26 Oct 2018 16:47:51 +0100 (BST) Date: Fri, 26 Oct 2018 16:47:51 +0100 From: Mark Brown To: Charles Keepax Cc: Lee Jones , Richard Fitzgerald , mturquette@baylibre.com, sboyd@kernel.org, linus.walleij@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, lgirdwood@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH v2 2/5] mfd: lochnagar: Add support for the Cirrus Logic Lochnagar Message-ID: <20181026154751.GA27137@sirena.org.uk> References: <20181008132542.19775-1-ckeepax@opensource.cirrus.com> <20181008132542.19775-2-ckeepax@opensource.cirrus.com> <20181025074459.GF4939@dell> <20181025082621.GD16508@imbe.wolfsonmicro.main> <20181025114205.GC4870@dell> <20181025124905.GF16508@imbe.wolfsonmicro.main> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pf9I7BMVVzbSWLtt" Content-Disposition: inline In-Reply-To: <20181025124905.GF16508@imbe.wolfsonmicro.main> X-Cookie: Kin, n.: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 25, 2018 at 01:49:05PM +0100, Charles Keepax wrote: > I don't think you can sensibly get away with not supplying > default values. You say most sane register layouts have zero > values, alas again you may not be the biggest fan of our hardware > guys. The Lochnagar actually does have mostly zero defaults but > that is very much not generally the case with our hardware. There's large classes of hardware where it's just not generally the default over all manufacturers - things like audio CODECs and regulators that have to represent continuous ranges of numerical values have to decide between a helpful representation of numbers with a non-zero default or having a more complicated representation of numbers which manage to make zero correspond to whatever the default value is. It's also quite common for booleans you want to default on. > One of the main aims of regmap is to avoid bus accesses when > possible but I guess on the first write/read to any register you > could insert a read to pull the default, although I do worry > there is some corner case/flexibility that is going to cause > headaches later. It will actually populate the cache from I/O if you don't provide defaults but it then can't tell what the physical defaults are, we could read back from hardware but then we have to sync that with the hardware being reset and if you read the whole thing back that gets super expensive with slow buses. --pf9I7BMVVzbSWLtt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlvTNyQACgkQJNaLcl1U h9AgVgf/XQjp7lDEmVFGgiTZTgLJZyMHMn1vB7lgsxxiFxVBlNiZr7Zg8BiK8cT5 1uTf6Z+Wn344YWwQ/Rx08GaLdcvfRKBPKQi6SGHpZ4pj5BJaOCobq3UlSyA9GXhO UPyMpdJa3yzXaF0PV7w6kXkYi0fJe9jVe21b06fJweZmCF0fGaF4WIAUDDn3B947 Uj+hZywPa3UuH04sE/PybfrKrGtJz73U6tSo/FcXhKdPEfVy8KL0FgWXQiV5BPUi xLU92y/gX8mS7L1aVPAoIkTgESA6sS0VKD4YLWjm9/1nWI1mghsTSSYfRqGJurvI lXhYY+HkMGRV8jaOE4o/LIYmz+ow/A== =EHBh -----END PGP SIGNATURE----- --pf9I7BMVVzbSWLtt--