[PATCHv2 0/7] i2c: omap: updates

2012-11-04 Thread Shubhrajyoti D
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

[PATCHv2 7/7] i2c: omap: Restore i2c context always

2012-11-04 Thread Shubhrajyoti D
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

Re: [PATCH 1/2] i2c: omap: Fix the revision register read

2012-11-02 Thread Shubhrajyoti Datta
On Fri, Nov 2, 2012 at 4:36 PM, Felipe Balbi wrote: > Hi, > > On Fri, Nov 02, 2012 at 04:09:44PM +0530, Shubhrajyoti D wrote: >> The revision register on OMAP4 is a 16-bit lo and a 16-bit >> hi. Currently the driver reads only the lower 8-bits. >> Fix the same by preve

Re: [PATCH 2/2] i2c: omap: use revision check for OMAP_I2C_FLAG_APPLY_ERRATA_I207

2012-11-02 Thread Shubhrajyoti Datta
On Fri, Nov 2, 2012 at 4:37 PM, Felipe Balbi wrote: > On Fri, Nov 02, 2012 at 04:09:45PM +0530, Shubhrajyoti D wrote: >> The errata i207 is enabled for 2430 and 3xxx. Use the revision check >> to enable the erratum instead. >> >> Signed-off-by: Shubhrajyoti D > &

[PATCH 1/2] i2c: omap: Fix the revision register read

2012-11-02 Thread Shubhrajyoti D
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

[PATCH 0/2] i2c: omap: revision register updates

2012-11-02 Thread Shubhrajyoti D
. 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

[PATCH 2/2] i2c: omap: use revision check for OMAP_I2C_FLAG_APPLY_ERRATA_I207

2012-11-02 Thread Shubhrajyoti D
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

Re: [PATCH RFC] i2c: omap: Fix the revision register read

2012-10-31 Thread Shubhrajyoti
On Wednesday 31 October 2012 03:42 PM, Felipe Balbi wrote: >> >> > + if (!_dev->regs) >> > + return 0; > this is wrong, you need to make sure dev->regs is set early enough. to set the dev->regs I use the value read from revision register. to read the revision register I do a get_sync

Re: [PATCH RFC] i2c: omap: Fix the revision register read

2012-10-31 Thread Shubhrajyoti
On Wednesday 31 October 2012 03:42 PM, Felipe Balbi wrote: > Hi, > > On Wed, Oct 31, 2012 at 02:29:19PM +0530, Shubhrajyoti D wrote: >> The revision register on OMAP4 is a 16-bit lo and a 16-bit >> hi. Currently the driver reads only the lower 8-bits. >> Fix the same b

Re: [PATCH RFC] i2c: omap: Fix the revision register read

2012-10-31 Thread Shubhrajyoti Datta
On Wed, Oct 31, 2012 at 2:29 PM, Shubhrajyoti D wrote: > The revision register on OMAP4 is a 16-bit lo and a 16-bit > hi. Currently the driver reads only the lower 8-bits. > Fix the same by preventing the truncating of the rev register > for OMAP4. > > Also use the scheme bit i

[PATCH RFC] i2c: omap: Fix the revision register read

2012-10-31 Thread Shubhrajyoti D
-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

[PATCHv4 1/2] i2c: omap: re-factor omap_i2c_init function

2012-10-25 Thread Shubhrajyoti D
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

[PATCHv4 0/2] i2c: omap: cleanups

2012-10-25 Thread Shubhrajyoti D
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

[PATCHv4 2/2] i2c: omap: make reset a seperate function

2012-10-25 Thread Shubhrajyoti D
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

[PATCHv4 1/2] i2c: omap: re-factor omap_i2c_init function

2012-10-25 Thread Shubhrajyoti D
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

[PATCHv4 0/2] i2c: omap: cleanups

2012-10-25 Thread Shubhrajyoti D
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

[PATCHv4 2/2] i2c: omap: make reset a seperate function

2012-10-25 Thread Shubhrajyoti D
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: [PATCH 2/2] i2c: omap: make reset a seperate function

2012-10-25 Thread Shubhrajyoti
On Thursday 25 October 2012 04:25 PM, Felipe Balbi wrote: > overflow, underflow these are data errors personally feel may be removed. > and arbitration lost) will investigate. > and try to make sure if > actually need to reset the controller all the time. I find it really odd > that we're alwa

Re: [PATCH 2/8] i2c: omap: reorder exit path of omap_i2c_xfer_msg()

