This patch configures the I2C bus timing registers according
to information passed via DT. Currently, 100kHz and 400kHz
modes are supported.
The TIMING2 register value is wrong in the documentation for
i.MX28! This was found and fixed by:
Shawn Guo shawn@linaro.org
Signed-off-by: Marek
This patch implements DMA support into mxs-i2c. DMA transfers are now enabled
via DT. The DMA operation is enabled by default.
Signed-off-by: Marek Vasut ma...@denx.de
Cc: Detlev Zundel d...@denx.de
CC: Dong Aisheng b29...@freescale.com
CC: Fabio Estevam fabio.este...@freescale.com
Cc: Linux ARM
ensure pm_runtime_put() is called, on pm_runtime_get_sync()
failure.
Without this, after a failed call, the runtime PM usecount will have
been incremented, but not decremented causing the usecount to never
reach zero after a failure. Thanks to Kevin for educating about it.
Hi Marek,
On Fri, Jun 29, 2012 at 04:24:02PM +0800, Marek Vasut wrote:
This patch configures the I2C bus timing registers according
to information passed via DT. Currently, 100kHz and 400kHz
modes are supported.
The TIMING2 register value is wrong in the documentation for
i.MX28! This was
On Fri, Jun 29, 2012 at 04:24:03PM +0800, Marek Vasut wrote:
This patch implements DMA support into mxs-i2c. DMA transfers are now enabled
via DT. The DMA operation is enabled by default.
Signed-off-by: Marek Vasut ma...@denx.de
Cc: Detlev Zundel d...@denx.de
CC: Dong Aisheng
Dear Dong Aisheng,
On Fri, Jun 29, 2012 at 04:24:03PM +0800, Marek Vasut wrote:
This patch implements DMA support into mxs-i2c. DMA transfers are now
enabled via DT. The DMA operation is enabled by default.
Signed-off-by: Marek Vasut ma...@denx.de
Cc: Detlev Zundel d...@denx.de
CC:
Hi Mark,
On Thu, Jun 28, 2012 at 6:38 PM, Mark Brown
broo...@opensource.wolfsonmicro.com wrote:
There's no point in using _sync() as we don't really care if the suspend
has completed immediately.
Agree.
Reviewed-by: Shubhrajyoti D shubhrajy...@ti.com
Signed-off-by: Mark Brown
Dear Dong Aisheng,
Hi Marek,
On Fri, Jun 29, 2012 at 04:24:02PM +0800, Marek Vasut wrote:
This patch configures the I2C bus timing registers according
to information passed via DT. Currently, 100kHz and 400kHz
modes are supported.
The TIMING2 register value is wrong in the
On Fri, Jun 29, 2012 at 05:30:16PM +0800, Marek Vasut wrote:
Dear Dong Aisheng,
On Fri, Jun 29, 2012 at 04:24:03PM +0800, Marek Vasut wrote:
This patch implements DMA support into mxs-i2c. DMA transfers are now
enabled via DT. The DMA operation is enabled by default.
On Fri, Jun 29, 2012 at 05:33:09PM +0800, Marek Vasut wrote:
MX28 datasheet 27.5.2 - 27.5.4 ... there was a discussion about these in the
thread under older patches. Those shall explain your questions below.
Thanks for the info.
Regards
Dong Aisheng
--
To unsubscribe from this list: send
Dear Dong Aisheng,
On Fri, Jun 29, 2012 at 05:30:16PM +0800, Marek Vasut wrote:
Dear Dong Aisheng,
On Fri, Jun 29, 2012 at 04:24:03PM +0800, Marek Vasut wrote:
This patch implements DMA support into mxs-i2c. DMA transfers are now
enabled via DT. The DMA operation is enabled by
Dear Dong Aisheng,
On Fri, Jun 29, 2012 at 05:33:09PM +0800, Marek Vasut wrote:
MX28 datasheet 27.5.2 - 27.5.4 ... there was a discussion about these in
the thread under older patches. Those shall explain your questions
below.
Thanks for the info.
You're welcome. Hope it helps ;-)
From: Felipe Balbi ba...@ti.com
trivial patch, no functional changes
If the fifo is disabled or fifo_size is 0 the num_bytes
is set to 1. Else it is set to fifo_size or in case of a
draining interrupt the remaining bytes in the buff stat.
So the zero check is redundant and can be safely
From: Felipe Balbi ba...@ti.com
According to flow diagrams on OMAP TRMs,
we should ACK the IRQ as they happen.
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
---
drivers/i2c/busses/i2c-omap.c | 28
1 files changed, 16
From: Felipe Balbi ba...@ti.com
we can ack stat and complete the command from
the errata handling itself.
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
---
drivers/i2c/busses/i2c-omap.c | 16 +---
1 files changed, 13 insertions(+), 3
From: Felipe Balbi ba...@ti.com
instead of having multiple return points, use
a goto statement to make that clearer.
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
---
drivers/i2c/busses/i2c-omap.c | 20
1 files changed, 8
From: Felipe Balbi ba...@ti.com
stat BIT(1) is the same as BIT(1), so let's
simplify things a bit by removing stat from
all omap_i2c_ack_stat() calls.
Code snippet (extremely simplified):
if (stat NACK) {
...
omap_i2c_ack_stat(dev, stat NACK);
}
if (stat RDR) {
...
From: Felipe Balbi ba...@ti.com
The patch intends to decrease the indentation level on the
data handling
by using the fact that else of if (dev-buf_len) is same as
if (!dev-buf_len)
if (dev-buf_len) {
aaa;
} else {
bbb;
break;
}
to
if (!dev-buf_len) {
bbb;
From: Felipe Balbi ba...@ti.com
that way we can ignore TX IRQs while in receiver
mode and ignore RX IRQs while in transmitter mode.
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
---
drivers/i2c/busses/i2c-omap.c |9 +
1 files changed, 9
From: Felipe Balbi ba...@ti.com
that's a nice helper from drivers core which
will give us the exact IRQ number, instead
of a pointer to an IRQ resource.
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
---
drivers/i2c/busses/i2c-omap.c | 12
From: Felipe Balbi ba...@ti.com
otherwise we could get our IRQ line disabled due
to many spurious IRQs.
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
---
drivers/i2c/busses/i2c-omap.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff
From: Felipe Balbi ba...@ti.com
this will make sure that we execute at least once.
No functional changes otherwise.
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
---
drivers/i2c/busses/i2c-omap.c | 20 ++--
1 files changed, 14
From: Felipe Balbi ba...@ti.com
trivial patch to aid readability. No functional
changes.
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
---
drivers/i2c/busses/i2c-omap.c |5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git
From: Felipe Balbi ba...@ti.com
that helps deleting some boiler plate code
and lets driver-core manage our resources
for us.
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
---
drivers/i2c/busses/i2c-omap.c | 40
From: Felipe Balbi ba...@ti.com
re-factor the common parts to a separate function,
so that code is easier to read and understand.
No functional changes.
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
---
drivers/i2c/busses/i2c-omap.c | 204
From: Felipe Balbi ba...@ti.com
Make it not depend on ISR's local variables
in order to make it easier to re-factor the
transmit data loop.
Also since we are waiting for XUDF just before
writing data lets not flag the underflow.
This is anyways going to go once we write
the data.
Signed-off-by:
From: Felipe Balbi ba...@ti.com
omap_i2c_dev is allocated with kzalloc(),
so we need not initialize b_hw to zero.
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
---
drivers/i2c/busses/i2c-omap.c |4 +---
1 files changed, 1 insertions(+), 3
From: Felipe Balbi ba...@ti.com
This patch will try to avoid the usage of
draining feature by reconfiguring the FIFO
the start condition of each message based
on the message's size.
By doing that, we will be better utilizing
the FIFO when doing big transfers.
While at that also drop the now
I have dropped a few patches from the series and also
tested every single patch on my pandaboard.
There's still lots of work to be done on the i2c-omap.c
driver but it's now easier to read, IMO.
Changes since v1:
- removed tabification on patch 6/17
- removed dev_err() which was
From: Felipe Balbi ba...@ti.com
While they do pretty much the same thing, there
are a few peculiarities. Specially WRT erratas,
it's best to split those out and re-factor the
read/write loop to another function which both
cases call.
This last part will be done on another patch.
While at that,
Some drivers (in particular for TV cards) need exclusive access to
their I2C buses for specific operations. Export an unlocked flavor
of i2c_transfer to give them full control.
The unlocked flavor has the following limitations:
* Obviously, caller must hold the i2c adapter lock.
* No debug
Currently the I2C core reports only a negative number on errors.
However some of the users in case of errors want to re-transfer only
the remaining bytes.
The patch series tries to add a actual field to the msg which
can be checked by the user.
Also a patch to implement the actual bytes
In i2c_smbus_xfer_emulated initialise the actual bytes
to zero.
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
---
drivers/i2c/i2c-core.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index a6ad32b..fa7f799 100644
In case of a NACK, it's wise to tell our clients
drivers about how many bytes were actually transferred.
Support this by adding an extra field to the struct
i2c_msg which gets incremented the amount of bytes
actually transferred.
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
Signed-off-by:
From: Felipe Balbi ba...@ti.com
this is important in cases where client driver
wants to know how many bytes were actually
transferred.
Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
---
drivers/i2c/busses/i2c-omap.c |5 +
1 files changed, 5
On Fri, Jun 29, 2012 at 11:33:09AM +0200, Marek Vasut wrote:
I did not check spec,
is it possible the supplied clock changed?
It's possible indeed ... Shawn?
It's technically possible, but probably not practically. The imx28 RM
does not mention i2c clock at all, and I was told by
Shubhrajyoti D shubhrajy...@ti.com writes:
ensure pm_runtime_put() is called, on pm_runtime_get_sync()
failure.
Without this, after a failed call, the runtime PM usecount will have
been incremented, but not decremented causing the usecount to never
reach zero after a
On Fri, Jun 29, 2012 at 06:02:46PM +0800, Marek Vasut wrote:
Dear Dong Aisheng,
On Fri, Jun 29, 2012 at 05:30:16PM +0800, Marek Vasut wrote:
Dear Dong Aisheng,
On Fri, Jun 29, 2012 at 04:24:03PM +0800, Marek Vasut wrote:
This patch implements DMA support into mxs-i2c. DMA
On Fri, 29 Jun 2012 16:35:25 +0530, Shubhrajyoti D wrote:
In case of a NACK, it's wise to tell our clients
drivers about how many bytes were actually transferred.
Support this by adding an extra field to the struct
i2c_msg which gets incremented the amount of bytes
actually transferred.
On Fri, 29 Jun 2012 16:35:27 +0530, Shubhrajyoti D wrote:
In i2c_smbus_xfer_emulated initialise the actual bytes
to zero.
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
---
drivers/i2c/i2c-core.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git
On Friday 29 June 2012 05:32 PM, Kevin Hilman wrote:
Shubhrajyoti D shubhrajy...@ti.com writes:
ensure pm_runtime_put() is called, on pm_runtime_get_sync()
failure.
Without this, after a failed call, the runtime PM usecount will have
been incremented, but not decremented
On Fri, 29 Jun 2012 14:40:02 +0200, Jean Delvare wrote:
On Fri, 29 Jun 2012 16:35:27 +0530, Shubhrajyoti D wrote:
In i2c_smbus_xfer_emulated initialise the actual bytes
to zero.
Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
---
drivers/i2c/i2c-core.c |4 ++--
1 files
On Friday 29 June 2012 06:27 PM, Jean Delvare wrote:
drivers/gpu/drm/nouveau/nouveau_bios.c:3535:3: warning: (near initialization
for ‘msg[1].actual’) [enabled by default]
This needs to be all fixed (converted to C99-style struct
initialization) before your patch is considered for inclusion.
On Fri, 29 Jun 2012 18:42:08 +0530, Shubhrajyoti wrote:
On Friday 29 June 2012 06:27 PM, Jean Delvare wrote:
drivers/gpu/drm/nouveau/nouveau_bios.c:3535:3: warning: (near
initialization for ‘msg[1].actual’) [enabled by default]
This needs to be all fixed (converted to C99-style struct
Shubhrajyoti shubhrajy...@ti.com writes:
On Friday 29 June 2012 05:32 PM, Kevin Hilman wrote:
Shubhrajyoti D shubhrajy...@ti.com writes:
ensure pm_runtime_put() is called, on pm_runtime_get_sync()
failure.
Without this, after a failed call, the runtime PM usecount will have
45 matches
Mail list logo