Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3912711imj; Tue, 12 Feb 2019 06:50:00 -0800 (PST) X-Google-Smtp-Source: AHgI3IbYVlCX9yJ1veX79cZzSPdM6tnjDeqOaSjrmE9U+iP8SIYB/3KwEe6SC0OnJPty7ZkhpCWV X-Received: by 2002:a17:902:9b90:: with SMTP id y16mr2810004plp.0.1549983000687; Tue, 12 Feb 2019 06:50:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549983000; cv=none; d=google.com; s=arc-20160816; b=dxxOQsD14wQk+pvzogwwj1cp/s5BKQBqcqZXIGvQ2iYO9cgNnlzrp2n2MNlmcnxwEe 7sSg7k37wgRiTflT9YLcdTP37e0SN78dN+yBkIzZqOfroYTfb23pyqJ3dzxwhcgDClMQ +Ju68KCKiwIonCpqdoTKkmQSJeo+m3pcqQHIviAYdXTXkNMqlw2d8wcWEHYqQygm9S2a pb8wTEeFETaEWoRPHhAJMOb6GVJlEuZRas6dB/TIBjYOuF/xsfRsD0gDk2eSFH+ZOU8L IPL6NNfz/gNgz6ezwurhJQXW14UmKgSwVotyUAu6b4X81jYL11CZATknksgsj4BC46a8 PhWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=liEBkhXZQ9IqFJNVwPGMhxoYOruqbu7nL5FEVKkWx5w=; b=Con2Ou0FzuAah8FbtotVh5rqcxkCm3fB/zC+XkynjR/pa9Uh/7s+ivpJfUmi4Ux1Wl HGu0Xiy9P0XdMFBXYwPsgk8X0AV7PTClip9DBBCGC0iIcEXe/3QWFvT51/3DMTptz7H3 nDlSh5pDMn8EJQCUOgssqN5OreALsyHLpLwZrLoMJFTR8wkYdkyixZFBjnWUZV93JL3Z rxNzIuOUSKxAqqiFjBoPSg8xdy+DP84R3D92FDazy2CgHoIBIXqbzbKR9c5hZ8xxvhVY HbV8N7ee1FdTjB+BdN5SypXApm6mMpJ14c1R76Q3nvMGc1gZNYbVcrM8boFM+r8N89aL etaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y2si5692736pga.118.2019.02.12.06.49.45; Tue, 12 Feb 2019 06:50:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729332AbfBLObw (ORCPT + 99 others); Tue, 12 Feb 2019 09:31:52 -0500 Received: from atl4mhfb03.myregisteredsite.com ([209.17.115.119]:59070 "EHLO atl4mhfb03.myregisteredsite.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728725AbfBLObv (ORCPT ); Tue, 12 Feb 2019 09:31:51 -0500 X-Greylist: delayed 347 seconds by postgrey-1.27 at vger.kernel.org; Tue, 12 Feb 2019 09:31:50 EST Received: from jax4mhob17.registeredsite.com (jax4mhob17.registeredsite.com [64.69.218.105]) by atl4mhfb03.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id x1CEQ2eC011866 for ; Tue, 12 Feb 2019 09:26:03 -0500 Received: from mailpod.hostingplatform.com ([10.30.71.205]) by jax4mhob17.registeredsite.com (8.14.4/8.14.4) with ESMTP id x1CEQ0KV149509 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 12 Feb 2019 09:26:00 -0500 Received: (qmail 28747 invoked by uid 0); 12 Feb 2019 14:26:00 -0000 X-TCPREMOTEIP: 81.173.50.109 X-Authenticated-UID: mike@milosoftware.com Received: from unknown (HELO mikebuntu.TOPIC.LOCAL) (mike@milosoftware.com@81.173.50.109) by 0 with ESMTPA; 12 Feb 2019 14:26:00 -0000 From: Mike Looijmans To: linux-iio@vger.kernel.org Cc: linux-kernel@vger.kernel.org, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, Mike Looijmans Subject: [PATCH] iio/gyro/bmg160: Use millidegrees for temperature scale Date: Tue, 12 Feb 2019 15:25:49 +0100 Message-Id: <1549981549-19786-1-git-send-email-mike.looijmans@topic.nl> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Standard unit for temperature is millidegrees Celcius, whereas this driver was reporting in degrees. Fix the scale factor in the driver. Signed-off-by: Mike Looijmans --- drivers/iio/gyro/bmg160_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/iio/gyro/bmg160_core.c b/drivers/iio/gyro/bmg160_core.c index 63ca316..ad7f8cb 100644 --- a/drivers/iio/gyro/bmg160_core.c +++ b/drivers/iio/gyro/bmg160_core.c @@ -585,8 +585,9 @@ static int bmg160_read_raw(struct iio_dev *indio_dev, *val = 0; switch (chan->type) { case IIO_TEMP: - *val2 = 500000; - return IIO_VAL_INT_PLUS_MICRO; + *val = 500; + *val2 = 0; + return IIO_VAL_INT; case IIO_ANGL_VEL: { int i; -- 1.9.1