2012-10-25 Thread Shubhrajyoti Datta
On Mon, Oct 22, 2012 at 3:16 PM, Felipe Balbi wrote: > just a cleanup patch trying to make exit path > more straightforward. No changes otherwise. > > Signed-off-by: Felipe Balbi > --- > drivers/i2c/busses/i2c-omap.c | 26 +- > 1 file changed, 17 insertions(+), 9 deletion

[PATCH 1/2] i2c: omap: re-factor omap_i2c_init function

2012-10-25 Thread Shubhrajyoti D
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

[PATCH 0/2] i2c: omap: cleanups

2012-10-25 Thread Shubhrajyoti D
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

[PATCH 2/2] i2c: omap: make reset a seperate function

2012-10-25 Thread Shubhrajyoti D
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: [PATCH v2] i2c: omap: re-factor omap_i2c_init function

2012-10-25 Thread Shubhrajyoti Datta
On Thu, Oct 25, 2012 at 12:06 PM, Felipe Balbi wrote: [...] >> + * 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 in

Re: [PATCH] i2c: omap: ensure writes to dev->buf_len are ordered

2012-10-25 Thread Shubhrajyoti Datta
aboard for a few > iterations of the script mentioned above. looks good to me Acked-by: Shubhrajyoti D > > Signed-off-by: Felipe Balbi > --- > > This bug has been there forever, but it's quite annoying. > I think it deserves being pushed upstream during this -rc > cycle, bu

Re: [PATCH v2] i2c: omap: re-factor omap_i2c_init function

2012-10-24 Thread Shubhrajyoti Datta
On Thu, Oct 25, 2012 at 12:06 PM, Felipe Balbi wrote: > Hi, > > On Thu, Oct 25, 2012 at 12:06:51PM +0530, Shubhrajyoti D wrote: >> 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 oma

[PATCH v2] i2c: omap: re-factor omap_i2c_init function

2012-10-24 Thread Shubhrajyoti D
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: [PATCH] i2c: omap: re-factor omap_i2c_init function

2012-10-24 Thread Shubhrajyoti Datta
On Tue, Oct 23, 2012 at 11:27 PM, Felipe Balbi wrote: > Hi, > > On Tue, Oct 23, 2012 at 11:26:15PM +0530, Shubhrajyoti Datta wrote: >> >> @@ -1268,23 +1271,8 @@ static int omap_i2c_runtime_resume(struct device >> >> *dev) >> >> { >> >&

Re: [PATCH] i2c: omap: re-factor omap_i2c_init function

2012-10-24 Thread Shubhrajyoti
On 10/24/2012 12:41 AM, Felipe Balbi wrote: >return 0; >} another thing, the few places in omap_i2c_xfer_msg() which are currently calling omap_i2c_init() should also be converted to call the newly added __omap_i2c_init(). We don't need to recalculate any of those clock dividers

Re: [PATCH] i2c: omap: re-factor omap_i2c_init function

