All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Cc: linux-i2c@vger.kernel.org, anirudh@xilinx.com,
	soren.brinkmann@xilinx.com, michal.simek@xilinx.com,
	Shubhrajyoti Datta <shubhraj@xilinx.com>
Subject: Re: [PATCHv3 2/2] i2c: cadence: Implement save restore
Date: Thu, 3 Mar 2016 21:40:13 +0100	[thread overview]
Message-ID: <20160303204013.GC1711@katana> (raw)
In-Reply-To: <1456984240-17389-2-git-send-email-shubhraj@xilinx.com>

[-- Attachment #1: Type: text/plain, Size: 1933 bytes --]

On Thu, Mar 03, 2016 at 11:20:40AM +0530, Shubhrajyoti Datta wrote:

> Implement save restore for i2c module.
> Since we have only a couple of registers
> an unconditional restore is done.

But you only save one register instead of a couple? Also, the subject
could be more descriptive IMO.

> zynq-mp has the capability of going off.
> the current kernel does not hit off however some day it will.
> since the overhead of having the support is not much may be it is better to have it in the kernel.

This sounds like the patch is not tested?

> +static void cdns_i2c_init(struct cdns_i2c *id)
> +{
> +	cdns_i2c_writereg(id->ctrl_reg, CDNS_I2C_CR_OFFSET);
> +	/*
> +	 * Cadence I2C controller has a bug wherein it generates
> +	 * invalid read transaction after HW timeout in master receiver mode.
> +	 * HW timeout is not used by this driver and the interrupt is disabled.
> +	 * But the feature itself cannot be disabled. Hence maximum value
> +	 * is written to this register to reduce the chances of error.
> +	 */
> +	cdns_i2c_writereg(CDNS_I2C_TIMEOUT_MAX, CDNS_I2C_TIME_OUT_OFFSET);
> +}

This...

> +
> +/**
>   * cdns_i2c_runtime_resume - Runtime resume
>   * @dev:	Address of the platform_device structure
>   *
> @@ -853,6 +874,7 @@ static int __maybe_unused cdns_i2c_runtime_resume(struct device *dev)
>  		dev_err(dev, "Cannot enable clock.\n");
>  		return ret;
>  	}
> +	cdns_i2c_init(xi2c);

and this...

> -
> -	/*
> -	 * Cadence I2C controller has a bug wherein it generates
> -	 * invalid read transaction after HW timeout in master receiver mode.
> -	 * HW timeout is not used by this driver and the interrupt is disabled.
> -	 * But the feature itself cannot be disabled. Hence maximum value
> -	 * is written to this register to reduce the chances of error.
> -	 */
> -	cdns_i2c_writereg(CDNS_I2C_TIMEOUT_MAX, CDNS_I2C_TIME_OUT_OFFSET);
> +	cdns_i2c_init(id);

... and this look like a unrelated change to me?


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-03-03 20:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03  5:50 [PATCHv3 1/2] i2c: cadence: Fix the Documentation Shubhrajyoti Datta
2016-03-03  5:50 ` [PATCHv3 2/2] i2c: cadence: Implement save restore Shubhrajyoti Datta
2016-03-03 20:40   ` Wolfram Sang [this message]
2016-03-04  4:25     ` Shubhrajyoti Datta
2016-03-12 15:02       ` Wolfram Sang
2016-03-12 17:23         ` Shubhrajyoti Datta
2016-03-03 20:33 ` [PATCHv3 1/2] i2c: cadence: Fix the Documentation Wolfram Sang
2016-03-04  4:52   ` Shubhrajyoti Datta

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=20160303204013.GC1711@katana \
    --to=wsa@the-dreams.de \
    --cc=anirudh@xilinx.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=shubhraj@xilinx.com \
    --cc=shubhrajyoti.datta@xilinx.com \
    --cc=soren.brinkmann@xilinx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.