From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933137AbdBHIzL (ORCPT ); Wed, 8 Feb 2017 03:55:11 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:38220 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933121AbdBHIh6 (ORCPT ); Wed, 8 Feb 2017 03:37:58 -0500 Date: Wed, 8 Feb 2017 08:52:19 +0100 From: Maxime Ripard To: lis8215@gmail.com Cc: linux-sunxi@googlegroups.com, thierry.reding@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/4] ARM: pwm: sun4i: unification of register operations for support sun6i. Message-ID: <20170208075219.oo234d5zartzmzsg@lukather> References: <1486489846-662-1-git-send-email-lis8215@gmail.com> <1486489846-662-2-git-send-email-lis8215@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="z7qpwgh2ly4sj6vp" Content-Disposition: inline In-Reply-To: <1486489846-662-2-git-send-email-lis8215@gmail.com> User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --z7qpwgh2ly4sj6vp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Tue, Feb 07, 2017 at 08:50:43PM +0300, lis8215@gmail.com wrote: > From: Siarhei Volkau >=20 > This patch not introduce new features, just prepare code for > adding sun6i PWM driver in next commits. >=20 > A31 SoC have a different map of PWM registers than others ASoCs, > but register bits purposes are very similar. >=20 > This patch introduce set of register access routines, which > are common for existing in driver ASoCs: > - ctl_rdy - checks the ready bit of specified PWM channel, > - ctl_read - reads value from control register of specified PWM channel, > - ctl_write - writes significant bits to control register of specified P= WM channel, > - prd_read - reads value from period register of specified PWM channel, > - prd_write - writes value to period register of specified PWM channel. > Driver code redesigned to use the new routines. Why don't you use regmap for that? Thanks, Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --z7qpwgh2ly4sj6vp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJYms4vAAoJEBx+YmzsjxAgTvkQAK9AfXB+ysbRhkkirq78hSLA xWJHPoAeS/vWD0Hhnksl9+JSKrkPDyoPROjB1SaWu88F9pC9RXOM2dvmKlC6hWX1 ss99h9+uFZoZGfp+vDo8/TprkggTcn7fIKbS2ORJUCbNQjOoeXz6v4XvqPB7DDMB ZQIksdHIIfvmEYl6GJS8jGXF/309ZKigKW9hJoxvpRYGySenM4LlItzIJNrEi5sj 3ACKJMj8anJx8p2KqdX1MgnIyZtSopU3MOhKfM+69+OIFtq/DwpFMMulpOhO74yl ZTMs7liYK6pBgbUiDbmEZZal66s6BCFOa5GajMTE6/aTmRhQRh+JHOpbdVjXtDDR U6pjA17U/paDfUuNrREHQZit9LHaWsrqIutvTJCIb1Ty3CMA3iVJPKchRD/5EQHO tGTFJiClm9SEApPWolk0SYUI3KmQjCLP3r4RDgJgbCsA6sVhf65gOqYNkRE2A2jA 3suJ4ITH0gUbw2/Tkh+oZqNN+ZB5bNpF9U7MbXTDWdr2TYCT0u70n+b0Jwg6MLfk lBC+IyZ0Y/ShIEGRP9fUtpPrLkqgkU5szCUfIjffP/NiccuSghsx/QTWZVJPkUe1 XjFukPe08bm4RfLj1Gd64dBDo1U+VuYYB2d3aROf8lsM7DvuVDBQFnrHaK+AIo7X z6Iy1DRrCXwr67YUMRxG =6Fru -----END PGP SIGNATURE----- --z7qpwgh2ly4sj6vp--