2012-10-23 Thread Shubhrajyoti Datta
On Tue, Oct 23, 2012 at 11:27 PM, Felipe Balbi wrote: > Hi, > > On Tue, Oct 23, 2012 at 11:26:15PM +0530, Shubhrajyoti Datta wrote: >> >> @@ -1268,23 +1271,8 @@ static int omap_i2c_runtime_resume(struct device >> >> *dev) >> >> { >> >&

Re: [PATCH] i2c: omap: re-factor omap_i2c_init function

2012-10-23 Thread Shubhrajyoti Datta
On Tue, Oct 23, 2012 at 10:48 PM, Felipe Balbi wrote: > Hi, > > On Tue, Oct 23, 2012 at 08:57:19PM +0530, Shubhrajyoti D wrote: >> 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 oma

[PATCH] i2c: omap: re-factor omap_i2c_init function

2012-10-23 Thread Shubhrajyoti D
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

Re: [PATCH 0/8] I2C patches for v3.8 merge window

2012-10-22 Thread Shubhrajyoti
On Monday 22 October 2012 07:36 PM, Felipe Balbi wrote: > can you also check if echo mem > /sys/power/state works ? Don't forget > to enable UART wakeups with: > > echo enabled > /sys/devices/platform/omap_uart.2/power/wakeup > echo enabled > /sys/devices/platform/omap_uart.2/tty/ttyO2/power/wakeup

Re: [PATCH 0/8] I2C patches for v3.8 merge window

2012-10-22 Thread Shubhrajyoti Datta
that driver. >> >> I have boot tested all patches on beagle xM (3630) and pandaboard >> rev A3 (4430), will send boot-logs if anyone wants to see. tested the below branch on omap4430sdp , panda , omap3430sdp. Doing simple i2ctools . Tested-by : Shubhrajyoti D >> >

Re: [PATCH] i2c: omap: adopt pinctrl support

2012-10-17 Thread Shubhrajyoti Datta
c.15: Driver omap_i2c requests probe deferral > [0.484466] Advanced Linux Sound Architecture Driver Initialized. > > [4.746917] omap_i2c i2c.15: bus 4 rev2.4.0 at 100 kHz > [4.755279] gpiochip_find_base: found new base at 477 > [4.761169] gpiochip_add: registered GPIOs 477 to 500 on d

Re: [PATCH] i2c: omap: revert "i2c: omap: switch to threaded IRQ support"

2012-10-16 Thread Shubhrajyoti Datta
On Mon, Oct 15, 2012 at 7:21 AM, Paul Walmsley wrote: > > Commit 3b2f8f82dad7d1f79cdc8fc05bd1c94baf109bde ("i2c: omap: switch to > threaded IRQ support") causes communication with I2C devices to fail > after system suspend/resume on all OMAP3 devices: > Could you tell me which omap3 platform On

Re: [PATCH v3] ARM: OMAP: i2c: fix interrupt flood during resume

2012-10-15 Thread Shubhrajyoti Datta
On Mon, Oct 15, 2012 at 2:46 PM, Kalle Jokiniemi wrote: > ma, 2012-10-15 kello 09:21 +0300, Kalle Jokiniemi kirjoitti: >> Hi, >> >> pe, 2012-10-12 kello 14:46 +, Strashko, Grygorii kirjoitti: >> > Hi Kevin, >> > >> > yep, [1] is the same fix - thanks. >> > >> > Hi Kalle, >> > >> > i've applied

Re: [PATCH] i2c: omap: fix spurious IRQs: disable/enable IRQ at INTC when idle

2012-10-12 Thread Shubhrajyoti Datta
. To avoid this, also disable interrupts at > the MPU INTC when idling the device in ->runtime_suspend() (and > re-enable them in ->runtime_resume().) This part based on an original > patch from Shubhrajyoti Datta. NOTE: for proper sharing the I2C with > a coprocessor, this driv

Re: [PATCH v3] ARM: OMAP: i2c: fix interrupt flood during resume

2012-10-12 Thread Shubhrajyoti Datta
; With runtime PM autosuspend timeouts, that means any IRQs > firing during the autosuspend delay will be lost, which basically > nullifies the use of autosuspend. so I do not expect any interrupts between completion/error -> autosuspend. > > Since Shubhrajyoti didn't respond t

Re: [PATCH 1/3] i2c: omap: Do not enable the irq always

2012-10-12 Thread Shubhrajyoti Datta
On Fri, Oct 12, 2012 at 7:56 PM, Kevin Hilman wrote: > +Kalle, Grygorii, Huzefa > > Shubhrajyoti D writes: > >> Enable the irq in the transfer and disable it after the >> transfer is done. >> >> Signed-off-by: Shubhrajyoti D >> --- >> driv

Re: [PATCH 1/3] i2c: omap: Do not enable the irq always

2012-10-12 Thread Shubhrajyoti
On Friday 12 October 2012 08:01 PM, Kevin Hilman wrote: > When using runtime PM with auto-suspend timeouts, why would you disable > the IRQ before the runtime suspend handlers have run? > > If you really want to do this, you probably should have these in the > runtime PM callbacks. But I'll wai

Re: [PATCH v3] ARM: OMAP: i2c: fix interrupt flood during resume

2012-10-12 Thread Shubhrajyoti
On Friday 12 October 2012 03:48 PM, Strashko, Grygorii wrote: > Hi All, > > Sorry, for the late reply. > + CC Huzefa Kankroliwala - who is I2C driver owner on Android Kernel 3.4. > > Regarding this patch hmm I had similar ideas however my idea was to pacify the arm interrupts when the ip is used by

Re: [PATCH v3] ARM: OMAP: i2c: fix interrupt flood during resume

2012-10-11 Thread Shubhrajyoti Datta
On Wed, Oct 10, 2012 at 5:48 PM, Kalle Jokiniemi wrote: > The resume_noirq enables interrupts one-by-one starting from > first one. Now if the wake up event for suspend came from i2c > device, the i2c bus irq gets enabled before the threaded > i2c device irq, causing a flood of i2c bus interrupts

Re: [PATCH 2/4] input: Convert struct i2c_msg initialization to C99 format

2012-10-10 Thread Shubhrajyoti Datta
On Wed, Oct 10, 2012 at 2:32 PM, Jean Delvare wrote: > On Tue, 9 Oct 2012 17:01:18 +0530, Shubhrajyoti D wrote: [...] > > Acked-by: Jean Delvare thanks updated patch below >From 6638ecfa7982f95815382922c50573712c9626d7 Mon Sep 17 00:00:00 2001 From: Shubhrajyoti D Date: Mon, 17 Se

Re: [PATCH] matroxfb: Convert struct i2c_msg initialization to C99 format

2012-10-10 Thread Shubhrajyoti Datta
On Wed, Oct 10, 2012 at 2:35 PM, Jean Delvare wrote: > On Tue, 9 Oct 2012 17:07:48 +0530, Shubhrajyoti D wrote: Thanks updated patch below. >From 99073779197f5759a76e65c3f4ef2ad4e9c88eaf Mon Sep 17 00:00:00 2001 From: Shubhrajyoti D Date: Mon, 17 Sep 2012 21:19:32 +0530 Subject: [P

Re: [PATCH] char/tpm: Convert struct i2c_msg initialization to C99 format

2012-10-10 Thread Shubhrajyoti Datta
On Wed, Oct 10, 2012 at 2:36 PM, Jean Delvare wrote: > On Tue, 9 Oct 2012 17:12:31 +0530, Shubhrajyoti D wrote: Thanks for review updated patch below >From f3786807bbaafe1f0dfcf2d94e3bee1c273296a4 Mon Sep 17 00:00:00 2001 From: Shubhrajyoti D Date: Mon, 17 Sep 2012 19:34:37 +0530 S

[PATCH] char/tpm: Convert struct i2c_msg initialization to C99 format

2012-10-09 Thread Shubhrajyoti D
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

[PATCH] matroxfb: Convert struct i2c_msg initialization to C99 format

2012-10-09 Thread Shubhrajyoti D
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

[PATCH 2/4] input: Convert struct i2c_msg initialization to C99 format

2012-10-09 Thread Shubhrajyoti D
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

[PATCH 1/4] input: Convert struct i2c_msg initialization to C99 format

2012-10-09 Thread Shubhrajyoti D
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

[PATCH 3/3] i2c: omap: Remove Address as slave wakeup

2012-10-08 Thread Shubhrajyoti D
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

[PATCH 2/3] i2c: omap: Remove the redundant fifo clear

2012-10-08 Thread Shubhrajyoti D
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

[PATCH 1/3] i2c: omap: Do not enable the irq always

2012-10-08 Thread Shubhrajyoti D
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

Re: [PATCH v2] i2c: omap: Prevent NULL pointer dereference in remove

2012-10-03 Thread Shubhrajyoti Datta
On Thu, Sep 6, 2012 at 5:51 PM, Jean Delvare wrote: > On Thu, 6 Sep 2012 17:31:56 +0530, Shubhrajyoti D wrote: >> Prevent the NULL pointer access by moving the platform_set_drvdata function >> after the access of the pdev. >> >> [ 654.961761] Unable to handle kernel

Re: [PATCH v1] i2c-hid: introduce HID over i2c specification implementation

2012-10-03 Thread Shubhrajyoti Datta
On Wed, Oct 3, 2012 at 9:03 PM, Benjamin Tissoires wrote: > Hi, > > thanks also for the review. Two in the same day! I was about to send a > ping on that patch ;-) > > On Wed, Oct 3, 2012 at 8:05 AM, Shubhrajyoti Datta > wrote: >> On Fri, Sep 14, 2012 at 7:11 PM, b

Re: [PATCH v1] i2c-hid: introduce HID over i2c specification implementation

2012-10-02 Thread Shubhrajyoti Datta
On Fri, Sep 14, 2012 at 7:11 PM, benjamin.tissoires wrote: > From: Benjamin Tissoires > > Microsoft published the protocol specification of HID over i2c: > http://msdn.microsoft.com/en-us/library/windows/hardware/hh852380.aspx > > This patch introduces an implementation of this protocol. > > This

Re: [PATCH v2] i2c: add Renesas R-Car I2C driver

2012-09-27 Thread Shubhrajyoti Datta
On Fri, Sep 28, 2012 at 11:26 AM, Kuninori Morimoto wrote: > > Dear Shubhrajyoti > > Thank you for your comment. > >> Hi A few suggestions, >> >> On Tue, Aug 28, 2012 at 2:07 PM, Kuninori Morimoto >> wrote: >> > R-Car I2C is similar with SH7

Re: [PATCH v2] i2c: add Renesas R-Car I2C driver

2012-09-27 Thread Shubhrajyoti Datta
Hi A few suggestions, On Tue, Aug 28, 2012 at 2:07 PM, Kuninori Morimoto wrote: > R-Car I2C is similar with SH7760 I2C. > But the SH7760 I2C driver had many workaround operations, since H/W had bugs. > Thus, it was pointless to keep compatible between SH7760 and R-Car I2C > drivers. > This patch

Re: [PATCH] ARM: OMAP: convert I2C driver to PM QoS for MPU latency constraints

2012-09-20 Thread Shubhrajyoti Datta
on git://git.pengutronix.de/git/wsa/linux.git, branch > i2c-embedded/for-next thanks , tested with i2c tools on omap4sdp and omap3sdp Acked-by: Shubhrajyoti D > --- > arch/arm/plat-omap/i2c.c | 21 - > drivers/i2c/busses/i2c-omap.c | 32

Re: [PATCHv8 00/23]I2C big cleanup

2012-09-14 Thread Shubhrajyoti
On Friday 14 September 2012 02:58 AM, Kevin Hilman wrote: > Felipe Balbi writes: > >> Hi, >> >> On Thu, Sep 13, 2012 at 11:04:42AM -0700, Kevin Hilman wrote: >>> Kevin Hilman writes: >>> Kevin Hilman writes: >>> [...] >>> > Sorry to be late to the party (again), but still catching

Re: [PATCHv8 00/23]I2C big cleanup

2012-09-12 Thread Shubhrajyoti
On Thursday 13 September 2012 11:34 AM, Shubhrajyoti wrote: > > At least on 3530/Overo and 3730/Overo, CORE no longer hits retenion (or > > off) during idle. I dont have an Overo, anyways will see if I can get one However on beagleXm even off count increases / # grep "^c

Re: [PATCHv8 00/23]I2C big cleanup

2012-09-12 Thread Shubhrajyoti
On Thursday 13 September 2012 03:57 AM, Kevin Hilman wrote: > Shubhrajyoti D writes: > > [...] > >> This is the cleanup only series. >> >> Tested on omap4sdp and 3430sdp. > It would be extremely helpful if you would describe how this was tested. > And for

Re: [PATCHv7 00/23]I2C big cleanup

2012-09-12 Thread Shubhrajyoti Datta
On Wed, Sep 12, 2012 at 7:14 PM, Wolfram Sang wrote: > On Wed, Sep 12, 2012 at 12:18:50PM +0200, Wolfram Sang wrote: >> >> > I donot see the warning. Am I missing something? >> >> I deleted my logfiles already. Ignore it for now, if it comes up again >> with your new series, I will give a more det

Re: [PATCHv8 00/23]I2C big cleanup

2012-09-12 Thread Shubhrajyoti
On Wednesday 12 September 2012 06:46 PM, Wolfram Sang wrote: >> Tested on omap4sdp and 3430sdp. >> > >> > The following changes since commit >> > 55d512e245bc7699a8800e23df1a24195dd08217: >> > >> > Linux 3.6-rc5 (2012-09-08 16:43:45 -0700) >> > >> > are available in the git repository at: >>

[PATCHv8 09/22] i2c: omap: switch over to do {} while loop

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 08/22] i2c: omap: re-factor receive/transmit data loop

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 19/22] i2c: omap: switch to threaded IRQ support

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 22/22] i2c: omap: sanitize exit path

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 14/22] i2c: omap: always return IRQ_HANDLED

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 12/22] i2c: omap: bus: add a receiver flag

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 10/22] i2c: omap: ack IRQ in parts

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 00/23]I2C big cleanup

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 13/22] i2c: omap: simplify errata check

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 16/22] i2c: omap: resize fifos before each message

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 21/22] i2c: omap: switch over to autosuspend API

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 20/22] i2c: omap: remove unnecessary pm_runtime_suspended check

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 18/22] i2c: omap: remove redundant status read

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 06/22] i2c: omap: split out [XR]DR and [XR]RDY

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 01/22] i2c: omap: switch to devm_* API

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 04/22] i2c: omap: add blank lines

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 07/22] i2c: omap: improve i462 errata handling

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 17/22] i2c: omap: get rid of the "complete" label

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 03/22] i2c: omap: decrease indentation level on data handling

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 05/22] i2c: omap: simplify omap_i2c_ack_stat()

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 02/22] i2c: omap: simplify num_bytes handling

