linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko@sntech.de>
To: David Wu <david.wu@rock-chips.com>
Cc: wsa@the-dreams.de, robh+dt@kernel.org, dianders@chromium.org,
	andy.shevchenko@gmail.com, pawel.moll@arm.com,
	mark.rutland@arm.com, ijc+devicetree@hellion.org.uk,
	galak@codeaurora.org, briannorris@google.com,
	davidriley@google.com, huangtao@rock-chips.com,
	hl@rock-chips.com, xjq@rock-chips.com, zyw@rock-chips.com,
	cf@rock-chips.com, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-i2c@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 8/8] i2c: rk3x: support fast-mode plus for rk3399
Date: Wed, 11 May 2016 23:09:43 +0200	[thread overview]
Message-ID: <5153288.jNhUuzGC3g@phil> (raw)
In-Reply-To: <1462908794-27333-1-git-send-email-david.wu@rock-chips.com>

Am Mittwoch, 11. Mai 2016, 03:33:14 schrieb David Wu:

please always try to also provide some sort of commit message.

---
Implement fast mode plus that allows bus speeds of up to 1MHz.
.....

---

Additionally, the i2c-noob in me would wish for a short sentence on where 
the timing values come from (measured, somewhere in the TRM I didn't find or 
something completely different).


Patch content itself looks good, so with a suitable commit message,
Reviewed-by: Heiko Stuebner <heiko@sntech.de>


> Signed-off-by: David Wu <david.wu@rock-chips.com>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
> ---
> Change in v8:
> - None
> 
>  drivers/i2c/busses/i2c-rk3x.c | 21 +++++++++++++++++----
>  1 file changed, 17 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c
> index 25ed1ad..0ba25ee 100644
> --- a/drivers/i2c/busses/i2c-rk3x.c
> +++ b/drivers/i2c/busses/i2c-rk3x.c
> @@ -126,6 +126,17 @@ static const struct i2c_spec_values fast_mode_spec =
> { .min_hold_buffer_ns = 1300,
>  };
> 
> +static const struct i2c_spec_values fast_mode_plus_spec = {
> +	.min_hold_start_ns = 260,
> +	.min_low_ns = 500,
> +	.min_high_ns = 260,
> +	.min_setup_start_ns = 260,
> +	.max_data_hold_ns = 400,
> +	.min_data_setup_ns = 50,
> +	.min_setup_stop_ns = 260,
> +	.min_hold_buffer_ns = 500,
> +};
> +
>  /**
>   * struct rk3x_i2c_calced_timings:
>   * @div_low: Divider output for low
> @@ -531,8 +542,10 @@ static const struct i2c_spec_values
> *rk3x_i2c_get_spec(unsigned int speed) {
>  	if (speed <= 100000)
>  		return &standard_mode_spec;
> -	else
> +	else if (speed <= 400000)
>  		return &fast_mode_spec;
> +	else
> +		return &fast_mode_plus_spec;
>  }
> 
>  /**
> @@ -743,9 +756,9 @@ static int rk3x_i2c_v1_calc_timings(unsigned long
> clk_rate, const struct i2c_spec_values *spec;
>  	int ret = 0;
> 
> -	/* Support standard-mode and fast-mode */
> -	if (WARN_ON(t->bus_freq_hz > 400000))
> -		t->bus_freq_hz = 400000;
> +	/* Support standard-mode, fast-mode and fast-mode plus */
> +	if (WARN_ON(t->bus_freq_hz > 1000000))
> +		t->bus_freq_hz = 1000000;
> 
>  	/* prevent scl_rate_khz from becoming 0 */
>  	if (WARN_ON(t->bus_freq_hz < 1000))

  parent reply	other threads:[~2016-05-11 21:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10 19:24 [PATCH v8 0/8] add i2c driver supported for rk3399 David Wu
2016-05-10 19:24 ` [PATCH v8 1/8] i2c: rk3x: add documentation to fields in "struct rk3x_i2c" David Wu
2016-05-11 15:04   ` Heiko Stuebner
2016-05-10 19:24 ` [PATCH v8 2/8] i2c: rk3x: use struct "rk3x_i2c_calced_timings" David Wu
2016-05-10 19:24 ` [PATCH v8 3/8] i2c: rk3x: Remove redundant rk3x_i2c_clean_ipd() David Wu
2016-05-11 18:26   ` Heiko Stuebner
2016-05-12  1:11     ` David.Wu
2016-05-10 19:24 ` [PATCH v8 4/8] i2c: rk3x: Change SoC data to not use array David Wu
2016-05-10 19:29 ` [PATCH v8 5/8] i2c: rk3x: Move spec timing data to "static const" structs David Wu
     [not found] ` <1462908252-27016-1-git-send-email-david.wu-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-05-10 19:30   ` [PATCH v8 6/8] dt-bindings: i2c: rk3x: add support for rk3399 David Wu
2016-05-11 16:35     ` Doug Anderson
2016-05-12  1:14       ` David.Wu
2016-05-11 18:20     ` Heiko Stuebner
2016-05-10 19:31 ` [PATCH v8 7/8] i2c: rk3x: add i2c support for rk3399 soc David Wu
2016-05-11 11:43   ` Caesar Wang
2016-05-11 17:37   ` Doug Anderson
2016-05-12  1:08     ` David.Wu
2016-05-12 15:07       ` David.Wu
     [not found]         ` <57349C36.4030401-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-05-12 21:09           ` Doug Anderson
2016-05-10 19:33 ` [PATCH v8 8/8] i2c: rk3x: support fast-mode plus for rk3399 David Wu
2016-05-11 11:44   ` Caesar Wang
2016-05-11 21:09   ` Heiko Stuebner [this message]
2016-05-11 23:41     ` Doug Anderson
2016-05-12  8:30       ` Heiko Stuebner

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=5153288.jNhUuzGC3g@phil \
    --to=heiko@sntech.de \
    --cc=andy.shevchenko@gmail.com \
    --cc=briannorris@google.com \
    --cc=cf@rock-chips.com \
    --cc=david.wu@rock-chips.com \
    --cc=davidriley@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=galak@codeaurora.org \
    --cc=hl@rock-chips.com \
    --cc=huangtao@rock-chips.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=wsa@the-dreams.de \
    --cc=xjq@rock-chips.com \
    --cc=zyw@rock-chips.com \
    /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).