From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753042AbbCXQta (ORCPT ); Tue, 24 Mar 2015 12:49:30 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:46787 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753557AbbCXQt2 (ORCPT ); Tue, 24 Mar 2015 12:49:28 -0400 Date: Tue, 24 Mar 2015 17:49:22 +0100 From: Markus Pargmann To: Mark Brown Cc: Liam Girdwood , Wolfram Sang , kernel@pengutronix.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] regulator: max8660: Remove boot_on handling Message-ID: <20150324164922.GM28604@pengutronix.de> References: <1427198883-6577-1-git-send-email-mpa@pengutronix.de> <20150324162226.GG17265@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QqzFzR/RUlLahzby" Content-Disposition: inline In-Reply-To: <20150324162226.GG17265@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: 17:44:02 up 62 days, 6:51, 163 users, load average: 5.83, 4.26, 2.89 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 --QqzFzR/RUlLahzby Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 24, 2015 at 09:22:27AM -0700, Mark Brown wrote: > On Tue, Mar 24, 2015 at 01:08:02PM +0100, Markus Pargmann wrote: >=20 > > boot_on is handled by the regulator core. It will call enable() on the > > regulators that are specified to be boot_on. So we don't require any > > additional handling in this driver >=20 > > switch (pdata->subdevs[i].id) { > > case MAX8660_V3: > > - if (boot_on) > > - max8660->shadow_regs[MAX8660_OVER1] |=3D 1; > > - break; > > - >=20 > So, this is updating the register default value rather than writing to > the device. That suggests that the purpose is to either avoid needless > write outs to the device or something, or at the very least it's not a > completely direct reimplementation of the core functionality. It is > certainly underdocumented at the minute (and the driver probably wants > to be converted to regmap) but this makes me a bit cautious about > obvious cleanups missing something. Sorry, this patch is wrong. I just realized that this chip is write-only and has different regulators that share the same registers. So it is impossible to selectively enable some regulators without accidentaly disabling others that may be enabled. So the code is necessary. 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 | --QqzFzR/RUlLahzby Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVEZWSAAoJEEpcgKtcEGQQh4wP/2wBK0GyoOnyyw9iPiOtLX0F RChhk9Eh0dY+SKI7BeOckjxs3ivlUmDLq4PO+oFuVdsjEvmvXRKycLDeNU36q3Ol R6SOGHezTruV2Vedmr80jotzIY8GsD0bkVEmpnYrUVewGv9S1l9E/3MUmE2rPJhg q1JKEtdfNE7TOQcKYzUs2iwJCioptwkPclXcvYuqir6XJhGkbu7+KD12RUvR+Scp B73RGURlgJQGQ8r5IRO5ej3DBxWGPdow5GeYYhOs9wfjcJ7RyA5Ewb7C1LsCHL/t DatLH4ZFL+TpY9jYW0PJ3ruR6qSK0buRDAixzA6/uTrOPdwvBrGb5gbloxcrDkI5 VaHAF53MZ9eqScdlPBHENdtB1xvCI2SkEDwwX6GQTZ21JguVFMjW5GPrvLGVhJwO hzVOm1KHbG/XSTIJ540vMlhKurCx185iaB7tsWQH5wpTowjEQrmAo35za7cRmzWl wiJKuIzrDjBPlkG+Idx+7Fq9uWk1AXqQlHmAo814BTNfYI82LGcfNpJu/RozkhyA mfVkrbSHhFQ9GzYF77pjsaufmUIZZINjYTMViQFzMowv+/j6OuP6HS61DP9XLl02 D7ZgAKi6m0Ci89Pi8OApZHr7cjAp79LGH8x2ixEsgpEtqrqw+ZyuWXZL5oTOcryK SGC9SEr8BrS3vvpIqPKt =4hEO -----END PGP SIGNATURE----- --QqzFzR/RUlLahzby--