From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161071AbcHEI0k (ORCPT ); Fri, 5 Aug 2016 04:26:40 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:41239 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934069AbcHEI0f (ORCPT ); Fri, 5 Aug 2016 04:26:35 -0400 Subject: Re: [PATCH 2/2] regmap: debugfs: Add support for dumping write only device registers To: Mark Brown , Cristian Birsan References: <1470322558-7501-1-git-send-email-cristian.birsan@microchip.com> <1470322558-7501-3-git-send-email-cristian.birsan@microchip.com> <20160804202646.GH10383@sirena.org.uk> CC: , , , , , From: Nicolas Ferre Organization: atmel Message-ID: <3e42070f-a480-dbf4-1a97-b7172bebb1cc@atmel.com> Date: Fri, 5 Aug 2016 10:26:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160804202646.GH10383@sirena.org.uk> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CiCEaVbluPNFQMNT1wqviU0xnLiCjnM2d" X-Originating-IP: [10.145.133.18] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --CiCEaVbluPNFQMNT1wqviU0xnLiCjnM2d Content-Type: multipart/mixed; boundary="x5uGefixrRmsA3hQj8Pfo1k9CeaJ5WtTM" From: Nicolas Ferre To: Mark Brown , Cristian Birsan Cc: ludovic.desroches@atmel.com, alexandre.belloni@free-electrons.com, boris.brezillon@free-electrons.com, ce3a@gmx.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Message-ID: <3e42070f-a480-dbf4-1a97-b7172bebb1cc@atmel.com> Subject: Re: [PATCH 2/2] regmap: debugfs: Add support for dumping write only device registers References: <1470322558-7501-1-git-send-email-cristian.birsan@microchip.com> <1470322558-7501-3-git-send-email-cristian.birsan@microchip.com> <20160804202646.GH10383@sirena.org.uk> In-Reply-To: <20160804202646.GH10383@sirena.org.uk> --x5uGefixrRmsA3hQj8Pfo1k9CeaJ5WtTM Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Le 04/08/2016 =E0 22:26, Mark Brown a =E9crit : > On Thu, Aug 04, 2016 at 05:55:58PM +0300, Cristian Birsan wrote: >> Add support for dumping write only device registers in debugfs. This i= s >> useful for audio codecs that have write only registers (like WM8731). >> The logic that decides if a value can be printed is moved to >> regmap_printable() function to allow for easier future updates. >=20 > Please check your CC list when sending things upstream - try to ensure > that people you're sending patches to are relevant to the patch. > Maintainers often get lots of mail and having to sort out mail that's > not really relevant to them can make it easier for relevant mail to get= > missed. Mark, Just FYI, I gave Cristian the CC list he could use: In fact the Atmel / Microchip / Free-Electons people are in the list because we are all working together on the AT91 platforms now. And these platforms use the audio codec Cristian is working on. >> +static bool regmap_printable(struct regmap *map, unsigned int reg) >> +{ >> + if (regmap_precious(map, reg)) >> + return false; >> + >> + if (!regmap_readable(map, reg) && !regmap_cached(map, reg)) >> + return false; >> + >> + return true; >> +} >=20 > This only has one user... >=20 >> for (i =3D start_reg; i <=3D to; i +=3D map->reg_stride) { >> - if (!regmap_readable(map, i)) >> + if (!regmap_readable(map, i) && !regmap_cached(map, i)) >> continue; >> =20 >=20 > ...though it could have more. >=20 >> - ret =3D regmap_read(map, i, &val); >> + if (regmap_readable(map, i)) >> + ret =3D regmap_read(map, i, &val); >> + else >> + ret =3D regcache_read(map, i, &val); >> + >=20 > I don't understand this change, a read will go to cache anyway. >=20 --=20 Nicolas Ferre --x5uGefixrRmsA3hQj8Pfo1k9CeaJ5WtTM-- --CiCEaVbluPNFQMNT1wqviU0xnLiCjnM2d Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXpE3PAAoJEAf03oE53VmQCCQIAIghlqez+FxWpyY6/9tWYlff aGDlWALuTn/ab476KaJZqnh4qwUbSwE8pcvCjaXi8r74Q3Opm4dDO58NR4wWRFp0 qe0i+9iFI9Sv5OM03YWdIuZ9iI/1h0DR7EMDFeR9xwriODMKejL1g0WY3KSA16NL sNx4ootqKzNTBXts5m03SgTYS0mI/PoEigIGDBaCxKLMFA0EZcAgMnxNzlYjQeEn SjvXf6fbDlTlC/krMp3AxH6zhYUbGdS/kmiHttYDdSDW+EYdMg96boUlepmvL2G7 q0+QfINt08IckrOf0XL5hwj3OEXfc00TaZoGZ+vZi7Oan5jV/XyB1m92sh5/DQc= =64rm -----END PGP SIGNATURE----- --CiCEaVbluPNFQMNT1wqviU0xnLiCjnM2d--