Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754198AbbEZPVO (ORCPT ); Tue, 26 May 2015 11:21:14 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:57386 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752783AbbEZPVM (ORCPT ); Tue, 26 May 2015 11:21:12 -0400 Date: Tue, 26 May 2015 16:21:00 +0100 From: Mark Brown To: Nariman Poushin Cc: patches@opensource.wolfsonmicro.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Message-ID: <20150526152100.GR21577@sirena.org.uk> References: <20150526123921.GA19072@opensource.wolfsonmicro.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yyrU2RV5TDi8TCB2" Content-Disposition: inline In-Reply-To: <20150526123921.GA19072@opensource.wolfsonmicro.com> X-Cookie: Positively no smoking. User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [RFC][PATCH] regmap: Add support for sequences of writes with specified delays X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2102 Lines: 55 --yyrU2RV5TDi8TCB2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, May 26, 2015 at 01:39:21PM +0100, Nariman Poushin wrote: > Change-Id:Ie9e77aa48f258b353ffa7406d02e19c28d5f2a44 Please don't include noise like this in upstream patches. > + if (regs[i].delay_us) > + udelay(regs[i].delay_us); This should be a usleep_range() at least (as checkpatch should have told you). > +int regmap_sequence_write(struct regmap *map, const struct reg_sequence *regs, > + int num_regs); It's a bit sad that this is a separate interface to the existing sequence writing interface (_multi_reg_write() and _patch()), and especially that it's a separate implementation. This means that if something needs a delay in the sequence it won't get to take advantage of any optimisations that the rest of the implementations get. Of course the fact that we used the same struct for both sequences and the register defaults makes this a bit annoying. We could either just add the extra field to the defaults and ignore it (we don't have *that* many defaults) or just update the existing users to use the new struct with the additional delay field (which is also fairly straightforward as we have few users right now). --yyrU2RV5TDi8TCB2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVZI9cAAoJECTWi3JdVIfQQ+0H/i93h+HgVHnLa4z/H6n6hh0n zg1Yoj8tbGrKKstqiCNlvh7GqlQIHxIaE3BgRUc0DfWM9MxfnX8rYcY9AnTcZWGC oPdAPLryh0NnQ/LtXoqMwmZdVrngrF1fBp8Jvy5wED/wt8FNdTA1DqsreQkyrXDk cStG3PINdU7yZHyKe+Aovl05phfpisLlV3GP/oFDIQv9T4sJ1OFrxikDknjiAJYR J7i1z43xeN0fRau8eGg3q+MGZrOGOAVChAoyXG5UqsnAYtn3V/MWHmKdsyBz2v4X iGuK4qd8zc1s0y+Y1jNjBk8grcPygXVAwoPymaCU3794yJscrmFnRRIBDVGsbno= =3jgC -----END PGP SIGNATURE----- --yyrU2RV5TDi8TCB2-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/