Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp861341pxb; Tue, 1 Feb 2022 11:59:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLdW3177xYscvXiyXZTR1cXsc2PdGmFBDml+c6TENMniGxEBgt/ADFJsFsA3ggwf1RKHlo X-Received: by 2002:a50:baa8:: with SMTP id x37mr5521686ede.450.1643745550516; Tue, 01 Feb 2022 11:59:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643745550; cv=none; d=google.com; s=arc-20160816; b=RyjQhD8dNEuDGZuz30PK58x0mYYW2N5J3BD0vD0Q8Bu1QqUHFdBHnQ1xxJpQ52eXmi HVvPSwN56JovkxKRTpHSKY7E/Wb4CnpTLUMQPVa5VkcCin1nZKEHhsQ4UOVxixTO1fpm eByRpSYJzIfKwW0KrT7R3Xyq5Gs1kqhGnu/JAaADt9/7k2j4gYOyCGFDY6mcH6sdX//9 KP0wXdOQXW8rQLbG53nfE0XwG8T/u9Yq9JRdalrje6sGtpTuK1XXLDezaxDT1WqaHTfr zXcqbyWYj3OSsjrVnzoRH7yDWZHlnYREXyDkVRiV1hpKoSa9I3Wi6dBJYiDU4KdczTmd HyWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xzxtZ5tW5PgfRTkoDYKYUqaHtLMbJULUs6dU9C1m3jA=; b=KmOtR4Lcw+qspG3IvwoLfG7gpOH1+grBbg5VWkjEOJ9ZaOXk5ZcXQtzIXd7QqntMfL jseDshzjdd/PxW1rhKaYnoAuWK2b44PXEJQJpn7BaOoRuLvjp1n7OWiYlMLmc3USGkJP OuFlHj1xHHwq9om9604oYsS6rcmTRf1cmEpihKtIbS8AP9emFGIiAkUUJ5pM5w42Eb58 YYn8Rf0p+o7Q/iTcozrt0cuXJ6SeKBuuCnt4NRSGyaqvFnCoPt9KMJ6LCwQH11ZgKpFM cP4rzZTXQFtzQgla9kRnlKA3xKgEVFT9kZrAbiNOWGcVWoJyUeedNk8uWTRaG4s/65QJ JXQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kkno23gH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n6si10051324ejl.34.2022.02.01.11.58.45; Tue, 01 Feb 2022 11:59:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kkno23gH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377896AbiAaLKe (ORCPT + 99 others); Mon, 31 Jan 2022 06:10:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359487AbiAaLFl (ORCPT ); Mon, 31 Jan 2022 06:05:41 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B14EC061343; Mon, 31 Jan 2022 03:04:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9F63960F30; Mon, 31 Jan 2022 11:04:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66CACC340EE; Mon, 31 Jan 2022 11:04:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643627048; bh=cyrUHQ/bV6GZ/AT9V/xmKq9w0SJfnB1JiyEl7DchvfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kkno23gHTbkwfig28rmM04qUZoqVbQjJC0vvSPHA5HVol7wzfuWnZ1VI8tSJn4Bmq QJZuySOqMZTlsghklnGOumRB4jXbY5vAM5hO4w81/DhHSk3++i5ecsA/gU4+BjzA2X fYnw/O+lht3KFhBfMn2WNawuQqzYSDDexI5sYulk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guenter Roeck , Sasha Levin Subject: [PATCH 5.10 058/100] hwmon: (lm90) Reduce maximum conversion rate for G781 Date: Mon, 31 Jan 2022 11:56:19 +0100 Message-Id: <20220131105222.388646211@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220131105220.424085452@linuxfoundation.org> References: <20220131105220.424085452@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guenter Roeck [ Upstream commit a66c5ed539277b9f2363bbace0dba88b85b36c26 ] According to its datasheet, G781 supports a maximum conversion rate value of 8 (62.5 ms). However, chips labeled G781 and G780 were found to only support a maximum conversion rate value of 7 (125 ms). On the other side, chips labeled G781-1 and G784 were found to support a conversion rate value of 8. There is no known means to distinguish G780 from G781 or G784; all chips report the same manufacturer ID and chip revision. Setting the conversion rate register value to 8 on chips not supporting it causes unexpected behavior since the real conversion rate is set to 0 (16 seconds) if a value of 8 is written into the conversion rate register. Limit the conversion rate register value to 7 for all G78x chips to avoid the problem. Fixes: ae544f64cc7b ("hwmon: (lm90) Add support for GMT G781") Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin --- drivers/hwmon/lm90.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/hwmon/lm90.c +++ b/drivers/hwmon/lm90.c @@ -373,7 +373,7 @@ static const struct lm90_params lm90_par .flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT | LM90_HAVE_BROKEN_ALERT | LM90_HAVE_CRIT, .alert_alarms = 0x7c, - .max_convrate = 8, + .max_convrate = 7, }, [lm86] = { .flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT