Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp714668imj; Wed, 13 Feb 2019 16:21:19 -0800 (PST) X-Google-Smtp-Source: AHgI3IZdpoK+xexMozFVqSCGs33ddNJ+R9FwVpBd/Fk1yCdDOTqutOli6GLfmUXFRMnXKQMnapaS X-Received: by 2002:a62:2702:: with SMTP id n2mr975615pfn.29.1550103679492; Wed, 13 Feb 2019 16:21:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550103679; cv=none; d=google.com; s=arc-20160816; b=Is9qdWzjn1SZyiUIFhtbgXMY1YoFoTeo8ayvAULfbfSbLLTbVyooact8Sm2SkskZCA VT3Cnf/1O56i3gpYhbSuRsMPGmF+MoYjA+YSNj1rQHNVzG02rAhe4HTiNqbjfxsf+e8R 5qlFIKwqrm3I8VlwUb14CuxodNXgHcuMz6fOo0xPxD9sUbD52f7teZ61pcmkRkCtgh21 abmMYgeo/hnUrRp6QNk5Zi4/qgQ+9lishVcC5cP7WFsvPh9UQtlmUrxlWHZq2rpitsiN /M3oEL9UBV3aozKfrf/bAoe6/fiw+G7Pq3AeVSZKJ71kEZfz/xgB3wdK9wPCouRxgahz 2+UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ppdN12lkaQvbhEyStuiZtfA29dchmgvO31znJen4kGA=; b=L0q5dKCq4HNweYWulXJTCbd6jsm203SRcetkRDoUNVwo+xWgphuA6w6HrCjP9D6PQN ejmKhH9rUi+XNe3Fgzx/Vj4OEscVFRZgr31E3P2jWSHmuH0Hzufia8yuQRiWeN77FFeY ypQJ2uYuydTy/DhykWCVa8VWS0KrlxGlfMQ2K5M2zxWeG2ZcB4RXUOlIlObtbTv3pnOZ 5uJk/Nb3MhrdRtqRR2o2ZVopYgWhqrm3piDyPxpbssMW8PRKfd7IqEQ8+z9VyvQpxH5V rDoxProNbSXpz8ua3+lw48XeG2q7+z8WT5VqlOG4/HsAN2wCW5szLw/UGrBH+JdfkUGf DOWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Bm+oTHUy; 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 w2si741901pgh.565.2019.02.13.16.21.03; Wed, 13 Feb 2019 16:21:19 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Bm+oTHUy; 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 S2436542AbfBMSrX (ORCPT + 99 others); Wed, 13 Feb 2019 13:47:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:43998 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406190AbfBMSpT (ORCPT ); Wed, 13 Feb 2019 13:45:19 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 04EB4222D2; Wed, 13 Feb 2019 18:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550083518; bh=8QvocePH4OissGj6raugLFY6J3Fa6tVbLGYAalx7dLg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bm+oTHUypomYpcvDJZ05r90F9aHmjdyV5M+q0fwTvXn3r/Zj5ASN/cSnvnUhPSKQ6 Ub532nKmqVtG52fH0PLrc0vK/3oaTlgt2ME36sqEvhySjZQMhkd2neeIRvG3crkfZO vwXkx41YQpiJbZ/u+qCKeKvhooRwJn3GYABvvzxs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matt Ranostay , Jonathan Cameron Subject: [PATCH 4.20 08/50] iio: chemical: atlas-ph-sensor: correct IIO_TEMP values to millicelsius Date: Wed, 13 Feb 2019 19:38:13 +0100 Message-Id: <20190213183656.466853359@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190213183655.747168774@linuxfoundation.org> References: <20190213183655.747168774@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Matt Ranostay commit 0808831dc62e90023ad14ff8da4804c7846e904b upstream. IIO_TEMP scale value for temperature was incorrect and not in millicelsius as required by the ABI documentation. Signed-off-by: Matt Ranostay Fixes: 27dec00ecf2d (iio: chemical: add Atlas pH-SM sensor support) Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/chemical/atlas-ph-sensor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --- a/drivers/iio/chemical/atlas-ph-sensor.c +++ b/drivers/iio/chemical/atlas-ph-sensor.c @@ -444,9 +444,8 @@ static int atlas_read_raw(struct iio_dev case IIO_CHAN_INFO_SCALE: switch (chan->type) { case IIO_TEMP: - *val = 1; /* 0.01 */ - *val2 = 100; - break; + *val = 10; + return IIO_VAL_INT; case IIO_PH: *val = 1; /* 0.001 */ *val2 = 1000; @@ -477,7 +476,7 @@ static int atlas_write_raw(struct iio_de int val, int val2, long mask) { struct atlas_data *data = iio_priv(indio_dev); - __be32 reg = cpu_to_be32(val); + __be32 reg = cpu_to_be32(val / 10); if (val2 != 0 || val < 0 || val > 20000) return -EINVAL;