2012-09-12 Thread Shubhrajyoti D
-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

[PATCHv8 15/22] i2c: omap: simplify IRQ exit path

2012-09-12 Thread Shubhrajyoti D
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

[PATCHv8 11/22] i2c: omap: switch to platform_get_irq()

2012-09-12 Thread Shubhrajyoti D
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(

Re: [PATCHv7 00/23]I2C big cleanup

2012-09-12 Thread Shubhrajyoti
On Wednesday 12 September 2012 03:30 AM, Wolfram Sang wrote: >> Changes since v6: >> > - Fix comments on setting the pdev to NULL. >> > - Trivial changelog update > Looks mostly good, thanks. Only a few comments. Oh, and I still get > reports about a section mismatch ;) I am using o

Re: [PATCHv7 18/23] i2c: omap: remove redundant status read

2012-09-11 Thread Shubhrajyoti
On Wednesday 12 September 2012 03:24 AM, Wolfram Sang wrote: > On Tue, Sep 11, 2012 at 03:12:13PM +0530, Shubhrajyoti D wrote: >> Remove the redundant read of the status register. > Commit message is just repeating the subject. > Why was the read there and why can it be removed no

Re: [PATCHv7 19/23] i2c: omap: always return IRQ_HANDLED

2012-09-11 Thread Shubhrajyoti
On Wednesday 12 September 2012 03:23 AM, Wolfram Sang wrote: >> Signed-off-by: Shubhrajyoti D > Can't we just drop this patch since the code gets removed soon anyhow? > Or is patch 20/23 changing something I don't see yet? yes it is dropped will update. -- To unsubscribe fr

