Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7057004imu; Mon, 21 Jan 2019 22:55:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN7UIopXSpCj135w/e2AaHMOHBK0I5BtB/Ft743ZvbqzM7qQJEIqjzyfYgn7N5viO9bhlSFl X-Received: by 2002:a63:9a09:: with SMTP id o9mr29670351pge.94.1548140131526; Mon, 21 Jan 2019 22:55:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548140131; cv=none; d=google.com; s=arc-20160816; b=HAjXal2B/qq7oGuxlSdrPbImnHoHFPWDN9mYMD/MZjVpJzcv7kJDOtMk4CYBfIq+Em 4D5ZALOwTIUSzbt2YyO2onyILnsLVzcYuntJgmMKf69ttEhDoL6P4ZORLjyMpLUpYgq2 sTgwRANaiDA19tLcCeIKKia7n/IgjDH/vgZcRUwKyJXC++Mkhjjk2GzBSp97VCRG6wY9 J0rNh8eODyzUtdWb45kHaVFnfryPreBZXP9AUs4dgIH38ALNfj+Bs9APo8v1s5yLr7+H AOeaJjMkKphXjxp6eDynran+C7v2z6kQvN8JaruDvbeY8YFeRLd1I2lYgUGZ51s9/8TW KQ3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=FyMBAxoY97WZUP5DXGEq60LSHRQJ7W7xxIgtlXLmlUA=; b=shCite8rh6qKbA7CegrAAETUZzZ93loirq94ZkwmPcgibI3d3l55hmPoTy8nOwq+5z xbJ7J6cnd3YTbJmrUDOYa+QouW5Anr8nJN4vH37Dz5Mxbk/bSRUYBKXgyc8SiSFTngj7 lbKFhxTLUpGtSlXlKfx1jn6a3IgP2+iUJ08gL0mFzPka7HmvFPxaKQKkVKoo2oc8Ks7c JGeSK/h586m0m9LdsnPZ9NymWinlYP9EjuHHi6MqhHNen2qVpuwRnajTNwLEnGlUSmlz sb4pgEK9FfSqkHllHhwSfZjVzlWsNEI5kSGe40TVpN60n7z9upkMMd1YJH8JCr4OkMw0 tzBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ByvvIguU; dkim=pass header.i=@codeaurora.org header.s=default header.b=ByvvIguU; 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 w32si13866078pga.337.2019.01.21.22.55.15; Mon, 21 Jan 2019 22:55:31 -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=@codeaurora.org header.s=default header.b=ByvvIguU; dkim=pass header.i=@codeaurora.org header.s=default header.b=ByvvIguU; 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 S1727055AbfAVGyM (ORCPT + 99 others); Tue, 22 Jan 2019 01:54:12 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:59708 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbfAVGyM (ORCPT ); Tue, 22 Jan 2019 01:54:12 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B7DD160112; Tue, 22 Jan 2019 06:54:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1548140050; bh=bRxgBIDXyaA/wO+ILENvcJSwu3d4IwPowzDLzkmM5RI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ByvvIguUqHP+TRNBl/0TKbt9JKAI/PjacgvWJ9cd9I7UKGbkGIGRbzT/H8LEP5XF5 wiJ5oUCoQzd42Yl8tmjWZZ+6O6HuFSbMEPQo13TMDgHoM8OpkHGE+HgSb5CW+JSp95 sdIRjXb8vttvGhDYIFvwB0B2BY1SAejJs+a8kEV0= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 399CF60312; Tue, 22 Jan 2019 06:54:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1548140050; bh=bRxgBIDXyaA/wO+ILENvcJSwu3d4IwPowzDLzkmM5RI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ByvvIguUqHP+TRNBl/0TKbt9JKAI/PjacgvWJ9cd9I7UKGbkGIGRbzT/H8LEP5XF5 wiJ5oUCoQzd42Yl8tmjWZZ+6O6HuFSbMEPQo13TMDgHoM8OpkHGE+HgSb5CW+JSp95 sdIRjXb8vttvGhDYIFvwB0B2BY1SAejJs+a8kEV0= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 22 Jan 2019 12:24:10 +0530 From: alokc@codeaurora.org To: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Alok Chauhan , Karthikeyan Ramasubramanian , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: andy.gross@linaro.org, david.brown@linaro.org, georgi.djakov@linaro.org, dianders@chromium.org, swboyd@chromium.org, bjorn.andersson@linaro.org Subject: Re: [PATCH 3/6] i2c: i2c-qcom-geni: Add interconnect support In-Reply-To: <1548069703-26595-4-git-send-email-alokc@codeaurora.org> References: <1548069703-26595-1-git-send-email-alokc@codeaurora.org> <1548069703-26595-4-git-send-email-alokc@codeaurora.org> Message-ID: X-Sender: alokc@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Please don't review this patch. I've resend patches after adding all the mailing list. Sorry for inconvenience. Please review patches with spi/i2c/uart/kernel mailing list added. On 2019-01-21 16:51, 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); > + ret = geni_interconnect_init(&gi2c->se); > + if (ret) { > + dev_err(&pdev->dev, "interconnect_init failed %d\n", ret); > + return ret; > + } > + > ret = device_property_read_u32(&pdev->dev, "clock-frequency", > &gi2c->clk_freq_out); > if (ret) { > @@ -611,6 +621,8 @@ static int __maybe_unused > geni_i2c_runtime_suspend(struct device *dev) > gi2c->suspended = 1; > } > > + geni_icc_update_bw(&gi2c->se, false); > + > return 0; > } > > @@ -619,6 +631,7 @@ static int __maybe_unused > geni_i2c_runtime_resume(struct device *dev) > int ret; > struct geni_i2c_dev *gi2c = dev_get_drvdata(dev); > > + geni_icc_update_bw(&gi2c->se, true); > ret = geni_se_resources_on(&gi2c->se); > if (ret) > return ret; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,a Linux Foundation Collaborative Project