Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752193AbcCGIix (ORCPT ); Mon, 7 Mar 2016 03:38:53 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:34231 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752025AbcCGIir (ORCPT ); Mon, 7 Mar 2016 03:38:47 -0500 Date: Mon, 7 Mar 2016 09:38:42 +0100 From: Thierry Reding To: Wei Ni Cc: rui.zhang@intel.com, MLongnecker@nvidia.com, mikko.perttunen@kapsi.fi, swarren@wwwdotorg.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] thermal: tegra_soctherm: fix sign bit of temperature Message-ID: <20160307083842.GC31189@ulmo.nvidia.com> References: <1456739480-3304-1-git-send-email-wni@nvidia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="96YOpH+ONegL0A3E" Content-Disposition: inline In-Reply-To: <1456739480-3304-1-git-send-email-wni@nvidia.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2157 Lines: 58 --96YOpH+ONegL0A3E Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 29, 2016 at 05:51:20PM +0800, Wei Ni wrote: > The sign bit of temperature readback is bit 0, not bit 1. > Change to BIT(0) to fix it. >=20 > Signed-off-by: Wei Ni > --- > drivers/thermal/tegra_soctherm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/thermal/tegra_soctherm.c b/drivers/thermal/tegra_soc= therm.c > index 74ea5765938b..136975220c92 100644 > --- a/drivers/thermal/tegra_soctherm.c > +++ b/drivers/thermal/tegra_soctherm.c > @@ -57,7 +57,7 @@ > #define READBACK_VALUE_MASK 0xff00 > #define READBACK_VALUE_SHIFT 8 > #define READBACK_ADD_HALF BIT(7) > -#define READBACK_NEGATE BIT(1) > +#define READBACK_NEGATE BIT(0) I haven't found this documented anywhere. The register documentation indicates that the SOC_THERM_TSENSOR_TEMP1 and SOC_THERM_TSENSOR_TEMP2 registers are in some kind of "temp readback format", but I can't find any specification of that format. Can you point me at the source for this information and file an internal bug report so that we can get the documentation updated? Thierry --96YOpH+ONegL0A3E Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJW3T4SAAoJEN0jrNd/PrOhse4QAI/h8xYt9W1wd2XPGKQeqZrX BuWzqUHYWrRkyPxWfjK7mHSwCvlRJeXbto40iZL5DDvVLjKI8wrB+8s2/5d0YQ5K s56io8NW9UQVn6WOO7wG2Y+jKLUoFECYrmSKItojVkzqi6IOk+dhMRPcvYH8FhOj edKX1uDd0IiFH6XsSXEymmrItm6a+Q1t/mhfyqGZAnG0Md/sat1Sic/jKN4hOU9x 5ne18cks4r4mb4xB8IgguVCTXd0ykh8dZ8mDQeiFW9PWoS5jDkPYxDZclS0xkuVU ZB0W+DXS907i52cQ7KcJZ1ZdQ44dX6Y0VW4N/An7oR5r7SFIC9OiOk4OMFYBdBbK UpiEr/xxS8qioMRkJKe+F9O7S6DdISvx8ucZWHmCh/5YwuglbU7DWr3bgUQCzSoA R8D5GMZM6QVLE1hhvCcZAoadyZQOXnDxmDOr49/jvl96fIUHkTCoFjnwxbHfT+Or ZXhA0Vc4zU9xghUgK4xVPh99Ik8a644RNIhq4YCRRY/5O9WJJ7mVKowk4fmhmsLG C8fNSab4uWMI82SknMofOSrNriazTnTZRAHMmG4EKI9Oy7iqXrOmGKLVPNlyfD7U 7VdopzHYhSPCIkYjh4Yd/3qPaXn9rHbcQvN+EWjWPuicz9C6AMpMMB6wNNqVScTx +xZDdoBcOWm3Nic+coGK =b0j7 -----END PGP SIGNATURE----- --96YOpH+ONegL0A3E--