Re: [PATCHv7 20/23] i2c: omap: switch to threaded IRQ support

2012-09-11 Thread Shubhrajyoti
On Wednesday 12 September 2012 03:21 AM, Wolfram Sang wrote: >> -omap_i2c_isr(int this_irq, void *dev_id) >> > +omap_i2c_isr(int irq, void *dev_id) >> > { >> >struct omap_i2c_dev *dev = dev_id; >> > + irqreturn_t ret = IRQ_HANDLED; > Shouldn't that be IRQ_NONE? Actually we are processing it s

Re: [PATCHv7 00/23]I2C big cleanup

2012-09-11 Thread Shubhrajyoti
On Tuesday 11 September 2012 03:11 PM, Shubhrajyoti D wrote: > Changes since v1: >- removed tabification on patch 6/17 >- removed dev_err() which was introduced on patch 09/17 > Changes since v2: > - do not set full fifo depth in the RDR interrupt. &

[PATCHv7 02/23] i2c: omap: simplify num_bytes handling

2012-09-11 Thread Shubhrajyoti D
-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

[PATCHv7 17/23] i2c: omap: get rid of the "complete" label

2012-09-11 Thread Shubhrajyoti D
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

[PATCHv7 15/23] i2c: omap: simplify IRQ exit path

2012-09-11 Thread Shubhrajyoti D
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

[PATCHv7 22/23] i2c: omap: switch over to autosuspend API

2012-09-11 Thread Shubhrajyoti D
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

[PATCHv7 23/23] i2c: omap: sanitize exit path

2012-09-11 Thread Shubhrajyoti D
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

[PATCHv7 21/23] i2c: omap: remove unnecessary pm_runtime_suspended check

2012-09-11 Thread Shubhrajyoti D
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

[PATCHv7 12/23] i2c: omap: bus: add a receiver flag

2012-09-11 Thread Shubhrajyoti D
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

[PATCHv7 18/23] i2c: omap: remove redundant status read

2012-09-11 Thread Shubhrajyoti D
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

[PATCHv7 20/23] i2c: omap: switch to threaded IRQ support

2012-09-11 Thread Shubhrajyoti D
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

<    1   2   3   4   5   6   7   8   9   >