Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1271794pxu; Mon, 23 Nov 2020 16:39:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLkK/ja/PEu9UWPAxrqdY+OvFBrdvRA8/RdpRE1IsnPoH9D4fDl5zfssa3LBbF1KIgGmDh X-Received: by 2002:a17:906:6091:: with SMTP id t17mr1952265ejj.476.1606178367943; Mon, 23 Nov 2020 16:39:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606178367; cv=none; d=google.com; s=arc-20160816; b=DcrzyXJNPyOGw4MuC51O5QjgrXALrhFYxmfGbymlPcN/Ft4CKCmJmcOqMWn7ImA1wD 16MXW+XU3+tLeWlXLbTQDGNntOcH7hW0nxRavbWZwjCVQPfJ6L/DOUUze8kEr3iWJ8gt Uy4ylkwZFGDy4PtXROhNFOF6bhikkhxf653/ZD4w7BlyBuATH0cAxRWXhc472mkEdv6i ArDQ1xHlFkgiTr/ufRqBbKN0VyAR9FeQjaxgeaMdASe5/YRUfNC6R7idCeHbFjg/ABtl vrlnyrm68pRy0q7+vJhMzPd7QGtwPD8IA5orW2aEQVkoKI6bw1nVBkvlaZ/NZSyJE/DB M12g== 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; bh=tgqYqLb6xnVSpYqKIfk9AYYXQ0Yg3FcKCjDSNwzvCaM=; b=k74gn0S7bHHw6AbtQ3jiEYNbeXI8m3Zi5oZwIOfh2Niuzuo+iKgSS/8tf5o6tz/V/q dXmQBIg53LEGAWkEMTWZNvmYgwXdC2of3+TKo00hq7ZctVH3B5QIFTOSlhZH2SosXLF4 xgiaqpENs/tyFfyIjYj8af3GWvtFgbMY4ibkF5t6fKesCSY6JTA0bo56f5j0nJjA92Nt k9n9DgGZBPeGmbFtUhiFx9KPgw6tQfTWXLx+FGS6d2ihOJj8jjI3NAt04t8RgvEqngve neDBtFokROu/EOjr7mv0phDKHTiLc5Bx3W8Jl+Ru0FhOAaM0+a/E+pkn44zTg+7/8UuI cb0A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi9si9113701edb.331.2020.11.23.16.39.05; Mon, 23 Nov 2020 16:39:27 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731270AbgKWViQ (ORCPT + 99 others); Mon, 23 Nov 2020 16:38:16 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:34543 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728940AbgKWViP (ORCPT ); Mon, 23 Nov 2020 16:38:15 -0500 Received: from localhost (lfbn-lyo-1-997-19.w86-194.abo.wanadoo.fr [86.194.74.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id BDBBC240009; Mon, 23 Nov 2020 21:38:08 +0000 (UTC) Date: Mon, 23 Nov 2020 22:38:08 +0100 From: Alexandre Belloni To: Jonathan =?iso-8859-1?Q?Neusch=E4fer?= Cc: linux-kernel@vger.kernel.org, Lee Jones , Rob Herring , Thierry Reding , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Alessandro Zummo , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Sam Ravnborg , Linus Walleij , Heiko Stuebner , Stephan Gerhold , Lubomir Rintel , Mark Brown , allen , Mauro Carvalho Chehab , "David S. Miller" , devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Heiko Stuebner , Josua Mayer , Andreas Kemnade , Arnd Bergmann , Daniel Palmer , Andy Shevchenko Subject: Re: [PATCH v4 5/7] rtc: New driver for RTC in Netronix embedded controller Message-ID: <20201123213808.GP348979@piout.net> References: <20201122222739.1455132-1-j.neuschaefer@gmx.net> <20201122222739.1455132-6-j.neuschaefer@gmx.net> <20201122231054.GH348979@piout.net> <20201123213105.GC456020@latitude> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201123213105.GC456020@latitude> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/11/2020 22:31:05+0100, Jonathan Neusch?fer wrote: > > > + res = regmap_write(rtc->ec->regmap, NTXEC_REG_WRITE_MINUTE, ntxec_reg8(tm->tm_min)); > > > + if (res) > > > + return res; > > > + > > > + return regmap_write(rtc->ec->regmap, NTXEC_REG_WRITE_SECOND, ntxec_reg8(tm->tm_sec)); > > > > Couldn't you do a regmap_block_write or a regmap_multi_reg_write which > > would be more efficient as they would be locking the regmap only once. > > I can't find regmap_block_write anywhere, but regmap_multi_reg_write > looks like a good approach to simplify the code here. > I was thinking regmap_bulk_write but regmap_multi_reg_write is probably more fitting here. > > [...] > > Note that this won't compile after > > https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git/commit/?id=fdcfd854333be5b30377dc5daa9cd0fa1643a979 > > > > We can solve that with immutable branches though. > > Thanks for the heads-up. Please let me know if/when there is any action > that I need to take here. > I wouldn't think so, I can carry a patch once Lee provides his usual immutable branch. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com