Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752058AbbKPK5Z (ORCPT ); Mon, 16 Nov 2015 05:57:25 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:33992 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbbKPK5V (ORCPT ); Mon, 16 Nov 2015 05:57:21 -0500 Date: Mon, 16 Nov 2015 10:55:58 +0000 From: Mark Brown To: Boris Brezillon Cc: Thierry Reding , linux-pwm@vger.kernel.org, Mike Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Liam Girdwood , Kamil Debski , lm-sensors@lm-sensors.org, Jean Delvare , Guenter Roeck , Dmitry Torokhov , linux-input@vger.kernel.org, Bryan Wu , Richard Purdie , Jacek Anaszewski , linux-leds@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , linux-sunxi@googlegroups.com, Joachim Eastwood , Thomas Petazzoni , Heiko Stuebner , linux-rockchip@lists.infradead.org, Jingoo Han , Lee Jones , linux-fbdev@vger.kernel.org, Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Robert Jarzmik , Alexandre Belloni , Julia Lawall , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Message-ID: <20151116105558.GB31303@sirena.org.uk> References: <1447664207-24370-1-git-send-email-boris.brezillon@free-electrons.com> <1447664207-24370-10-git-send-email-boris.brezillon@free-electrons.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="z6Eq5LdranGa6ru8" Content-Disposition: inline In-Reply-To: <1447664207-24370-10-git-send-email-boris.brezillon@free-electrons.com> X-Cookie: Does the name Pavlov ring a bell? User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH v4 09/24] regulator: pwm: use pwm_get/set_default_xxx() helpers where appropriate 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: 1606 Lines: 45 --z6Eq5LdranGa6ru8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 16, 2015 at 09:56:32AM +0100, Boris Brezillon wrote: > +++ b/drivers/regulator/pwm-regulator.c > @@ -56,7 +56,7 @@ static int pwm_regulator_set_voltage_sel(struct regulat= or_dev *rdev, > int dutycycle; > int ret; > =20 > - pwm_reg_period =3D pwm_get_period(drvdata->pwm); > + pwm_reg_period =3D pwm_get_default_period(drvdata->pwm); > =20 > dutycycle =3D (pwm_reg_period * > drvdata->duty_cycle_table[selector].dutycycle) / 100; It's not clear to me that we're not looking for the current period here or in the other use. Won't configuring based on a period other than the one that has been set give the wrong answer? --z6Eq5LdranGa6ru8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWSbY+AAoJECTWi3JdVIfQP9YH/3HzShiMLEHM9htE9zNi+b1X MKled9NiDc/GeTF0N91okJI0AYB953qVhV2jETJCizDuZlnLQS5o4d4dwFMcxo5V 073JdENcBmchGG17/ZXvRViugGvrNtlGr9GetDwiL0CvD0kAxDnhWEoo/KPKsK05 PEUzGzCsmaAsREQrybun3RQZHqBuBltRt1rYY8dO67r9DmYiqgOP6OUUC5Ra7W/m VkUjVpTMQh9CgjYpnMbXOTVo1K2H8RTS8Dd1httZ/jAbgeXo839WSmxynpWOz089 +OPFh9ouikJsJ29QUyBCqXuXozYcSOpQP80sFx+Jv8QyrEXGihhzEiG2pFxlYsE= =WKGz -----END PGP SIGNATURE----- --z6Eq5LdranGa6ru8-- -- 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/