Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp466817ybl; Tue, 28 Jan 2020 06:25:12 -0800 (PST) X-Google-Smtp-Source: APXvYqw4JGQXTO31KYcJDg/V5qyIqnO1ASpJq82B2uFur7I4h/7RQk4RDyYnhmyELWgtnpcsF0cC X-Received: by 2002:a9d:7342:: with SMTP id l2mr16684569otk.98.1580221511842; Tue, 28 Jan 2020 06:25:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580221511; cv=none; d=google.com; s=arc-20160816; b=0aAt0/erm+UsTIPEdr1+BeOFGzQ57qg4WLOLpEzCD4kKeUPndOJBAibVcs+AgwNCsx jxzRq15OKN59vRLjbOo113CkUh2psz2gJzuHEYPr9bfscRLCabZMAUzdkNgNJ/bRoVH9 KBMSflISdtTuNmNg8vArGSL11Hte4PIBdohwF5Lc6qkfxI9DpNeUloZhH4ycakjjxqB8 VxRKpEpuyjSk/NkAgMZ1eUCIGZPwRGTkrgMSKCD31KkFBZyLgcASOQHVHI5PvRklEZEi yrTf0iz9hmKfkrPa63m4Rzg8IF2tWETw4pd0DM0BzIzrDJd9zjYogTQ7XypsCkD2NRP2 c0IA== 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=T7xBYwcI0WwV4672RFtgkukqW8DxV/EDZG3GFQqFraY=; b=zEcJ8g2NNY3Fj/dOpu8ZwDEU+Oj0NL/hksqfent2MOxSGcg34k3fmsxAEB2E02c8PP CiKAcqxRdoWaomH4E4fJR1itD2vJDFS/QR746ohwBgPXi1u37Q1kwEApdrUTsDQMA7tz tHzJTdLA56RI/40JPA3BmuaDULJnZvZs5t39K4p2czsRv5JRL2Plju86V+tNcuuGpLao lfx4dNCb62PvhAE2ECfFTijPb+cjgpMaooBJa6wqgYMygGvY9Pwx1ujSywGnZTANW7Nw pLJERMZ5FE/yPn8h25hUCNNeuKo7DabOpf355DZqb+Nfdx3VeiC1msOlp187lffwzS2Q w8+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DdiMJxu+; 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 v13si1653334otp.273.2020.01.28.06.24.59; Tue, 28 Jan 2020 06:25:11 -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=DdiMJxu+; 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 S1731795AbgA1OWz (ORCPT + 99 others); Tue, 28 Jan 2020 09:22:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:48844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731753AbgA1OWx (ORCPT ); Tue, 28 Jan 2020 09:22:53 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 B3CBA24686; Tue, 28 Jan 2020 14:22:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221373; bh=BAuGnV6ApDLBskZlToVXtsrcdU/YeZu3hnzsSO+iKSU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DdiMJxu+9xgkJ22CLB8TG7ZfHGlVVynwq1sZmzZQDZw58JHaWQWDF1qL6Gs7VdJfc hEulzUC1aKSJs7ktm+/U0zkbpRks1PuY+/sc2JrkH0DLsCSwhg5bsFWdBHYdkue7qH pKgj8nmKzJaWBdyyBFawl6nZlOAmNSy6Q/NzaJw8= 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.9 199/271] hwmon: (shtc1) fix shtc1 and shtw1 id mask Date: Tue, 28 Jan 2020 15:05:48 +0100 Message-Id: <20200128135907.392010581@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135852.449088278@linuxfoundation.org> References: <20200128135852.449088278@linuxfoundation.org> User-Agent: quilt/0.66 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 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 -- 2.20.1