Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1001596lqo; Fri, 17 May 2024 08:00:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUwqscKwZUSnQK+x0QblxoKoBKNpCsIIr1WyfSVfVrkByVo06oGc3ThwPTokpwr2dWpkaON5ELPCVgCsU3zDidzyCcQWX2g0uAnhPI9uQ== X-Google-Smtp-Source: AGHT+IEHHt1ns5PLY15zGq73qV0erdGhFbK/UGMqLaW6s0qhi0norv3qRDmKIkjoXXMwvv0xN9O8 X-Received: by 2002:a05:6358:8416:b0:18a:8e58:b992 with SMTP id e5c5f4694b2df-193bcff1a5amr2665643055d.28.1715958012044; Fri, 17 May 2024 08:00:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715958012; cv=pass; d=google.com; s=arc-20160816; b=vMK1n92q21i326Jkwb4z9/teRsZQjCEymvYxYxa9EKn8RFOpcETx5AIAalnrzE+O50 vCrCejb45bta2TWMHO3aRZ0XDnLF+9hITvJD7nof7AJbpG+VqyS7LkiG9L13PHRYgyo9 pv/D8Mbi8n0MUZ7tZejGk87RGnJ5vFfoJdYJreAevYWN/yaHGmileoGR/NIYdZGsJE+r UPDaAz8ztetnyZzhG8jkLpYbSrDSdVAlYQ42KznGjeuxwBGpj5p4HxiMfqpdx2LQwDzy L2o/G/xgmpfrPIUJ7okgr2Psaq9nYJIMy2YDththElHiB5QXhjo/oejUK2SZwW438U4o R5GA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NezEZV8/U3HcwMn+qQUpzf79OtDnyNyi2+bSo1hWKDY=; fh=xMKjDIbh6dGw39uz524uEyRx77I+mA9snNyl7gAdZr4=; b=fp0AmqXzyzyojm7tRcYZnePhn3jQt97u/x0N8pG92krrkyRUKc4l0YuM5dFy0C2QZy +M0QrtAn/9Wz6d7VkZ9S3KjOEpGxbK5OfCgBACSeqIYt0qaSCo2Jqn8dekugLg6dfOw8 T5jLGHv/6HcpUbRVegG+hwy6hOueLLStu/o9Z9xfLacd6A0lN3qoRCcS+uIZTZF1ydWo zEo6Osp5OzryyM9TSOXRjY/rslY3nVv4ec10m16hpaVhRbaiEvvOeiOM+HRjDiFhk440 uES5X3OcqM2xIvOsVJa3FsX3upmpkps/bS5+RZjeF89SnFq7koyVKvh9NmGTFY/XGz2C yKCQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kjGwxqiz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-182220-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182220-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-654a527942csi5582990a12.588.2024.05.17.08.00.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 08:00:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182220-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kjGwxqiz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-182220-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182220-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 81AF5B24C29 for ; Fri, 17 May 2024 14:42:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 234C33EA69; Fri, 17 May 2024 14:42:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kjGwxqiz" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35AC6399; Fri, 17 May 2024 14:42:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715956960; cv=none; b=Y5HY1uKDYV9554fQw0Txjkj5jAw4dZr5w5rANp3BejILai62atWoax9h/HIuGcbi1oXLDkR1jTFzPmxsDilMttz7YJBmsILPCs1MA6oBqFfeLQcArrdeuOPIGB3+KCkgy8AeWHcowmuWudzundc7Q4c7SutTc3i6gJ1XoI4vymk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715956960; c=relaxed/simple; bh=jKRgN0QD9wRM4aUvZG8JXovQYD/wGll0Cdifvs5S1b8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sbqOsqSVWDXRP2vKxJfCKf7K5KCX9A9xO3ulGhSTDxw6Kcapng3LWiW6tCUvz0HssSOjMxoLuvrt07uTOebcJHiqA3P8wi7Ejix9tymgpu6jWEAPEMOyTxQwg4PEh3iD3VX1uHOhE0Fsnydse6tf+0RKi+E5f8ZthhYbhGbMhUg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kjGwxqiz; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F32D5C2BD10; Fri, 17 May 2024 14:42:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715956959; bh=jKRgN0QD9wRM4aUvZG8JXovQYD/wGll0Cdifvs5S1b8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kjGwxqizbfMy/89nLYJd7BTwYgtKI+YKReedplRu+ebvikohESEJ4mNl/EVFV6PH1 k/n35Tu7ytDaWdmUDDV1Q0ne99h0qszV0pEl0ZT+/Xh9OProXD2gN4QsqNEIZdI1Rw 1K4zMSuS5Nt4j1LF+hBRqR1buTcgJ6HdEiBayh3vMPwDWhsI4K3xKxvVBCtAqCBb3B 2nWhT0jF/nyqtiOJx+mWzL6Ha4ldnVgSj0JiecEVj1D8Dc+AoIhYR6LsV8i/PwXN1N YXdYXgo4YurdqCHEpfBRTszB+kULbJQtxh43prQkSSM4w9JHfvtj1yh55hxPqFFCAn dAyaXe/ts0v2g== Date: Fri, 17 May 2024 15:42:31 +0100 From: Mark Brown To: Alvin =?utf-8?Q?=C5=A0ipraga?= Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Bartosz Golaszewski , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Michael Turquette , Stephen Boyd , Andi Shyti , Saravana Kannan , Emil Svendsen , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-sound@vger.kernel.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, Alvin =?utf-8?Q?=C5=A0ipraga?= Subject: Re: [PATCH 02/13] regmap: add A2B support Message-ID: <49cd7b8e-d104-4136-bf7d-7eb45725c596@sirena.org.uk> References: <20240517-a2b-v1-0-b8647554c67b@bang-olufsen.dk> <20240517-a2b-v1-2-b8647554c67b@bang-olufsen.dk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Qt8EKyDk+1Qw4HPv" Content-Disposition: inline In-Reply-To: <20240517-a2b-v1-2-b8647554c67b@bang-olufsen.dk> X-Cookie: Function reject. --Qt8EKyDk+1Qw4HPv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 17, 2024 at 02:58:00PM +0200, Alvin =C5=A0ipraga wrote: > +static int regmap_a2b_write(void *context, const void *data, size_t coun= t) > +{ > + for (i =3D 0; i < count - 1; i++) { > + ret =3D bus->ops->write(bus, node, reg + i, d[i + 1]); > + if (ret) > + return ret; > + } Just force single_read and single_write (looks like you'll need to add the hook for the bus there). > +struct regmap *__devm_regmap_init_a2b_node(struct a2b_node *node, > + const struct regmap_config *config, > + struct lock_class_key *lock_key, > + const char *lock_name) > +{ > + return __devm_regmap_init(&node->dev, ®map_a2b, node, config, > + lock_key, lock_name); > +} > +EXPORT_SYMBOL_GPL(__devm_regmap_init_a2b_node); Should there be validation of val_bits? --Qt8EKyDk+1Qw4HPv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmZHbNcACgkQJNaLcl1U h9DP5Af+OAUcNbSUZNsBiGMNoWWL9BqTN9x5hsblj8pit+bjIa6k4Un5NW4To/Tz lpxrs+5G210GiKB/Pce3ysC61iSyxxAEtYi+WxNbUTNgMXcEcxXlA7REku4GaqUB aBg6LevsX756RuU7lTJaIyYZigD0X5a8s1MOqFbRVsTI9cMRvDM/65Gxvp61+ea3 IrLkn49TOwHAfk66W7il6diBi4ZLseiGII8I+i0wanPqNauRyXFN9l4pnZW4AtLt HI64kfng1cRujCp9NSDUwYoo5xabgTY1129pRNHsy+qr0alqiTt0GMabpNRqiAxl pqz9+CYAZjxgLgtP7zyeEuFFmao9wg== =hWRE -----END PGP SIGNATURE----- --Qt8EKyDk+1Qw4HPv--