Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3290274pxk; Mon, 21 Sep 2020 09:49:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+LCVpuR3koBwYE8Pi1PaGzmRcsCLEe1MSSUqoqs/aKCjAl8fqH/N1hL4K0Eu3lba8uEmb X-Received: by 2002:a17:906:b10:: with SMTP id u16mr312943ejg.179.1600706949320; Mon, 21 Sep 2020 09:49:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600706949; cv=none; d=google.com; s=arc-20160816; b=NIiUM8Sb8zaGL+hxUJe1GfD0PnZemvcYhbRfWn8yFxKbZ04jllxT4+zHZ/tb/j7rIG 9ujEDlP62GSE90vUcSZRShfgW3xHdjqIKw+ZEsDvzFmlXHrqF63Q9Mhb6OfpjkAYy1a6 ghyo5VrAcGcf+R8Zgxh/mWqBFaBFj5zPCDcxdaCK7PC7wUuE9moo1BxOWKOrjixgo4SS TWa2be676VyaMcyvtBI3tG5KgBneD29Mva6PpFzbB5cTKw1b0Db8O6okpbQLnkMXXr5q qUfvH+G8ui1S6oZAsPDXt63iVjmMUQmauVqG6kOcfEI+jqPLER3BuJhfRA14NzN8sL6Y dEjQ== 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=5FBBRR1gdq1ESoFSkEdzFlNYU+gh+gzfYUo1kKlfoNk=; b=sKdGiEE3PBr/PaYPIaZ3Wns2PXfSamybmv22BigFDf5ASHhz84cdvM0sr2HpKBj0MI 6D6ExjiwBKtvmjt/7lUqCFDL2dy+rbsYWhn1yLzacKHBlJ57gITyDIK3VEQxdq0yBjuc pqHUN5AI1jEFTsXCdZar8k6voeXC6bQ+HOnKHIeZEvUBEcdBhkJm2ZBkZhy/SWsnFeP/ cn5GJGYXIXQg3GbXybPVF8cQaGsl9P6b3HdM54vgy+oTmpVc8hchU4IXqEq768HQRNf2 bEairZZ22GaR6JEQFHk0z3J7ZKm2DsCHRubGWiGjLXqob0gcEqI5Btx3TwEk4psLov0e vrbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DzNbnxzR; 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=fail (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 jr18si8557299ejb.45.2020.09.21.09.48.46; Mon, 21 Sep 2020 09:49:09 -0700 (PDT) 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=@kernel.org header.s=default header.b=DzNbnxzR; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729538AbgIUQpt (ORCPT + 99 others); Mon, 21 Sep 2020 12:45:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:51816 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727337AbgIUQpn (ORCPT ); Mon, 21 Sep 2020 12:45:43 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 7A45920874; Mon, 21 Sep 2020 16:45:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706743; bh=sZ0X34q0lCuHz7JePqUQnYkx562+2UZhjKzVlNe39q0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DzNbnxzREGDPxX+6aF0/M10GWjYMggfTSqNnHVWlPjcPgP2cEgsYgIWAhgNnI8Nxx l9yP+MKnHMvAvDdxbjnEH1V1i9Vo34PjjdynSLhqby/zU4jE3sGGkqihyVh50J4Vno Z8Q90F/mhCrQiQWNfaoPMqcPEyQglusBiDAUjS6s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yingjoe Chen , Andy Shevchenko , Qii Wang , Wolfram Sang , Sasha Levin Subject: [PATCH 5.8 076/118] i2c: mediatek: Fix generic definitions for bus frequency Date: Mon, 21 Sep 2020 18:28:08 +0200 Message-Id: <20200921162039.861373792@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@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: Qii Wang [ Upstream commit ff6f3aff46beb3c29e0802cffcc559e1756c4814 ] The max frequency of mediatek i2c controller driver is I2C_MAX_HIGH_SPEED_MODE_FREQ, not I2C_MAX_FAST_MODE_PLUS_FREQ. Fix it. Fixes: 90224e6468e1 ("i2c: drivers: Use generic definitions for bus frequencies") Reviewed-by: Yingjoe Chen Reviewed-by: Andy Shevchenko Signed-off-by: Qii Wang Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-mt65xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c index deef69e569062..b099139cbb91e 100644 --- a/drivers/i2c/busses/i2c-mt65xx.c +++ b/drivers/i2c/busses/i2c-mt65xx.c @@ -658,8 +658,8 @@ static int mtk_i2c_calculate_speed(struct mtk_i2c *i2c, unsigned int clk_src, unsigned int cnt_mul; int ret = -EINVAL; - if (target_speed > I2C_MAX_FAST_MODE_PLUS_FREQ) - target_speed = I2C_MAX_FAST_MODE_PLUS_FREQ; + if (target_speed > I2C_MAX_HIGH_SPEED_MODE_FREQ) + target_speed = I2C_MAX_HIGH_SPEED_MODE_FREQ; max_step_cnt = mtk_i2c_max_step_cnt(target_speed); base_step_cnt = max_step_cnt; -- 2.25.1