From: Aaro Koskinen <aaro.koskinen@nokia.com>
To: "ext Pakaravoor, Jagadeesh" <j-pakaravoor@ti.com>
Cc: "linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
Jean Delvare <khali@linux-fr.org>,
ben-linux@fluff.org
Subject: Re: [PATCH] I2C: OMAP: Include OMAP_I2C_SYSC_REG in save and restore
Date: Mon, 02 Feb 2009 15:08:07 +0200 [thread overview]
Message-ID: <4986F037.3090604@nokia.com> (raw)
In-Reply-To: <EAF47CD23C76F840A9E7FCE10091EFAB02A39CF0A6@dbde02.ent.ti.com>
Hello,
ext Pakaravoor, Jagadeesh wrote:
> From: Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@ti.com>
>
> Save and restore should include OMAP_I2C_SYSC_REG.
>
> Signed-off-by: Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@ti.com>
> CC: Jouni Hogander <jouni.hogander@nokia.com>
> ---
> Index: linux-omap-2.6/drivers/i2c/busses/i2c-omap.c
> ===================================================================
> --- linux-omap-2.6.orig/drivers/i2c/busses/i2c-omap.c 2009-01-22 12:11:12.000000000 +0530
> +++ linux-omap-2.6/drivers/i2c/busses/i2c-omap.c 2009-01-22 12:44:12.202367296 +0530
> @@ -182,6 +182,7 @@ struct omap_i2c_dev {
> u16 scllstate;
> u16 sclhstate;
> u16 bufstate;
> + u16 syscstate;
> };
>
> static inline void omap_i2c_write_reg(struct omap_i2c_dev *i2c_dev,
> @@ -240,6 +241,7 @@ static void omap_i2c_unidle(struct omap_
> omap_i2c_write_reg(dev, OMAP_I2C_SCLL_REG, dev->scllstate);
> omap_i2c_write_reg(dev, OMAP_I2C_SCLH_REG, dev->sclhstate);
> omap_i2c_write_reg(dev, OMAP_I2C_BUF_REG, dev->bufstate);
> + omap_i2c_write_reg(dev, OMAP_I2C_SYSC_REG, dev->syscstate);
> }
> dev->idle = 0;
> omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, dev->iestate);
> @@ -300,14 +302,15 @@ static int omap_i2c_init(struct omap_i2c
> } else if (dev->rev >= OMAP_I2C_REV_ON_3430) {
> u32 v;
This local variable is left unused, so you will get a compiler warning.
> - v = SYSC_AUTOIDLE_MASK;
> - v |= SYSC_ENAWAKEUP_MASK;
> - v |= (SYSC_IDLEMODE_SMART <<
> + dev->syscstate = SYSC_AUTOIDLE_MASK;
> + dev->syscstate |= SYSC_ENAWAKEUP_MASK;
> + dev->syscstate |= (SYSC_IDLEMODE_SMART <<
> __ffs(SYSC_SIDLEMODE_MASK));
> - v |= (SYSC_CLOCKACTIVITY_FCLK <<
> + dev->syscstate |= (SYSC_CLOCKACTIVITY_FCLK <<
> __ffs(SYSC_CLOCKACTIVITY_MASK));
>
> - omap_i2c_write_reg(dev, OMAP_I2C_SYSC_REG, v);
> + omap_i2c_write_reg(dev, OMAP_I2C_SYSC_REG,
> + dev->syscstate);
> /*
> * Enabling all wakup sources to stop I2C freezing on
> * WFI instruction.
>
> --
> With Regards,
> Jagadeesh Bhaskar P
A.
next prev parent reply other threads:[~2009-02-02 13:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-23 6:54 [PATCH] I2C: OMAP: Include OMAP_I2C_SYSC_REG in save and restore Pakaravoor, Jagadeesh
[not found] ` <EAF47CD23C76F840A9E7FCE10091EFAB02A39CF069-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2009-01-23 7:21 ` Pakaravoor, Jagadeesh
2009-01-23 7:52 ` Jean Delvare
2009-02-02 13:08 ` Aaro Koskinen [this message]
[not found] ` <4986F037.3090604-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2009-02-02 15:22 ` Pakaravoor, Jagadeesh
2009-02-02 14:05 ` Ben Dooks
[not found] ` <20090202140525.GM8032-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2009-02-02 15:25 ` Pakaravoor, Jagadeesh
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=4986F037.3090604@nokia.com \
--to=aaro.koskinen@nokia.com \
--cc=ben-linux@fluff.org \
--cc=j-pakaravoor@ti.com \
--cc=khali@linux-fr.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-omap@vger.kernel.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 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.