From patchwork Fri Jan 24 09:31:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 233132 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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 4F005C2D0DB for ; Fri, 24 Jan 2020 10:04:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 21300218AC for ; Fri, 24 Jan 2020 10:04:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579860281; bh=BAuGnV6ApDLBskZlToVXtsrcdU/YeZu3hnzsSO+iKSU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=f1BbgCSxqfzS/drQHnI8/WKRDk19XN/HiuNg2iyVRQCR8nRjryYwrK+bVV5ikpwQY t88v42lA9wO5JAA0Lb+/ud917juoiyWddvhLzh0JnVPA+kOt0hvDdLSdRvHeBcRVUO Xs2DpB6ksZ3D1t2zay1h90gppanjfl1AahVnHwLU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387471AbgAXKEk (ORCPT ); Fri, 24 Jan 2020 05:04:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:41000 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730743AbgAXKEh (ORCPT ); Fri, 24 Jan 2020 05:04:37 -0500 Received: from localhost (unknown [145.15.244.15]) (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 5F321214DB; Fri, 24 Jan 2020 10:04:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579860277; bh=BAuGnV6ApDLBskZlToVXtsrcdU/YeZu3hnzsSO+iKSU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uSBgp08EJISKiPzCoO6D+rXLPoVjtC9AXG/5aosyPoIdZ+DQfd6Yr1UN3TOpa8r2o istM1eteTSPG5D5lHkxpYi3k4797EBE0WjZlWpONc1iF7fFNT0/Yo665cSj4OteM3x RSeqLsbVX0ooQvCQOrr0JMBK1l++GcAiovm+kSL0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Robertson , Guenter Roeck , Sasha Levin Subject: [PATCH 4.14 301/343] hwmon: (shtc1) fix shtc1 and shtw1 id mask Date: Fri, 24 Jan 2020 10:31:59 +0100 Message-Id: <20200124092959.489155447@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200124092919.490687572@linuxfoundation.org> References: <20200124092919.490687572@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dan Robertson [ Upstream commit fdc7d8e829ec755c5cfb2f5a8d8c0cdfb664f895 ] Fix an error in the bitmaskfor the shtc1 and shtw1 bitmask used to retrieve the chip ID from the ID register. See section 5.7 of the shtw1 or shtc1 datasheet for details. Fixes: 1a539d372edd9832444e7a3daa710c444c014dc9 ("hwmon: add support for Sensirion SHTC1 sensor") Signed-off-by: Dan Robertson Link: https://lore.kernel.org/r/20190905014554.21658-3-dan@dlrobertson.com [groeck: Reordered to be first in series and adjusted accordingly] Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin --- drivers/hwmon/shtc1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/shtc1.c b/drivers/hwmon/shtc1.c index decd7df995abf..2a18539591eaf 100644 --- a/drivers/hwmon/shtc1.c +++ b/drivers/hwmon/shtc1.c @@ -38,7 +38,7 @@ static const unsigned char shtc1_cmd_read_id_reg[] = { 0xef, 0xc8 }; /* constants for reading the ID register */ #define SHTC1_ID 0x07 -#define SHTC1_ID_REG_MASK 0x1f +#define SHTC1_ID_REG_MASK 0x3f /* delays for non-blocking i2c commands, both in us */ #define SHTC1_NONBLOCKING_WAIT_TIME_HPM 14400