Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754626AbbHLNRy (ORCPT ); Wed, 12 Aug 2015 09:17:54 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:59970 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751881AbbHLNRw (ORCPT ); Wed, 12 Aug 2015 09:17:52 -0400 Date: Wed, 12 Aug 2015 15:17:50 +0200 From: Markus Pargmann To: Mark Brown Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron , kernel@pengutronix.de, Srinivas Pandruvada , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 10/20] regmap: _regmap_raw_multi_reg_write: Add reg_write() support Message-ID: <20150812131750.GO19600@pengutronix.de> References: <1439374365-20623-1-git-send-email-mpa@pengutronix.de> <1439374365-20623-11-git-send-email-mpa@pengutronix.de> <20150812123923.GI10748@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5OY1VMnxNaoJKAjw" Content-Disposition: inline In-Reply-To: <20150812123923.GI10748@sirena.org.uk> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 15:13:38 up 10 days, 16:47, 84 users, load average: 0.24, 0.40, 0.75 User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: mpa@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2525 Lines: 63 --5OY1VMnxNaoJKAjw Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 12, 2015 at 01:39:23PM +0100, Mark Brown wrote: > On Wed, Aug 12, 2015 at 12:12:35PM +0200, Markus Pargmann wrote: > > Define a fallback for busses which do not define a write() function. > > Instead we write one register at a time using reg_write(). > >=20 > > Without this patch, _regmap_raw_multi_reg_write would break as it tries > > to call bus->write() without checking if it exists before. >=20 > Why are we trying to use multi write APIs in the first place if we can't > do raw I/O? Because we may not know if the bus supports raw IO and I would prefer if it is not necessary to know in the driver that just uses the regmap API if the underlying bus supports it. Sorry this patch is wrong, instead it should set can_multi_write properly depending on the availability of map->bus->write(). The code would already handle multi writes then. Thanks, Markus --=20 Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --5OY1VMnxNaoJKAjw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVy0d+AAoJEEpcgKtcEGQQYkUP+QHzGbUE2Mr2jHSuwA2R9aiJ jl0iFTsspn6be0S55d0wBkImkpLj/Rag8i05+TRIsoSXGFR+9IOomW5B+oe52+6K L/4HvelJgIg+ST0qpAojDqbqVhVBaByUCHrM7A3FOShAt3YfRO40hmUEwYU89qe7 q4p6e/Nem5mEnIiFyIm2tO5BfWU8mfKkX41eHV/0OlacUBmuQyCikHyxfqmX4tXm QsCK1XBU3JSUK5Q1Pyz/hVXIBepT96Oaf4N5E1ak9dIQrXQcxEiGelapwtr2IcUr hINZFm5n0MiQcJMhx9MMVGbmR9GUSjLiTu7wj9j8iwbHsoZKwoh5I7ylv7gcMZJq m+1a3H9ZeZV23HwlkM2dplE8y+JHHAJUL3EjwHVlENviAq74fPUIpmBq7yhIM9PL Nr8glEa5M+xL4Zl/1PX2e69V8g+tTUW1/Bo8Iu9odNHHjnLa6FyPlY6mwfUAHkRz 63XKdzHvy/dp3Nd8oJpI5ea6rZt9X5q6RFRfKJ9eAezlAQAqedjqpaFK0wTSB5/t T/JyDdxooL0ZpTgJ1uai0GUdy+9BOoPPD10r6KjZZWfGJiuztEMIoMMivGpJpO+H kGHoRVCvBoQn7VOdIjpabEYEPonlrMCbSedWar4vIrSGxVxp/UQZYSN942pQAdWv BQqXEh2OgICYlqFmE/NG =ttgo -----END PGP SIGNATURE----- --5OY1VMnxNaoJKAjw-- -- 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/