From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AE43C169C4 for ; Sun, 3 Feb 2019 13:04:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A24A217D9 for ; Sun, 3 Feb 2019 13:04:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549199054; bh=AsOPjwlR72OQSWBiSvP4cTgYqGcW7ZmqEVJrnn0Wl1o=; h=Subject:To:From:Date:List-ID:From; b=sch5Ub92it/gdNGL7bvsUYVVHhxwj2ififaNebKRUTOyQ9T/ISOeDdZjZjXBDRDdu nnJ2NcJILUijM81vrXRuSEimB5oWm2rbrhbc+sW8ckhWawEGzJyoFYkBQk9N2zWDYG n15V8ja+vNGbp1sbRwgJHfZxYg4eiuu3xsRfgS0w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727697AbfBCNEN (ORCPT ); Sun, 3 Feb 2019 08:04:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:40830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726625AbfBCNEN (ORCPT ); Sun, 3 Feb 2019 08:04:13 -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 20A2B20815; Sun, 3 Feb 2019 13:04:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549199052; bh=AsOPjwlR72OQSWBiSvP4cTgYqGcW7ZmqEVJrnn0Wl1o=; h=Subject:To:From:Date:From; b=S8c49Dq9oS6ti+TaaboqWqIO0zEXd8fEIM98+vOzqzXFMMtCiwoklZax4iIgTxWxe tuPRv8JZoYvnkppYoko1ZxMo5ZSpdCLqAl3IXMn8iw2hgHm9tAkHODK/jxfG7VcqYJ 69AZnD07eIK3KEUFK+wk8zASpZaBDlzcgn93W98U= Subject: patch "iio: chemical: atlas-ph-sensor: correct IIO_TEMP values to" added to staging-linus To: matt.ranostay@konsulko.com, Jonathan.Cameron@huawei.com, stable@vger.kernel.org From: Date: Sun, 03 Feb 2019 14:04:10 +0100 Message-ID: <1549199050337@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org This is a note to let you know that I've just added the patch titled iio: chemical: atlas-ph-sensor: correct IIO_TEMP values to to my staging git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git in the staging-linus branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will hopefully also be merged in Linus's tree for the next -rc kernel release. If you have any questions about this process, please let me know. >From 0808831dc62e90023ad14ff8da4804c7846e904b Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Sun, 30 Dec 2018 19:07:01 -0800 Subject: iio: chemical: atlas-ph-sensor: correct IIO_TEMP values to millicelsius 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 --- drivers/iio/chemical/atlas-ph-sensor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/iio/chemical/atlas-ph-sensor.c b/drivers/iio/chemical/atlas-ph-sensor.c index a406ad31b096..3a20cb5d9bff 100644 --- 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 *indio_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_dev *indio_dev, 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; -- 2.20.1