linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: alokc@codeaurora.org
To: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	Alok Chauhan <alokc@codeaurora.org>,
	Karthikeyan Ramasubramanian <kramasub@codeaurora.org>,
	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
Date: Tue, 22 Jan 2019 12:24:10 +0530	[thread overview]
Message-ID: <b0df5f24c58766ac10ed1524abfa5f11@codeaurora.org> (raw)
In-Reply-To: <1548069703-26595-4-git-send-email-alokc@codeaurora.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 <alokc@codeaurora.org>
> ---
>  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 <linux/pm_runtime.h>
>  #include <linux/qcom-geni-se.h>
>  #include <linux/spinlock.h>
> +#include <linux/interconnect.h>
> 
>  #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

  reply	other threads:[~2019-01-22  6:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-21 11:21 [PATCH 0/6] Add interconnect support for GENI QUPs Alok Chauhan
2019-01-21 11:21 ` [PATCH 1/6] dt-bindings: soc: qcom: Add interconnect binding for GENI QUP Alok Chauhan
2019-01-22  6:43   ` alokc
2019-01-21 11:21 ` [PATCH 2/6] soc: qcom: Add wrapper to support for Interconnect path Alok Chauhan
2019-01-21 11:21 ` [PATCH 3/6] i2c: i2c-qcom-geni: Add interconnect support Alok Chauhan
2019-01-22  6:54   ` alokc [this message]
2019-01-21 11:21 ` [PATCH 4/6] spi: spi-geni-qcom: " Alok Chauhan
2019-01-21 12:43   ` Mark Brown
2019-01-22  6:21     ` alokc
2019-01-21 11:21 ` [PATCH 5/6] tty: serial: qcom_geni_serial: " Alok Chauhan
2019-01-21 11:21 ` [PATCH 6/6] arm64: dts: sdm845: Add interconnect for GENI QUP Alok Chauhan
  -- strict thread matches above, loose matches on Subject: below --
2019-01-22  6:33 [PATCH 0/6] Add interconnect support for GENI QUPs Alok Chauhan
2019-01-22  6:33 ` [PATCH 3/6] i2c: i2c-qcom-geni: Add interconnect support Alok Chauhan
2019-01-22  9:07   ` Wolfram Sang
2019-01-22  9:13   ` Peter Rosin
2019-01-23  6:51     ` alokc
2019-01-24  1:19   ` Evan Green
2020-02-17 13:29 [PATCH 0/6] Add interconnect support to UART, I2C, SPI and QSPI Akash Asthana
2020-02-17 13:30 ` [PATCH 3/6] i2c: i2c-qcom-geni: Add interconnect support Akash Asthana
2020-02-18 22:47   ` Matthias Kaehlcke
2020-02-19 13:47     ` Akash Asthana
2020-02-21  0:24       ` Matthias Kaehlcke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b0df5f24c58766ac10ed1524abfa5f11@codeaurora.org \
    --to=alokc@codeaurora.org \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=david.brown@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=georgi.djakov@linaro.org \
    --cc=kramasub@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swboyd@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).