Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1428160imu; Wed, 23 Jan 2019 17:20:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN7XUkj2HgNK6kATAneaJtEhAsv+Ykq0kQgQauugjpaO2L04l7JPKOL54Pe1qlEGkWpDmSKP X-Received: by 2002:aa7:8802:: with SMTP id c2mr4374339pfo.20.1548292857399; Wed, 23 Jan 2019 17:20:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548292857; cv=none; d=google.com; s=arc-20160816; b=IwYy5RJhWIvNxSPNF3fTIriyA/9/irfqRnCyc0phn9zcpwTC3BpR07umV/yo51tgOf 2RIUooYg2R8yeeKGbCuxw7GaHB5+56DiChotQzDT6TMRLNpVtuUkY/pzm430+n6ZJklz IkRYbuCp8lxQ04jgiqlFOTndy6m+So+H7R22GveivlPU0ZBGDsW5cR3wYCwQNdQNysoA DKX7nT9Te/3objxqFoLKE9JUGXJ8UFAqXeyNAuVODBV5LpD2l9AaVKq98wD3QHm6aGAr HsoDoCQIOwX3owPzs6tj5xlRvoiSlGKWvSXlsrcfCJ8WyiH9n9nSbd1aQClYaWmZUdgD B50Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=sYOSbofglNAJWY1LRY85s+aLYj+xUOL7/6KVkUK+Pzw=; b=ZLw++mzdSR2mtdGKmg0iG68ctXV3Bs7Rj2L30i7NNJVjCcim76kTxUQRTvsuHkzVuF obuvf9KlziJsIl4gjUwuBPkc3dXsMWtRxBpNys/V0qnhlAI3RcF5ZLuTIRfOg/7uguaj fZ6IBZySEdI5Cj+jmten+9Uq9ohMgr9Gc7E08thNu+ugbOgkayYPL2lTVovlQFAr5S8v WvRaxgisAHSipLLXSVLTEZTU0IoyjjrJ9LlaAurkXSH/6FOP6gO8n6NEWW0sG3+RcjfH P5U0XM1hnDm7Rc3zj7JBEd2j1jEbMXdFkbecLp+rEK6veXVmWh4Qcn683Kngk6qqqccR u/MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PoVJYaGN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f16si20475422pgg.173.2019.01.23.17.20.41; Wed, 23 Jan 2019 17:20:57 -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=@chromium.org header.s=google header.b=PoVJYaGN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727161AbfAXBTt (ORCPT + 99 others); Wed, 23 Jan 2019 20:19:49 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:47098 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726786AbfAXBTt (ORCPT ); Wed, 23 Jan 2019 20:19:49 -0500 Received: by mail-lf1-f68.google.com with SMTP id f5so3030730lfc.13 for ; Wed, 23 Jan 2019 17:19:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sYOSbofglNAJWY1LRY85s+aLYj+xUOL7/6KVkUK+Pzw=; b=PoVJYaGNEN/zJ/WXkOQ9cB6ZJJWR45k0RsxtgpejetNq9FcuMaAcmZ7ZUViEZkm12u OhxyhkZtntz5lBG5RNKP6LuWQb9yXjYNODug+3WMF/1bg/4e+3DxjQnDDoQoSFVkJdY0 BCQQNuH6U1vdU1GOUjaQE5bRE3RETyWDRTIjw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sYOSbofglNAJWY1LRY85s+aLYj+xUOL7/6KVkUK+Pzw=; b=UhvpRBlreRCdyhqeRM2Ol5Ly3buLUtfwtc2Ruy8wHMQo2+syh6lLiZFYst6La4uR83 CFivVaCbvVP1GrI8ArZagEg/DvHQwfHcS+l+O+x6+RdH7EgrONUnN2mQ0jUZmAZF5cZ/ os5j5AkgzI9WYBUdZOzkrzV3UX0MpZJ/nBQg4HY/3Ntr+MA4cRK3rdMc9a/QzYtVch4Q nNwtrJwEYYTqiqeKn7kX7KNsX8yLDNgDQnycyhFcP8x2Enw2uvKqcqeMYhRWW6W827La zoabLxK74l7xSfzILYLk7qLVejTA6+ToFrIonb+yKk757TRnKDzD/nVek37rzzgEDRHN YvNA== X-Gm-Message-State: AJcUukdsqRSkUjy54Im0uQb+tJrAL9EnmxiWJJnMWu/s0iPXYW5XQcyb JUDydeX/97RRIpLFE6BkV0EJ4vYe8/Q= X-Received: by 2002:a19:ee08:: with SMTP id g8mr3583943lfb.72.1548292787667; Wed, 23 Jan 2019 17:19:47 -0800 (PST) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com. [209.85.167.46]) by smtp.gmail.com with ESMTPSA id 85-v6sm778581lja.16.2019.01.23.17.19.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jan 2019 17:19:46 -0800 (PST) Received: by mail-lf1-f46.google.com with SMTP id f5so3030691lfc.13 for ; Wed, 23 Jan 2019 17:19:46 -0800 (PST) X-Received: by 2002:a19:a9d2:: with SMTP id s201mr3639684lfe.154.1548292785963; Wed, 23 Jan 2019 17:19:45 -0800 (PST) MIME-Version: 1.0 References: <1548138816-1149-1-git-send-email-alokc@codeaurora.org> <1548138816-1149-4-git-send-email-alokc@codeaurora.org> In-Reply-To: <1548138816-1149-4-git-send-email-alokc@codeaurora.org> From: Evan Green Date: Wed, 23 Jan 2019 17:19:09 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/6] i2c: i2c-qcom-geni: Add interconnect support To: Alok Chauhan Cc: linux-arm-msm , devicetree@vger.kernel.org, LKML , linux-i2c@vger.kernel.org, linux-spi@vger.kernel.org, linux-serial@vger.kernel.org, Karthikeyan Ramasubramanian , Andy Gross , David Brown , Georgi Djakov , Doug Anderson , Stephen Boyd , Bjorn Andersson Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 21, 2019 at 10:34 PM Alok Chauhan wrote: > > Get the interconnect paths for I2C based Serial Engine device > and vote accordingly based on maximum supported I2C frequency. > > Signed-off-by: Alok Chauhan > --- > drivers/i2c/busses/i2c-qcom-geni.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c > index db075bc..e8fe63a 100644 > --- a/drivers/i2c/busses/i2c-qcom-geni.c > +++ b/drivers/i2c/busses/i2c-qcom-geni.c > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include > > #define SE_I2C_TX_TRANS_LEN 0x26c > #define SE_I2C_RX_TRANS_LEN 0x270 > @@ -508,6 +509,15 @@ static int geni_i2c_probe(struct platform_device *pdev) > return ret; > } > > + /* Set the bus quota to a reasonable value */ > + gi2c->se.avg_bw = Bps_to_icc(1000); > + gi2c->se.peak_bw = Bps_to_icc(76800000); Can you compute a real bandwidth based on the i2c bus speed, rather than some max vote?