* [PATCH 00/10] I2C updates
@ 2012-02-10 13:59 Shubhrajyoti D
2012-02-10 13:59 ` [PATCH 01/10] I2C : OMAP : make omap_i2c_unidle/idle functions depend on CONFIG_PM_RUNTIME Shubhrajyoti D
` (8 more replies)
0 siblings, 9 replies; 15+ messages in thread
From: Shubhrajyoti D @ 2012-02-10 13:59 UTC (permalink / raw)
To: linux-omap-u79uwXL29TY76Z2rM5mHXA
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
khali-PUYAD+kWke1g9hUCZPvPmw, Shubhrajyoti D, Kevin Hilman,
Ben Dooks
This patch series colates the various i2c updates into
a series. Since it is collection of various patches
the version info is not retained, however most of them undergone
multiple versions.
This is rebased to linus head commit 63082402968f4b73f10b28a8ac1f3da821aeb82d
The patch series does the following
- Warn fixes if CONFIG_PM_RUNTIME is not selected.
- I2C register restore only if context if the context is lost
- Bus busy recovery mechanism.
- the reset is not done in init.
Tested on omap4sdp and omap3sdp.
Cc: Kevin Hilman <khilman-l0cyMroinI0@public.gmane.org>
Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Jon Hunter (1):
I2C: OMAP: Correct I2C revision for OMAP3
Shubhrajyoti D (8):
I2C : OMAP : make omap_i2c_unidle/idle functions depend on
CONFIG_PM_RUNTIME
OMAP : I2C : Remove reset at init
OMAP: I2C: I2C register restore only if context is lost
OMAP: I2C: Fix the interrupt clearing in OMAP4
OMAP: I2C: Fix the mismatch of pm_runtime enable and disable
OMAP: I2C: Optimise the remove code
OMAP: I2C: Fix the error handling
I2C: OMAP: Don't check if wait_for_completion_timeout() returns less
than zero
Vikram Pandita (1):
I2C: OMAP: Recover from Bus Busy condition
drivers/i2c/busses/i2c-omap.c | 173 ++++++++++++++++++++++++-----------------
1 files changed, 101 insertions(+), 72 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 01/10] I2C : OMAP : make omap_i2c_unidle/idle functions depend on CONFIG_PM_RUNTIME
2012-02-10 13:59 [PATCH 00/10] I2C updates Shubhrajyoti D
@ 2012-02-10 13:59 ` Shubhrajyoti D
2012-02-10 13:59 ` [PATCH 02/10] OMAP : I2C : Remove reset at init Shubhrajyoti D
` (7 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Shubhrajyoti D @ 2012-02-10 13:59 UTC (permalink / raw)
To: linux-omap
Cc: linux-i2c, linux-arm-kernel, khali, Shubhrajyoti D, Kevin Hilman,
Ben Dooks
The functions omap_i2c_unidle/idle are called from omap_i2c_runtime_resume
and omap_i2c_runtime_suspend which is compiled for CONFIG_PM_RUNTIME.
This patch removes the omap_i2c_unidle/idle functions and folds them
into the runtime callbacks.
This fixes the below warn when CONFIG_PM_RUNTIME is not defined
CC arch/arm/mach-omap2/board-ti8168evm.o
drivers/i2c/busses/i2c-omap.c:272: warning: 'omap_i2c_unidle' defined but not used
drivers/i2c/busses/i2c-omap.c:293: warning: 'omap_i2c_idle' defined but not used
CC net/ipv4/ip_forward.o
Cc: Kevin Hilman <khilman@ti.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
previous post
http://lists.infradead.org/pipermail/linux-arm-kernel/2012-January/080664.html
drivers/i2c/busses/i2c-omap.c | 75 +++++++++++++++++-----------------------
1 files changed, 32 insertions(+), 43 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 801df60..4f4188d 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -269,47 +269,6 @@ static inline u16 omap_i2c_read_reg(struct omap_i2c_dev *i2c_dev, int reg)
(i2c_dev->regs[reg] << i2c_dev->reg_shift));
}
-static void omap_i2c_unidle(struct omap_i2c_dev *dev)
-{
- if (dev->flags & OMAP_I2C_FLAG_RESET_REGS_POSTIDLE) {
- omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
- omap_i2c_write_reg(dev, OMAP_I2C_PSC_REG, dev->pscstate);
- 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);
- omap_i2c_write_reg(dev, OMAP_I2C_WE_REG, dev->westate);
- omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, OMAP_I2C_CON_EN);
- }
-
- /*
- * Don't write to this register if the IE state is 0 as it can
- * cause deadlock.
- */
- if (dev->iestate)
- omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, dev->iestate);
-}
-
-static void omap_i2c_idle(struct omap_i2c_dev *dev)
-{
- u16 iv;
-
- dev->iestate = omap_i2c_read_reg(dev, OMAP_I2C_IE_REG);
- if (dev->dtrev == OMAP_I2C_IP_VERSION_2)
- omap_i2c_write_reg(dev, OMAP_I2C_IP_V2_IRQENABLE_CLR, 1);
- else
- omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, 0);
-
- if (dev->rev < OMAP_I2C_OMAP1_REV_2) {
- iv = omap_i2c_read_reg(dev, OMAP_I2C_IV_REG); /* Read clears */
- } else {
- omap_i2c_write_reg(dev, OMAP_I2C_STAT_REG, dev->iestate);
-
- /* Flush posted write */
- omap_i2c_read_reg(dev, OMAP_I2C_STAT_REG);
- }
-}
-
static int omap_i2c_init(struct omap_i2c_dev *dev)
{
u16 psc = 0, scll = 0, sclh = 0, buf = 0;
@@ -1163,8 +1122,22 @@ static int omap_i2c_runtime_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct omap_i2c_dev *_dev = platform_get_drvdata(pdev);
+ u16 iv;
+
+ _dev->iestate = omap_i2c_read_reg(_dev, OMAP_I2C_IE_REG);
+ if (_dev->dtrev == OMAP_I2C_IP_VERSION_2)
+ omap_i2c_write_reg(_dev, OMAP_I2C_IP_V2_IRQENABLE_CLR, 1);
+ else
+ omap_i2c_write_reg(_dev, OMAP_I2C_IE_REG, 0);
+
+ if (_dev->rev < OMAP_I2C_OMAP1_REV_2) {
+ iv = omap_i2c_read_reg(_dev, OMAP_I2C_IV_REG); /* Read clears */
+ } else {
+ omap_i2c_write_reg(_dev, OMAP_I2C_STAT_REG, _dev->iestate);
- omap_i2c_idle(_dev);
+ /* Flush posted write */
+ omap_i2c_read_reg(_dev, OMAP_I2C_STAT_REG);
+ }
return 0;
}
@@ -1174,7 +1147,23 @@ static int omap_i2c_runtime_resume(struct device *dev)
struct platform_device *pdev = to_platform_device(dev);
struct omap_i2c_dev *_dev = platform_get_drvdata(pdev);
- omap_i2c_unidle(_dev);
+ if (_dev->flags & OMAP_I2C_FLAG_RESET_REGS_POSTIDLE) {
+ omap_i2c_write_reg(_dev, OMAP_I2C_CON_REG, 0);
+ omap_i2c_write_reg(_dev, OMAP_I2C_PSC_REG, _dev->pscstate);
+ 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);
+ omap_i2c_write_reg(_dev, OMAP_I2C_WE_REG, _dev->westate);
+ omap_i2c_write_reg(_dev, OMAP_I2C_CON_REG, OMAP_I2C_CON_EN);
+ }
+
+ /*
+ * Don't write to this register if the IE state is 0 as it can
+ * cause deadlock.
+ */
+ if (_dev->iestate)
+ omap_i2c_write_reg(_dev, OMAP_I2C_IE_REG, _dev->iestate);
return 0;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 02/10] OMAP : I2C : Remove reset at init
2012-02-10 13:59 [PATCH 00/10] I2C updates Shubhrajyoti D
2012-02-10 13:59 ` [PATCH 01/10] I2C : OMAP : make omap_i2c_unidle/idle functions depend on CONFIG_PM_RUNTIME Shubhrajyoti D
@ 2012-02-10 13:59 ` Shubhrajyoti D
[not found] ` <1328882405-15284-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
` (6 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Shubhrajyoti D @ 2012-02-10 13:59 UTC (permalink / raw)
To: linux-omap
Cc: linux-i2c, linux-arm-kernel, khali, Shubhrajyoti D,
Benoit Cousson, Kevin Hilman, Ben Dooks
The reset in the driver at init is not needed anymore as the
following patch has removed the HWMOD_INIT_NO_RESET flag.
6d3c55f [OMAP: hwmod: fix the i2c-reset timeout during bootup]
This patch does the following
-removes the reset from the probe and implements a omap_i2c_reset
function to reset.
- Reset is removed from omap_i2c_init, which was called
not only during probe, but also after time out and error handling.
omap_i2c_reset is added in those places to effect the reset.
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
drivers/i2c/busses/i2c-omap.c | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 4f4188d..a115d2c 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -269,15 +269,9 @@ static inline u16 omap_i2c_read_reg(struct omap_i2c_dev *i2c_dev, int reg)
(i2c_dev->regs[reg] << i2c_dev->reg_shift));
}
-static int omap_i2c_init(struct omap_i2c_dev *dev)
+static int omap_i2c_reset(struct omap_i2c_dev *dev)
{
- u16 psc = 0, scll = 0, sclh = 0, buf = 0;
- u16 fsscll = 0, fssclh = 0, hsscll = 0, hssclh = 0;
- unsigned long fclk_rate = 12000000;
unsigned long timeout;
- unsigned long internal_clk = 0;
- struct clk *fclk;
-
if (dev->rev >= OMAP_I2C_OMAP1_REV_2) {
/* Disable I2C controller before soft reset */
omap_i2c_write_reg(dev, OMAP_I2C_CON_REG,
@@ -325,6 +319,16 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
dev->westate);
}
}
+}
+
+static int omap_i2c_init(struct omap_i2c_dev *dev)
+{
+ u16 psc = 0, scll = 0, sclh = 0, buf = 0;
+ u16 fsscll = 0, fssclh = 0, hsscll = 0, hssclh = 0;
+ unsigned long fclk_rate = 12000000;
+ unsigned long internal_clk = 0;
+ struct clk *fclk;
+
omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
if (dev->flags & OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK) {
@@ -549,6 +553,7 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap,
if (r == 0) {
dev_err(dev->dev, "controller timed out\n");
omap_i2c_init(dev);
+ omap_i2c_reset(dev);
return -ETIMEDOUT;
}
@@ -559,6 +564,7 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap,
if (dev->cmd_err & (OMAP_I2C_STAT_AL | OMAP_I2C_STAT_ROVR |
OMAP_I2C_STAT_XUDF)) {
omap_i2c_init(dev);
+ omap_i2c_reset(dev);
return -EIO;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 03/10] I2C: OMAP: Recover from Bus Busy condition
[not found] ` <1328882405-15284-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
@ 2012-02-10 13:59 ` Shubhrajyoti D
2012-02-10 13:59 ` [PATCH 04/10] OMAP: I2C: I2C register restore only if context is lost Shubhrajyoti D
` (3 subsequent siblings)
4 siblings, 0 replies; 15+ messages in thread
From: Shubhrajyoti D @ 2012-02-10 13:59 UTC (permalink / raw)
To: linux-omap-u79uwXL29TY76Z2rM5mHXA
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
khali-PUYAD+kWke1g9hUCZPvPmw, Vikram Pandita, Kevin Hilman,
Ben Dooks, Jon Hunter, Shubhrajyoti D
From: Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>
In case a peripheral is driving SDA bus low (ie. a start condition), provide
a constant clock output using the test mode of the OMAP I2C controller to
try and clear the bus. Soft reset I2C controller after attempting the bus clear
to ensure that controller is in a good state.
Based upon Vikram Pandita's patch from TI Android 3.0.
I acknowledge the contributions and suggestions of Jon and Hemant.
A couple differences from the original patch ...
1. Add a new function for bus clear
2. Ensure that the CON.I2C_EN bit is set when using the SYSTEST feature to
output a permanent clock. This bit needs to be set and typically it would
be set by the unidle function but this is not the case for all OMAP
generations.
3. Program the SYSTEST setting only the bits we care about. However, restore
SYSTEST registers to there original state as some OMAP generations do not
implement perform a soft-reset.
4. Clear the CON register after performing the bus clear, so when we call the
init function the controller is disabled and the init function will
re-enable later.
Cc: Kevin Hilman <khilman-l0cyMroinI0@public.gmane.org>
Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Signed-off-by: Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>
Signed-off-by: Jon Hunter <jon-hunter-l0cyMroinI0@public.gmane.org>
Signed-off-by: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>
---
Original patch can be found here:
http://git.omapzoom.org/?p=kernel/omap.git;a=commit;h=a2ab04192ba25e60f95ba1ff3af5601a2d7b5bd1
drivers/i2c/busses/i2c-omap.c | 33 ++++++++++++++++++++++++++++++---
1 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index a115d2c..f19bb7e 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -147,16 +147,15 @@ enum {
#define OMAP_I2C_SCLH_HSSCLH 8
/* I2C System Test Register (OMAP_I2C_SYSTEST): */
-#ifdef DEBUG
#define OMAP_I2C_SYSTEST_ST_EN (1 << 15) /* System test enable */
#define OMAP_I2C_SYSTEST_FREE (1 << 14) /* Free running mode */
#define OMAP_I2C_SYSTEST_TMODE_MASK (3 << 12) /* Test mode select */
-#define OMAP_I2C_SYSTEST_TMODE_SHIFT (12) /* Test mode select */
+#define OMAP_I2C_SYSTEST_TMODE_TEST (2 << 12) /* Test mode select */
+#define OMAP_I2C_SYSTEST_TMODE_LOOP (3 << 12) /* Test mode select */
#define OMAP_I2C_SYSTEST_SCL_I (1 << 3) /* SCL line sense in */
#define OMAP_I2C_SYSTEST_SCL_O (1 << 2) /* SCL line drive out */
#define OMAP_I2C_SYSTEST_SDA_I (1 << 1) /* SDA line sense in */
#define OMAP_I2C_SYSTEST_SDA_O (1 << 0) /* SDA line drive out */
-#endif
/* OCP_SYSSTATUS bit definitions */
#define SYSS_RESETDONE_MASK (1 << 0)
@@ -319,6 +318,7 @@ static int omap_i2c_reset(struct omap_i2c_dev *dev)
dev->westate);
}
}
+ return 0;
}
static int omap_i2c_init(struct omap_i2c_dev *dev)
@@ -471,6 +471,31 @@ static int omap_i2c_wait_for_bb(struct omap_i2c_dev *dev)
}
/*
+ * Bus Clear
+ */
+static int omap_i2c_bus_clear(struct omap_i2c_dev *dev)
+{
+ u16 w;
+
+ /*
+ * Per the I2C specification, if we are stuck in a bus busy state
+ * we can attempt a bus clear to try and recover the bus by sending
+ * at least 9 clock pulses on SCL. Put the I2C in a test mode so it
+ * will output a continuous clock on SCL.
+ */
+ w = omap_i2c_read_reg(dev, OMAP_I2C_SYSTEST_REG);
+ omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, OMAP_I2C_CON_EN);
+ omap_i2c_write_reg(dev, OMAP_I2C_SYSTEST_REG,
+ (OMAP_I2C_SYSTEST_ST_EN | OMAP_I2C_SYSTEST_TMODE_TEST));
+ msleep(1);
+ omap_i2c_write_reg(dev, OMAP_I2C_SYSTEST_REG, w);
+ omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
+ omap_i2c_reset(dev);
+ omap_i2c_init(dev);
+ return omap_i2c_wait_for_bb(dev);
+}
+
+/*
* Low level master read/write transaction.
*/
static int omap_i2c_xfer_msg(struct i2c_adapter *adap,
@@ -597,6 +622,8 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
r = omap_i2c_wait_for_bb(dev);
if (r < 0)
+ r = omap_i2c_bus_clear(dev);
+ if (r < 0)
goto out;
if (dev->set_mpu_wkup_lat != NULL)
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 04/10] OMAP: I2C: I2C register restore only if context is lost
[not found] ` <1328882405-15284-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
2012-02-10 13:59 ` [PATCH 03/10] I2C: OMAP: Recover from Bus Busy condition Shubhrajyoti D
@ 2012-02-10 13:59 ` Shubhrajyoti D
2012-02-10 14:00 ` [PATCH 05/10] OMAP: I2C: Fix the interrupt clearing in OMAP4 Shubhrajyoti D
` (2 subsequent siblings)
4 siblings, 0 replies; 15+ messages in thread
From: Shubhrajyoti D @ 2012-02-10 13:59 UTC (permalink / raw)
To: linux-omap-u79uwXL29TY76Z2rM5mHXA
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
khali-PUYAD+kWke1g9hUCZPvPmw, Shubhrajyoti D, Kevin Hilman,
Ben Dooks
Currently i2c register restore is done always.
Adding conditional restore.
The i2c register restore is done only if the context is lost.
Also remove the definition of SYSS_RESETDONE_MASK and use the
one in omap_hwmod.h.
Cc: Kevin Hilman <khilman-l0cyMroinI0@public.gmane.org>
Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Acked-by: Santosh Shilimkar <santosh.shilimkar-l0cyMroinI0@public.gmane.org>
Signed-off-by: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>
---
Previous discurssion
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-July/058747.html
drivers/i2c/busses/i2c-omap.c | 36 +++++++++++++++++++++++-------------
1 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index f19bb7e..c07e3e4 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -43,6 +43,7 @@
#include <linux/slab.h>
#include <linux/i2c-omap.h>
#include <linux/pm_runtime.h>
+#include <plat/omap_device.h>
/* I2C controller revisions */
#define OMAP_I2C_OMAP1_REV_2 0x20
@@ -157,9 +158,6 @@ enum {
#define OMAP_I2C_SYSTEST_SDA_I (1 << 1) /* SDA line sense in */
#define OMAP_I2C_SYSTEST_SDA_O (1 << 0) /* SDA line drive out */
-/* OCP_SYSSTATUS bit definitions */
-#define SYSS_RESETDONE_MASK (1 << 0)
-
/* OCP_SYSCONFIG bit definitions */
#define SYSC_CLOCKACTIVITY_MASK (0x3 << 8)
#define SYSC_SIDLEMODE_MASK (0x3 << 3)
@@ -206,6 +204,7 @@ struct omap_i2c_dev {
u16 syscstate;
u16 westate;
u16 errata;
+ int dev_lost_count;
};
static const u8 reg_map_ip_v1[] = {
@@ -1151,12 +1150,24 @@ omap_i2c_remove(struct platform_device *pdev)
}
#ifdef CONFIG_PM_RUNTIME
+static void omap_i2c_restore(struct omap_i2c_dev *dev)
+{
+ omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
+ omap_i2c_write_reg(dev, OMAP_I2C_PSC_REG, dev->pscstate);
+ 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_WE_REG, dev->westate);
+ omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, OMAP_I2C_CON_EN);
+}
static int omap_i2c_runtime_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct omap_i2c_dev *_dev = platform_get_drvdata(pdev);
u16 iv;
+ _dev->dev_lost_count = omap_device_get_context_loss_count(pdev);
+
_dev->iestate = omap_i2c_read_reg(_dev, OMAP_I2C_IE_REG);
if (_dev->dtrev == OMAP_I2C_IP_VERSION_2)
omap_i2c_write_reg(_dev, OMAP_I2C_IP_V2_IRQENABLE_CLR, 1);
@@ -1180,16 +1191,15 @@ static int omap_i2c_runtime_resume(struct device *dev)
struct platform_device *pdev = to_platform_device(dev);
struct omap_i2c_dev *_dev = platform_get_drvdata(pdev);
- if (_dev->flags & OMAP_I2C_FLAG_RESET_REGS_POSTIDLE) {
- omap_i2c_write_reg(_dev, OMAP_I2C_CON_REG, 0);
- omap_i2c_write_reg(_dev, OMAP_I2C_PSC_REG, _dev->pscstate);
- 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);
- omap_i2c_write_reg(_dev, OMAP_I2C_WE_REG, _dev->westate);
- omap_i2c_write_reg(_dev, OMAP_I2C_CON_REG, OMAP_I2C_CON_EN);
- }
+ int loss_cnt = omap_device_get_context_loss_count(pdev);
+ if (loss_cnt < 0)
+ return loss_cnt;
+
+ if (_dev->dev_lost_count == loss_cnt && _dev->dev_lost_count)
+ return 0;
+
+ if (_dev->flags & OMAP_I2C_FLAG_RESET_REGS_POSTIDLE)
+ omap_i2c_restore(_dev);
/*
* Don't write to this register if the IE state is 0 as it can
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 05/10] OMAP: I2C: Fix the interrupt clearing in OMAP4
[not found] ` <1328882405-15284-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
2012-02-10 13:59 ` [PATCH 03/10] I2C: OMAP: Recover from Bus Busy condition Shubhrajyoti D
2012-02-10 13:59 ` [PATCH 04/10] OMAP: I2C: I2C register restore only if context is lost Shubhrajyoti D
@ 2012-02-10 14:00 ` Shubhrajyoti D
2012-02-10 14:00 ` [PATCH 08/10] OMAP: I2C: Fix the error handling Shubhrajyoti D
2012-02-24 9:30 ` [PATCH 00/10] I2C updates Shubhrajyoti
4 siblings, 0 replies; 15+ messages in thread
From: Shubhrajyoti D @ 2012-02-10 14:00 UTC (permalink / raw)
To: linux-omap-u79uwXL29TY76Z2rM5mHXA
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
khali-PUYAD+kWke1g9hUCZPvPmw, Shubhrajyoti D, Vikram Pandita,
Kevin Hilman, Ben Dooks
On OMAP4 we were writing 1 to IRQENABLE_CLR which cleared only
the arbitration lost interrupt. The patch intends to fix the same by writing 0
to the IE register clearing all interrupts.
This is based on the work done by Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>.
The changes from the original patch ...
- Does not use the IRQENABLE_CLR register to clear as it is not mentioned
to be legacy register IRQENABLE_CLR helps in atomically
setting/clearing specific interrupts, instead use the OMAP_I2C_IE_REG as we are
clearing all interrupts.
Cc: Vikram Pandita <vikram.pandita-l0cyMroinI0@public.gmane.org>
Cc: Kevin Hilman <khilman-l0cyMroinI0@public.gmane.org>
Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Signed-off-by: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>
---
Original patch can be found here:
http://git.omapzoom.org/?p=kernel/omap.git;a=commit;h=41049d62e146e0fafe2fac0a31be566b3bbc9149
drivers/i2c/busses/i2c-omap.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index c07e3e4..c3ca7d9 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1169,10 +1169,8 @@ static int omap_i2c_runtime_suspend(struct device *dev)
_dev->dev_lost_count = omap_device_get_context_loss_count(pdev);
_dev->iestate = omap_i2c_read_reg(_dev, OMAP_I2C_IE_REG);
- if (_dev->dtrev == OMAP_I2C_IP_VERSION_2)
- omap_i2c_write_reg(_dev, OMAP_I2C_IP_V2_IRQENABLE_CLR, 1);
- else
- omap_i2c_write_reg(_dev, OMAP_I2C_IE_REG, 0);
+
+ omap_i2c_write_reg(_dev, OMAP_I2C_IE_REG, 0);
if (_dev->rev < OMAP_I2C_OMAP1_REV_2) {
iv = omap_i2c_read_reg(_dev, OMAP_I2C_IV_REG); /* Read clears */
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 06/10] OMAP: I2C: Fix the mismatch of pm_runtime enable and disable
2012-02-10 13:59 [PATCH 00/10] I2C updates Shubhrajyoti D
` (2 preceding siblings ...)
[not found] ` <1328882405-15284-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
@ 2012-02-10 14:00 ` Shubhrajyoti D
2012-02-10 14:00 ` [PATCH 07/10] OMAP: I2C: add devexit to the remove code Shubhrajyoti D
` (4 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Shubhrajyoti D @ 2012-02-10 14:00 UTC (permalink / raw)
To: linux-omap
Cc: linux-i2c, linux-arm-kernel, khali, Shubhrajyoti D, Kevin Hilman,
Rajendra Nayak, Ben Dooks
Currently the i2c driver calls the pm_runtime_enable and never
the disable. This may cause a warning when pm_runtime_enable
checks for the count match.Attempting to fix the same by calling
pm_runtime_disable in the error and the remove path.
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
previous discurssion
http://marc.info/?l=linux-arm-kernel&m=132628828411133&w=2
drivers/i2c/busses/i2c-omap.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index c3ca7d9..cb9d4f8 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1122,6 +1122,7 @@ err_unuse_clocks:
omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
pm_runtime_put(dev->dev);
iounmap(dev->base);
+ pm_runtime_disable(&pdev->dev);
err_free_mem:
platform_set_drvdata(pdev, NULL);
kfree(dev);
@@ -1137,6 +1138,7 @@ omap_i2c_remove(struct platform_device *pdev)
struct omap_i2c_dev *dev = platform_get_drvdata(pdev);
struct resource *mem;
+ pm_runtime_disable(&pdev->dev);
platform_set_drvdata(pdev, NULL);
free_irq(dev->irq, dev);
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 07/10] OMAP: I2C: add devexit to the remove code
2012-02-10 13:59 [PATCH 00/10] I2C updates Shubhrajyoti D
` (3 preceding siblings ...)
2012-02-10 14:00 ` [PATCH 06/10] OMAP: I2C: Fix the mismatch of pm_runtime enable and disable Shubhrajyoti D
@ 2012-02-10 14:00 ` Shubhrajyoti D
2012-02-10 14:00 ` [PATCH 09/10] I2C: OMAP: Correct I2C revision for OMAP3 Shubhrajyoti D
` (3 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Shubhrajyoti D @ 2012-02-10 14:00 UTC (permalink / raw)
To: linux-omap
Cc: linux-i2c, linux-arm-kernel, khali, Shubhrajyoti D, Ben Dooks,
Kevin Hilman
The omap_i2c_remove function may not be needed after
device exit so the memory could be freed.
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
Previous discurssion
http://www.mail-archive.com/linux-i2c@vger.kernel.org/msg06976.html
drivers/i2c/busses/i2c-omap.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index cb9d4f8..fd77cd2 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1132,8 +1132,7 @@ err_release_region:
return r;
}
-static int
-omap_i2c_remove(struct platform_device *pdev)
+static int __devexit omap_i2c_remove(struct platform_device *pdev)
{
struct omap_i2c_dev *dev = platform_get_drvdata(pdev);
struct resource *mem;
@@ -1222,7 +1221,7 @@ static struct dev_pm_ops omap_i2c_pm_ops = {
static struct platform_driver omap_i2c_driver = {
.probe = omap_i2c_probe,
- .remove = omap_i2c_remove,
+ .remove = __devexit_p(omap_i2c_remove),
.driver = {
.name = "omap_i2c",
.owner = THIS_MODULE,
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 08/10] OMAP: I2C: Fix the error handling
[not found] ` <1328882405-15284-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
` (2 preceding siblings ...)
2012-02-10 14:00 ` [PATCH 05/10] OMAP: I2C: Fix the interrupt clearing in OMAP4 Shubhrajyoti D
@ 2012-02-10 14:00 ` Shubhrajyoti D
2012-02-24 9:30 ` [PATCH 00/10] I2C updates Shubhrajyoti
4 siblings, 0 replies; 15+ messages in thread
From: Shubhrajyoti D @ 2012-02-10 14:00 UTC (permalink / raw)
To: linux-omap-u79uwXL29TY76Z2rM5mHXA
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
khali-PUYAD+kWke1g9hUCZPvPmw, Shubhrajyoti D, Ben Dooks,
Kevin Hilman
Currently in probe
pm_runtime_put(dev->dev);
...
/* i2c device drivers may be active on return from add_adapter() */
adap->nr = pdev->id;
r = i2c_add_numbered_adapter(adap);
if (r) {
dev_err(dev->dev, "failure adding adapter\n");
goto err_free_irq;
}
...
return 0;
err_free_irq:
free_irq(dev->irq, dev);
err_unuse_clocks:
omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, 0);
pm_runtime_put(dev->dev);
This may access the i2c registers without the clocks.
Attempting to fix the same by moving the pm_rintime_put after the error check.
Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Cc: Kevin Hilman <khilman-l0cyMroinI0@public.gmane.org>
Signed-off-by: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>
---
drivers/i2c/busses/i2c-omap.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index fd77cd2..e556c2d 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1093,8 +1093,6 @@ omap_i2c_probe(struct platform_device *pdev)
dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", pdev->id,
dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed);
- pm_runtime_put(dev->dev);
-
adap = &dev->adapter;
i2c_set_adapdata(adap, dev);
adap->owner = THIS_MODULE;
@@ -1114,6 +1112,8 @@ omap_i2c_probe(struct platform_device *pdev)
of_i2c_register_devices(adap);
+ pm_runtime_put(dev->dev);
+
return 0;
err_free_irq:
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 09/10] I2C: OMAP: Correct I2C revision for OMAP3
2012-02-10 13:59 [PATCH 00/10] I2C updates Shubhrajyoti D
` (4 preceding siblings ...)
2012-02-10 14:00 ` [PATCH 07/10] OMAP: I2C: add devexit to the remove code Shubhrajyoti D
@ 2012-02-10 14:00 ` Shubhrajyoti D
2012-02-10 14:00 ` [PATCH 10/10] I2C: OMAP: Don't check if wait_for_completion_timeout() returns less than zero Shubhrajyoti D
` (2 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Shubhrajyoti D @ 2012-02-10 14:00 UTC (permalink / raw)
To: linux-omap
Cc: linux-i2c, linux-arm-kernel, khali, Jon Hunter, Ben Dooks,
Kevin Hilman, Shubhrajyoti D
From: Jon Hunter <jon-hunter@ti.com>
The OMAP3530 is based upon the same silicon as the OMAP3430 and so the I2C
revision is the same for 3430 and 3530. However, the OMAP3630 device has the
same I2C revision as OMAP4. Correct the revision definition to reflect this.
This patch is based on work done by Jon Hunter <jon-hunter@ti.com>
Changes from his patch
- Update OMAP_I2C_REV_ON_3430 also to reflect that it is same as 3530
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
drivers/i2c/busses/i2c-omap.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index e556c2d..4c5d98f 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -50,8 +50,8 @@
/* I2C controller revisions present on specific hardware */
#define OMAP_I2C_REV_ON_2430 0x36
-#define OMAP_I2C_REV_ON_3430 0x3C
-#define OMAP_I2C_REV_ON_3530_4430 0x40
+#define OMAP_I2C_REV_ON_3430_3530 0x3C
+#define OMAP_I2C_REV_ON_3630_4430 0x40
/* timeout waiting for the controller to respond */
#define OMAP_I2C_TIMEOUT (msecs_to_jiffies(1000))
@@ -297,7 +297,7 @@ static int omap_i2c_reset(struct omap_i2c_dev *dev)
omap_i2c_write_reg(dev, OMAP_I2C_SYSC_REG,
SYSC_AUTOIDLE_MASK);
- } else if (dev->rev >= OMAP_I2C_REV_ON_3430) {
+ } else if (dev->rev >= OMAP_I2C_REV_ON_3430_3530) {
dev->syscstate = SYSC_AUTOIDLE_MASK;
dev->syscstate |= SYSC_ENAWAKEUP_MASK;
dev->syscstate |= (SYSC_IDLEMODE_SMART <<
@@ -1049,7 +1049,7 @@ omap_i2c_probe(struct platform_device *pdev)
dev->rev = omap_i2c_read_reg(dev, OMAP_I2C_REV_REG) & 0xff;
- if (dev->rev <= OMAP_I2C_REV_ON_3430)
+ if (dev->rev <= OMAP_I2C_REV_ON_3430_3530)
dev->errata |= I2C_OMAP3_1P153;
if (!(dev->flags & OMAP_I2C_FLAG_NO_FIFO)) {
@@ -1067,7 +1067,7 @@ omap_i2c_probe(struct platform_device *pdev)
dev->fifo_size = (dev->fifo_size / 2);
- if (dev->rev >= OMAP_I2C_REV_ON_3530_4430)
+ if (dev->rev >= OMAP_I2C_REV_ON_3630_4430)
dev->b_hw = 0; /* Disable hardware fixes */
else
dev->b_hw = 1; /* Enable hardware fixes */
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 10/10] I2C: OMAP: Don't check if wait_for_completion_timeout() returns less than zero
2012-02-10 13:59 [PATCH 00/10] I2C updates Shubhrajyoti D
` (5 preceding siblings ...)
2012-02-10 14:00 ` [PATCH 09/10] I2C: OMAP: Correct I2C revision for OMAP3 Shubhrajyoti D
@ 2012-02-10 14:00 ` Shubhrajyoti D
2012-02-14 6:12 ` [PATCH 00/10] I2C updates Hebbar, Gururaja
2012-02-24 9:31 ` Shubhrajyoti
8 siblings, 0 replies; 15+ messages in thread
From: Shubhrajyoti D @ 2012-02-10 14:00 UTC (permalink / raw)
To: linux-omap
Cc: linux-i2c, linux-arm-kernel, khali, Shubhrajyoti D, Ben Dooks,
Kevin Hilman
By definition, wait_for_completion_timeout() returns an unsigned value and
therefore, it is not necessary to check if the return value is less than zero
as this is not possible.
This is based on a patch from Jon Hunter <jon-hunter@ti.com>
Changes from his patch
- Declare a long as the wait_for_completion_timeout returns long.
Cc : Jon Hunter <jon-hunter@ti.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
Original patch is
http://git.omapzoom.org/?p=kernel/omap.git;a=commitdiff;h=ea02cece7b0000bc736e60c4188a11aaa74bc6e6
drivers/i2c/busses/i2c-omap.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 4c5d98f..435d6a7 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -501,7 +501,7 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap,
struct i2c_msg *msg, int stop)
{
struct omap_i2c_dev *dev = i2c_get_adapdata(adap);
- int r;
+ unsigned long timeout;
u16 w;
dev_dbg(dev->dev, "addr: 0x%04x, len: %d, flags: 0x%x, stop: %d\n",
@@ -569,12 +569,10 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap,
* REVISIT: We should abort the transfer on signals, but the bus goes
* into arbitration and we're currently unable to recover from it.
*/
- r = wait_for_completion_timeout(&dev->cmd_complete,
- OMAP_I2C_TIMEOUT);
+ timeout = wait_for_completion_timeout(&dev->cmd_complete,
+ OMAP_I2C_TIMEOUT);
dev->buf_len = 0;
- if (r < 0)
- return r;
- if (r == 0) {
+ if (timeout == 0) {
dev_err(dev->dev, "controller timed out\n");
omap_i2c_init(dev);
omap_i2c_reset(dev);
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* RE: [PATCH 00/10] I2C updates
2012-02-10 13:59 [PATCH 00/10] I2C updates Shubhrajyoti D
` (6 preceding siblings ...)
2012-02-10 14:00 ` [PATCH 10/10] I2C: OMAP: Don't check if wait_for_completion_timeout() returns less than zero Shubhrajyoti D
@ 2012-02-14 6:12 ` Hebbar, Gururaja
2012-02-14 9:11 ` Shubhrajyoti
2012-02-24 9:31 ` Shubhrajyoti
8 siblings, 1 reply; 15+ messages in thread
From: Hebbar, Gururaja @ 2012-02-14 6:12 UTC (permalink / raw)
To: Datta, Shubhrajyoti, linux-omap@vger.kernel.org
Cc: Hilman, Kevin, linux-i2c@vger.kernel.org, Ben Dooks,
khali@linux-fr.org, linux-arm-kernel@lists.infradead.org
Hi,
I am interested in testing these patches on AM335x. Do you have a tree with these
patches applied so that I can pull.
On Fri, Feb 10, 2012 at 19:29:55, Datta, Shubhrajyoti wrote:
> This patch series colates the various i2c updates into
> a series. Since it is collection of various patches
> the version info is not retained, however most of them undergone
> multiple versions.
>
> This is rebased to linus head commit 63082402968f4b73f10b28a8ac1f3da821aeb82d
>
> The patch series does the following
>
> - Warn fixes if CONFIG_PM_RUNTIME is not selected.
> - I2C register restore only if context if the context is lost
> - Bus busy recovery mechanism.
> - the reset is not done in init.
>
> Tested on omap4sdp and omap3sdp.
>
>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Ben Dooks <ben-linux@fluff.org>
>
> Jon Hunter (1):
> I2C: OMAP: Correct I2C revision for OMAP3
>
> Shubhrajyoti D (8):
> I2C : OMAP : make omap_i2c_unidle/idle functions depend on
> CONFIG_PM_RUNTIME
> OMAP : I2C : Remove reset at init
> OMAP: I2C: I2C register restore only if context is lost
> OMAP: I2C: Fix the interrupt clearing in OMAP4
> OMAP: I2C: Fix the mismatch of pm_runtime enable and disable
> OMAP: I2C: Optimise the remove code
> OMAP: I2C: Fix the error handling
> I2C: OMAP: Don't check if wait_for_completion_timeout() returns less
> than zero
>
> Vikram Pandita (1):
> I2C: OMAP: Recover from Bus Busy condition
>
> drivers/i2c/busses/i2c-omap.c | 173 ++++++++++++++++++++++++-----------------
> 1 files changed, 101 insertions(+), 72 deletions(-)
Regards,
Gururaja
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 00/10] I2C updates
2012-02-14 6:12 ` [PATCH 00/10] I2C updates Hebbar, Gururaja
@ 2012-02-14 9:11 ` Shubhrajyoti
0 siblings, 0 replies; 15+ messages in thread
From: Shubhrajyoti @ 2012-02-14 9:11 UTC (permalink / raw)
To: Hebbar, Gururaja
Cc: linux-omap@vger.kernel.org, Hilman, Kevin,
linux-i2c@vger.kernel.org, Ben Dooks, khali@linux-fr.org,
linux-arm-kernel@lists.infradead.org
On Tuesday 14 February 2012 11:42 AM, Hebbar, Gururaja wrote:
> Hi,
>
> I am interested in testing these patches on AM335x.
Thanks for your interest in testin.
> Do you have a tree with these
> patches applied so that I can pull.
tree : git://gitorious.org/linus-tree/linus-tree.git
branch : i2c_misc_fixes
let me know if that works for you
> On Fri, Feb 10, 2012 at 19:29:55, Datta, Shubhrajyoti wrote:
>> This patch series colates the various i2c updates into
>> a series. Since it is collection of various patches
>> the version info is not retained, however most of them undergone
>> multiple versions.
>>
>> This is rebased to linus head commit 63082402968f4b73f10b28a8ac1f3da821aeb82d
>>
>> The patch series does the following
>>
>> - Warn fixes if CONFIG_PM_RUNTIME is not selected.
>> - I2C register restore only if context if the context is lost
>> - Bus busy recovery mechanism.
>> - the reset is not done in init.
>>
>> Tested on omap4sdp and omap3sdp.
>>
>>
>> Cc: Kevin Hilman <khilman@ti.com>
>> Cc: Ben Dooks <ben-linux@fluff.org>
>>
>> Jon Hunter (1):
>> I2C: OMAP: Correct I2C revision for OMAP3
>>
>> Shubhrajyoti D (8):
>> I2C : OMAP : make omap_i2c_unidle/idle functions depend on
>> CONFIG_PM_RUNTIME
>> OMAP : I2C : Remove reset at init
>> OMAP: I2C: I2C register restore only if context is lost
>> OMAP: I2C: Fix the interrupt clearing in OMAP4
>> OMAP: I2C: Fix the mismatch of pm_runtime enable and disable
>> OMAP: I2C: Optimise the remove code
>> OMAP: I2C: Fix the error handling
>> I2C: OMAP: Don't check if wait_for_completion_timeout() returns less
>> than zero
>>
>> Vikram Pandita (1):
>> I2C: OMAP: Recover from Bus Busy condition
>>
>> drivers/i2c/busses/i2c-omap.c | 173 ++++++++++++++++++++++++-----------------
>> 1 files changed, 101 insertions(+), 72 deletions(-)
>
>
> Regards,
> Gururaja
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 00/10] I2C updates
[not found] ` <1328882405-15284-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
` (3 preceding siblings ...)
2012-02-10 14:00 ` [PATCH 08/10] OMAP: I2C: Fix the error handling Shubhrajyoti D
@ 2012-02-24 9:30 ` Shubhrajyoti
4 siblings, 0 replies; 15+ messages in thread
From: Shubhrajyoti @ 2012-02-24 9:30 UTC (permalink / raw)
To: Shubhrajyoti D
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
khali-PUYAD+kWke1g9hUCZPvPmw, Kevin Hilman, Ben Dooks
On Friday 10 February 2012 07:29 PM, Shubhrajyoti D wrote:
> This patch series colates the various i2c updates into
> a series. Since it is collection of various patches
> the version info is not retained, however most of them undergone
> multiple versions.
If there are no further comments can this be queued.
> This is rebased to linus head commit 63082402968f4b73f10b28a8ac1f3da821aeb82d
>
> The patch series does the following
>
> - Warn fixes if CONFIG_PM_RUNTIME is not selected.
> - I2C register restore only if context if the context is lost
> - Bus busy recovery mechanism.
> - the reset is not done in init.
>
> Tested on omap4sdp and omap3sdp.
>
>
> Cc: Kevin Hilman <khilman-l0cyMroinI0@public.gmane.org>
> Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
>
> Jon Hunter (1):
> I2C: OMAP: Correct I2C revision for OMAP3
>
> Shubhrajyoti D (8):
> I2C : OMAP : make omap_i2c_unidle/idle functions depend on
> CONFIG_PM_RUNTIME
> OMAP : I2C : Remove reset at init
> OMAP: I2C: I2C register restore only if context is lost
> OMAP: I2C: Fix the interrupt clearing in OMAP4
> OMAP: I2C: Fix the mismatch of pm_runtime enable and disable
> OMAP: I2C: Optimise the remove code
> OMAP: I2C: Fix the error handling
> I2C: OMAP: Don't check if wait_for_completion_timeout() returns less
> than zero
>
> Vikram Pandita (1):
> I2C: OMAP: Recover from Bus Busy condition
>
> drivers/i2c/busses/i2c-omap.c | 173 ++++++++++++++++++++++++-----------------
> 1 files changed, 101 insertions(+), 72 deletions(-)
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 00/10] I2C updates
2012-02-10 13:59 [PATCH 00/10] I2C updates Shubhrajyoti D
` (7 preceding siblings ...)
2012-02-14 6:12 ` [PATCH 00/10] I2C updates Hebbar, Gururaja
@ 2012-02-24 9:31 ` Shubhrajyoti
8 siblings, 0 replies; 15+ messages in thread
From: Shubhrajyoti @ 2012-02-24 9:31 UTC (permalink / raw)
To: Shubhrajyoti D
Cc: linux-omap, linux-i2c, linux-arm-kernel, khali, Kevin Hilman,
Ben Dooks
On Friday 10 February 2012 07:29 PM, Shubhrajyoti D wrote:
> This patch series colates the various i2c updates into
> a series. Since it is collection of various patches
> the version info is not retained, however most of them undergone
> multiple versions.
If there are no further comments can this be queued.
> This is rebased to linus head commit 63082402968f4b73f10b28a8ac1f3da821aeb82d
>
> The patch series does the following
>
> - Warn fixes if CONFIG_PM_RUNTIME is not selected.
> - I2C register restore only if context if the context is lost
> - Bus busy recovery mechanism.
> - the reset is not done in init.
>
> Tested on omap4sdp and omap3sdp.
>
>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Ben Dooks <ben-linux@fluff.org>
>
> Jon Hunter (1):
> I2C: OMAP: Correct I2C revision for OMAP3
>
> Shubhrajyoti D (8):
> I2C : OMAP : make omap_i2c_unidle/idle functions depend on
> CONFIG_PM_RUNTIME
> OMAP : I2C : Remove reset at init
> OMAP: I2C: I2C register restore only if context is lost
> OMAP: I2C: Fix the interrupt clearing in OMAP4
> OMAP: I2C: Fix the mismatch of pm_runtime enable and disable
> OMAP: I2C: Optimise the remove code
> OMAP: I2C: Fix the error handling
> I2C: OMAP: Don't check if wait_for_completion_timeout() returns less
> than zero
>
> Vikram Pandita (1):
> I2C: OMAP: Recover from Bus Busy condition
>
> drivers/i2c/busses/i2c-omap.c | 173 ++++++++++++++++++++++++-----------------
> 1 files changed, 101 insertions(+), 72 deletions(-)
>
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2012-02-24 9:31 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-10 13:59 [PATCH 00/10] I2C updates Shubhrajyoti D
2012-02-10 13:59 ` [PATCH 01/10] I2C : OMAP : make omap_i2c_unidle/idle functions depend on CONFIG_PM_RUNTIME Shubhrajyoti D
2012-02-10 13:59 ` [PATCH 02/10] OMAP : I2C : Remove reset at init Shubhrajyoti D
[not found] ` <1328882405-15284-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
2012-02-10 13:59 ` [PATCH 03/10] I2C: OMAP: Recover from Bus Busy condition Shubhrajyoti D
2012-02-10 13:59 ` [PATCH 04/10] OMAP: I2C: I2C register restore only if context is lost Shubhrajyoti D
2012-02-10 14:00 ` [PATCH 05/10] OMAP: I2C: Fix the interrupt clearing in OMAP4 Shubhrajyoti D
2012-02-10 14:00 ` [PATCH 08/10] OMAP: I2C: Fix the error handling Shubhrajyoti D
2012-02-24 9:30 ` [PATCH 00/10] I2C updates Shubhrajyoti
2012-02-10 14:00 ` [PATCH 06/10] OMAP: I2C: Fix the mismatch of pm_runtime enable and disable Shubhrajyoti D
2012-02-10 14:00 ` [PATCH 07/10] OMAP: I2C: add devexit to the remove code Shubhrajyoti D
2012-02-10 14:00 ` [PATCH 09/10] I2C: OMAP: Correct I2C revision for OMAP3 Shubhrajyoti D
2012-02-10 14:00 ` [PATCH 10/10] I2C: OMAP: Don't check if wait_for_completion_timeout() returns less than zero Shubhrajyoti D
2012-02-14 6:12 ` [PATCH 00/10] I2C updates Hebbar, Gururaja
2012-02-14 9:11 ` Shubhrajyoti
2012-02-24 9:31 ` Shubhrajyoti
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).