the common defines to i2c-omap.h to avoid duplication.
Signed-off-by: Shubhrajyoti D
---
arch/arm/mach-omap2/i2c.c | 16 +++-
arch/arm/mach-omap2/omap_hwmod_2420_data.c |1 -
arch/arm/mach-omap2/omap_hwmod_2430_data.c |1 -
arch/arm/mach-omap2
The OMAP_I2C_FLAG_RESET_REGS_POSTIDLE is not used anymore
in the i2c driver. Remove the flag.
Signed-off-by: Shubhrajyoti D
---
Has dependency on the below patch
http://git.pengutronix.de/?p=wsa/linux.git;a=commitdiff;h=554c96744afd169886bd6fc2736fb0d9aaf634e8
arch/arm/mach-omap2
The OMAP_I2C_FLAG_RESET_REGS_POSTIDLE is not used anymore
in the i2c driver. Remove the flag.
Signed-off-by: Shubhrajyoti D
---
Has dependency on the below patch
http://git.pengutronix.de/?p=wsa/linux.git;a=commitdiff;h=554c96744afd169886bd6fc2736fb0d9aaf634e8
arch/arm/mach-omap2
The OMAP_I2C_FLAG_RESET_REGS_POSTIDLE is not used anymore
in the i2c driver. Remove the flag.
Signed-off-by: Shubhrajyoti D
---
Has dependency on the below patch
http://git.pengutronix.de/?p=wsa/linux.git;a=commitdiff;h=554c96744afd169886bd6fc2736fb0d9aaf634e8
arch/arm/mach-omap2
: Shubhrajyoti D
---
v2: rebase to the for-next branch
v3: Fix a typo
drivers/i2c/busses/i2c-omap.c |7 ---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 482c63d..fabcbe1 100644
--- a/drivers/i2c/busses/i2c-omap.c
Currently we just queue the transfer and release the
qos constraints, however we donot wait for the transfer
to complete to release the constraint. Move the remove
constraint after the bus busy as we are sure that the
transfers are completed by then.
Signed-off-by: Shubhrajyoti D
---
v2: rebase
Currently we just queue the transfer and release the
qos constraints, however we donot wait for the transfer
to complete to release the constraint. Move the remove
constraint after the bus busy as we are sure that the
transfers are completed by then.
Signed-off-by: Shubhrajyoti D
---
drivers
The dtrev is used only for the comments. Remove the same and use
the scheme instead to know if it is version2.
Signed-off-by: Shubhrajyoti D
---
v3: remove the scheme from the commments.
todo: remove the dtrev from hwmod etc.
drivers/i2c/busses/i2c-omap.c | 12 +---
1 files changed
re-factor omap_i2c_init() so that we can re-use it for resume.
While at it also remove the bufstate variable as we write it
in omap_i2c_resize_fifo for every transfer.
Reviewed-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 75
een added in the resume handler to prevent the access before
the setting of the regs.
Signed-off-by: Shubhrajyoti D
---
v3: Fix the comments.
drivers/i2c/busses/i2c-omap.c | 61 -
1 files changed, 48 insertions(+), 13 deletions(-)
diff --git a/drivers/
The commit [i2c: omap: use revision check for OMAP_I2C_FLAG_APPLY_ERRATA_I207]
uses the revision id instead of the flag. So the flag can be safely removed.
Reviewed-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
arch/arm/mach-omap2/omap_hwmod_2430_data.c |3 +--
arch/arm/mach-omap2
Implement reset as a separate function.
This will enable us to make sure that we don't do the
calculation again on every transfer.
Also at probe the reset is not added as the hwmod is doing that
for us.
Reviewed-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
todo: reprodue the error
: Shubhrajyoti D
---
Todo: the flag could be deleted if the patch is accepted.
drivers/i2c/busses/i2c-omap.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 7393017..25f1564 100644
--- a/drivers/i2c/busses/i2c
the cases the minor values of the 2430 register
is different(0x37) in that case the autoidle setting may be missed.
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 20 +---
1 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/drivers/i2c/busses/i2c
:
Linux 3.7-rc4 (2012-11-04 11:07:39 -0800)
are available in the git repository at:
git://gitorious.org/linus-tree/linus-tree.git i2c_omap/for_3.8
Shubhrajyoti D (8):
i2c: omap: Fix the revision register read
i2c: omap: use revision check for OMAP_I2C_FLAG_APPLY_ERRATA_I207
The errata i207 is enabled for 2430 and 3xxx. Use the revision check
to enable the erratum instead.
Reviewed-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c
The dtrev is used only for the comments. Remove the same and use
the scheme instead to know if it is version2.
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 10 --
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b
Implement reset as a separate function.
This will enable us to make sure that we don't do the
calculation again on every transfer.
Also at probe the reset is not added as the hwmod is doing that
for us.
Signed-off-by: Shubhrajyoti D
---
todo: reprodue the errors and optimise the res
The errata i207 is enabled for 2430 and 3xxx. Use the revision check
to enable the erratum instead.
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c
een added in the resume handler to prevent the access before
the setting of the regs.
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 61 -
1 files changed, 48 insertions(+), 13 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/driv
The commit [i2c: omap: use revision check for OMAP_I2C_FLAG_APPLY_ERRATA_I207]
uses the revision id instead of the flag. So the flag can be safely removed.
Signed-off-by: Shubhrajyoti D
---
arch/arm/mach-omap2/omap_hwmod_2430_data.c |3 +--
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |9
re-factor omap_i2c_init() so that we can re-use it for resume.
While at it also remove the bufstate variable as we write it
in omap_i2c_resize_fifo for every transfer.
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 75 +++--
1 files
after enabling hwmod
Also available through
git://gitorious.org/linus-tree/linus-tree.git i2c_omap/for_3.8
Shubhrajyoti D (7):
i2c: omap: Fix the revision register read
i2c: omap: use revision check for OMAP_I2C_FLAG_APPLY_ERRATA_I207
i2c: omap: remove the dtrev
ARM: i2c: omap: Remove the
reset is done. However the restore
never happens as it is dependent on the POSTIDLE flag.
The other option would be to call a restore in the reset
case. As there are only a few registers to be restored
the penalty in the idle case should not be much.
Signed-off-by: Shubhrajyoti D
---
Todo: the flag
een added in the resume handler to prevent the access before
the setting of the regs.
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 59 -
1 files changed, 46 insertions(+), 13 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/driv
.
Shubhrajyoti D (2):
i2c: omap: use revision check for OMAP_I2C_FLAG_APPLY_ERRATA_I207
i2c: omap: Fix the revision register read
drivers/i2c/busses/i2c-omap.c | 62 +++-
1 files changed, 48 insertions(+), 14 deletions(-)
--
1.7.5.4
--
To unsubscribe from this
The errata i207 is enabled for 2430 and 3xxx. Use the revision check
to enable the erratum instead.
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c
-by: Shubhrajyoti D
---
todo: some of the flag checks can be removed in favour of revision check.
drivers/i2c/busses/i2c-omap.c | 35 +--
1 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
in
re-factor omap_i2c_init() so that we can re-use it for resume.
While at it also remove the bufstate variable as we write it
in omap_i2c_resize_fifo for every transfer.
Signed-off-by: Shubhrajyoti D
---
v4: add spaces for readability
drivers/i2c/busses/i2c-omap.c | 74
Applies on Felipe's series
http://www.spinics.net/lists/linux-omap/msg79995.html
Tested with Terro sys fix + Felipe's stop sched_clock() during suspend
on omap3630 beagle both idle and suspend.
Functional testing on omap4sdp.
Todo: all the error cases may not need a reset.
Shubhra
Implement reset as a separate function.
This will enable us to make sure that we don't do the
calculation again on every transfer.
Also at probe the reset is not added as the hwmod is doing that
for us.
Signed-off-by: Shubhrajyoti D
---
some of the errors may not need a reset.
will chec
re-factor omap_i2c_init() so that we can re-use it for resume.
While at it also remove the bufstate variable as we write it
in omap_i2c_resize_fifo for every transfer.
Signed-off-by: Shubhrajyoti D
---
v4: add spaces for readability
drivers/i2c/busses/i2c-omap.c | 74
Applies on Felipe's series
http://www.spinics.net/lists/linux-omap/msg79995.html
Tested with Terro sys fix + Felipe's stop sched_clock() during suspend
on omap3630 beagle both idle and suspend.
Functional testing on omap4sdp.
Todo: all the error cases may not need a reset.
Shubhra
Implement reset as a separate function.
This will enable us to make sure that we don't do the
calculation again on every transfer.
Also at probe the reset is not added as the hwmod is doing that
for us.
Signed-off-by: Shubhrajyoti D
---
some of the errors may not need a reset.
will chec
re-factor omap_i2c_init() so that we can re-use it for resume.
While at it also remove the bufstate variable as we write it
in omap_i2c_resize_fifo for every transfer.
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 71 ++--
1 files
Applies on Felipe's series
http://www.spinics.net/lists/linux-omap/msg79995.html
Tested with Terro sys fix + Felipe's stop sched_clock() during suspend
on omap3630 beagle both idle and suspend.
Functional testing on omap4sdp.
Shubhrajyoti D (2):
i2c: omap: re-factor omap_i2c_ini
Implement reset as a seperate function.
This will enable us to make sure that we don't do the
calculation again on every transfer.
Also at probe the reset is not added as the hwmod is doing that
for us.
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |
re-factor omap_i2c_init() so that we can re-use it for resume.
While at it also remove the bufstate variable as we write it
in omap_i2c_resize_fifo for every transfer.
Signed-off-by: Shubhrajyoti D
---
v2 - add the iestate 0 check back.
- Remove a stray change.
- Applies on top of Felipe
re-factor omap_i2c_init() so that we can re-use it for resume.
While at it also remove the bufstate variable as we write it
in omap_i2c_resize_fifo for every transfer.
Signed-off-by: Shubhrajyoti D
---
Applies on Felipe's series
http://www.spinics.net/lists/linux-omap/msg79995.html
Tested
Convert the struct i2c_msg initialization to C99 format. This makes
maintaining and editing the code simpler. Also helps once other fields
like transferred are added in future.
Thanks to Julia Lawall for automating the conversion
Signed-off-by: Shubhrajyoti D
---
drivers/char/tpm
Convert the struct i2c_msg initialization to C99 format. This makes
maintaining and editing the code simpler. Also helps once other fields
like transferred are added in future.
Thanks to Julia Lawall for automating the conversion
Signed-off-by: Shubhrajyoti D
---
drivers/video/matrox
Convert the struct i2c_msg initialization to C99 format. This makes
maintaining and editing the code simpler. Also helps once other fields
like transferred are added in future.
Thanks to Julia Lawall for automating the conversion
Signed-off-by: Shubhrajyoti D
---
drivers/input/touchscreen
Convert the struct i2c_msg initialization to C99 format. This makes
maintaining and editing the code simpler. Also helps once other fields
like transferred are added in future.
Thanks to Julia Lawall for automating the conversion
Signed-off-by: Shubhrajyoti D
---
drivers/input/joystick
Currently the slave support is not there in the current i2c.
Lets remove the Address as slave wakeup from the Wakeup enable
register.
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |7 ++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses
The omap_i2c_resize_fifo already takes care of the fifo clearing so,
remove the (re)clearing of the fifo.
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |5 -
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c
Enable the irq in the transfer and disable it after the
transfer is done.
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index b6c6b95
From: Felipe Balbi
this will make sure that we execute at least once.
No functional changes otherwise.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 20 ++--
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a
From: Felipe Balbi
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
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 204
1 files
From: Felipe Balbi
for OMAP2, we can easily switch over to threaded
IRQs on the I2C driver. This will allow us to
spend less time in hardirq context.
Signed-off-by: Felipe Balbi
[Trivial formating changes]
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 43
be transferred.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 26 +-
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 122f517..b149e32
From: Felipe Balbi
Always return IRQ_HANDLED otherwise we could get our IRQ line disabled due
to many spurious IRQs.
Signed-off-by: Felipe Balbi
[Trivial changes to commitlogs]
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |2 +-
1 files changed, 1 insertions(+), 1
From: Felipe Balbi
that way we can ignore TX IRQs while in receiver
mode and ignore RX IRQs while in transmitter mode.
Signed-off-by: Felipe Balbi
[Remove unnecessary braces]
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |8
1 files changed, 8 insertions(+), 0
From: Felipe Balbi
According to flow diagrams on OMAP TRMs,
we should ACK the IRQ as they happen.
Signed-off-by: Felipe Balbi
[Ack the stat OMAP_I2C_STAT_AL in case of arbitration lost]
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 28
1
i2c: omap: switch to threaded IRQ support
i2c: omap: remove unnecessary pm_runtime_suspended check
i2c: omap: switch over to autosuspend API
i2c: omap: sanitize exit path
Shubhrajyoti D (1):
i2c: omap: remove redundant status read
drivers/i2c/busses
From: Felipe Balbi
omap_i2c_dev is allocated with kzalloc(),
so we need not initialize b_hw to zero.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c
check for dev->buf_len as we always know
the amount of data to be transmitted.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 83 +
1 files changed, 51 insertions(+), 32 deletions(-)
diff --git a/dri
From: Felipe Balbi
this helps us reduce unnecessary pm transitions
in case we have another i2c message starting soon.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 12 ++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git
From: Felipe Balbi
before starting any messages we call pm_runtime_get_sync()
which will make sure that by the time we program a transfer
and our IRQ handler gets called, we're not suspended
anymore.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-o
Currently omap_i2c_ack_stat doesn't use the stat variable.
After the read of the I2C_STAT_REG it is not used.
Remove the redundant read of the status register.
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff
avoid an unncessary register
read since dev->fifo_len will always contain the
correct amount of data to be transferred.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 126 ++---
1 files changed, 92 insertion
From: Felipe Balbi
that helps deleting some boiler plate code
and lets driver-core manage our resources
for us.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 41 -
1 files changed, 12 insertions(+), 29
From: Felipe Balbi
trivial patch to aid readability. No functional
changes.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c
data.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 43
1 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 815577b..fb57221 1
From: Felipe Balbi
we can ack stat and complete the command from
the errata handling itself.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 16 +---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses
break;
}
aaa;
Hence no functional changes.
Signed-off-by: Felipe Balbi
Reviewed-by : Santosh Shilimkar
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 63 -
1 files changed, 31 insertions(+), 32 deletions(-)
diff --git a
f-by: Felipe Balbi
Reviewed-by : Santosh Shilimkar
[Added the explaination from the discurssion to the commit logs]
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 19 ++-
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/i2c/busses/i2c-o
-off-by: Felipe Balbi
Reviewed-by : Santosh Shilimkar
Signed-off-by: Shubhrajyoti D
---
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 2d9b03c..236cb38 100644
--- a
From: Felipe Balbi
instead of having multiple return points, use
a goto statement to make that clearer.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 20
1 files changed, 8 insertions(+), 12 deletions(-)
diff --git a
From: Felipe Balbi
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
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 12 +++-
1 files changed, 7 insertions(
-off-by: Felipe Balbi
Reviewed-by : Santosh Shilimkar
Signed-off-by: Shubhrajyoti D
---
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 2d9b03c..236cb38 100644
--- a
From: Felipe Balbi
we can ack stat and complete the command from
the errata handling itself.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 16 +---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses
From: Felipe Balbi
instead of having multiple return points, use
a goto statement to make that clearer.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 20
1 files changed, 8 insertions(+), 12 deletions(-)
diff --git a
From: Felipe Balbi
this helps us reduce unnecessary pm transitions
in case we have another i2c message starting soon.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 12 ++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git
be transferred.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 26 +-
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 122f517..b149e32
From: Felipe Balbi
before starting any messages we call pm_runtime_get_sync()
which will make sure that by the time we program a transfer
and our IRQ handler gets called, we're not suspended
anymore.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-o
From: Felipe Balbi
that way we can ignore TX IRQs while in receiver
mode and ignore RX IRQs while in transmitter mode.
Signed-off-by: Felipe Balbi
[Remove unnecessary braces]
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |8
1 files changed, 8 insertions(+), 0
Remove the redundant read of the status register.
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 5d4bad4..498a462 100644
--- a/drivers
From: Felipe Balbi
for OMAP2, we can easily switch over to threaded
IRQs on the I2C driver. This will allow us to
spend less time in hardirq context.
Signed-off-by: Felipe Balbi
[Trivial formating changes]
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 43
From: Felipe Balbi
even if our clocks are disabled, we still
handled the IRQ, so we should return IRQ_HANDLED.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c
check for dev->buf_len as we always know
the amount of data to be transmitted.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 83 +
1 files changed, 51 insertions(+), 32 deletions(-)
diff --git a/dri
From: Felipe Balbi
that helps deleting some boiler plate code
and lets driver-core manage our resources
for us.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 41 -
1 files changed, 12 insertions(+), 29
From: Felipe Balbi
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
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 204
1 files
From: Felipe Balbi
Always return IRQ_HANDLED otherwise we could get our IRQ line disabled due
to many spurious IRQs.
Signed-off-by: Felipe Balbi
[Trivial changes to commitlogs]
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |2 +-
1 files changed, 1 insertions(+), 1
From: Felipe Balbi
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
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 12 +++-
1 files changed, 7 insertions(
From: Felipe Balbi
this will make sure that we execute at least once.
No functional changes otherwise.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 20 ++--
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a
From: Felipe Balbi
According to flow diagrams on OMAP TRMs,
we should ACK the IRQ as they happen.
Signed-off-by: Felipe Balbi
[Ack the stat OMAP_I2C_STAT_AL in case of arbitration lost]
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 28
1
data.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 43
1 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 815577b..fb57221 1
From: Felipe Balbi
omap_i2c_dev is allocated with kzalloc(),
so we need not initialize b_hw to zero.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c
break;
}
aaa;
Hence no functional changes.
Signed-off-by: Felipe Balbi
Reviewed-by : Santosh Shilimkar
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 63 -
1 files changed, 31 insertions(+), 32 deletions(-)
diff --git a
From: Felipe Balbi
trivial patch to aid readability. No functional
changes.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c
avoid an unncessary register
read since dev->fifo_len will always contain the
correct amount of data to be transferred.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 126 ++---
1 files changed, 92 insertion
f-by: Felipe Balbi
Reviewed-by : Santosh Shilimkar
[Added the explaination from the discurssion to the commit logs]
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 19 ++-
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/i2c/busses/i2c-o
ap: switch over to autosuspend API
i2c: omap: sanitize exit path
Shubhrajyoti D (1):
i2c: omap: remove redundant status read
drivers/i2c/busses/i2c-omap.c | 442 +
1 files changed, 271 insertions(+), 171 deletions(-)
--
1.7.5.4
--
To unsubscribe fr
: Shubhrajyoti D
---
v2: Implement Jean's suggestion of not deleting instead make it NULL at a safer
time.
drivers/i2c/busses/i2c-omap.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 5d19a49..c4
After platform_set_drvdata(pdev, NULL) the pdev->dev should not be accessed.
Also since the platform device is deleted anyways just remove the
call to platform_set_drvdata(pdev, NULL).
Signed-off-by: Shubhrajyoti D
---
Untested.
drivers/i2c/busses/i2c-designware-platdrv.c |
After platform_set_drvdata(pdev, NULL) the pdev->dev should not be accessed.
Also since the platform device is deleted anyways just remove the
call to platform_set_drvdata(pdev, NULL).
Signed-off-by: Shubhrajyoti D
---
Untested.
drivers/i2c/busses/i2c-davinci.c |2 --
1 files changed
at omap_i2c_runtime_resume+0x8/0x148
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 5d19a49..84fbef6 100644
--- a/drivers/i2c/busses/i2c-omap.c
++
be transferred.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 26 +-
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index d81189a..3df6f92
From: Felipe Balbi
this helps us reduce unnecessary pm transitions
in case we have another i2c message starting soon.
Signed-off-by: Felipe Balbi
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c | 12 ++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git
/0x148
Signed-off-by: Shubhrajyoti D
---
drivers/i2c/busses/i2c-omap.c |4
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 3df6f92..9aefd36 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses
1 - 100 of 529 matches
Mail list logo