Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755748AbcC3RhH (ORCPT ); Wed, 30 Mar 2016 13:37:07 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:57276 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755220AbcC3RhC (ORCPT ); Wed, 30 Mar 2016 13:37:02 -0400 Date: Wed, 30 Mar 2016 10:36:58 -0700 From: Mark Brown To: Georgi Djakov Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, stephen.boyd@linaro.org Message-ID: <20160330173658.GN2350@sirena.org.uk> References: <1459347792-13515-1-git-send-email-georgi.djakov@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hND5PKUeuErErcgH" Content-Disposition: inline In-Reply-To: <1459347792-13515-1-git-send-email-georgi.djakov@linaro.org> X-Cookie: If anything can go wrong, it will. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 64.55.107.4 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH] regulator: Support ramp-up delay for drivers with get_voltage() 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: 1318 Lines: 39 --hND5PKUeuErErcgH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 30, 2016 at 05:23:12PM +0300, Georgi Djakov wrote: > + } else if (_regulator_is_enabled(rdev) && > + rdev->desc->ops->set_voltage_time_sel && > + rdev->desc->ops->get_voltage) { > + int uV = rdev->desc->ops->get_voltage(rdev); > + > + if (uV > 0) { > + old_selector = regulator_map_voltage(rdev, uV, uV); > + if (old_selector < 0) > + return old_selector; > + } If a driver is using selectors it should use selectors uninformly, it should not mix and match selector and raw voltage interfaces. If we the set and get operations are not symmetric I'd expect we're going to run into problems sooner rather than later. --hND5PKUeuErErcgH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJW/A61AAoJECTWi3JdVIfQYGEH/iRNr4Rf14Zm+lMeymX4ACnF bvHMqAmb8d1FtyA75/EiScwzf1GHpEXJ42kXUGOUAP807QOczVwG2sQ7zt7CEupz sA6c7VFSw+CKt/7Mc79qrG7Km5st04PF5mvJkLteOw8Bf2HeeZ9190aETTe4cmk8 Z5xKDhiDGMt/cWF+owP5JdO9yPPSbnUq6drwWijCDy+QTPUbDJuJFy6kI4jEFW0F nD84Ook0S07foDKxgWNzZ0spXapNBJyI8xk4obMBGjaVWzECP4ESLUTrcMMk87aX Ub9Ecdztl9+HKLzqJ90rzMg6Orax3SAvgUeZJR0ySjYYXaCCItB8qMVVAMRSem4= =aAYw -----END PGP SIGNATURE----- --hND5PKUeuErErcgH--