Re: [PATCHv2 2/9] i2c: xiic: move the xiic_process to thread context

2015-07-13 Thread Shubhrajyoti Datta
On Fri, Jul 10, 2015 at 1:23 PM, Wolfram Sang w...@the-dreams.de wrote:
 On Fri, Jul 10, 2015 at 10:38:11AM +0530, Shubhrajyoti Datta wrote:
 On Thu, Jul 9, 2015 at 11:01 PM, Wolfram Sang w...@the-dreams.de wrote:
   static int xiic_bus_busy(struct xiic_i2c *i2c)
  @@ -602,16 +601,21 @@ static void xiic_start_send(struct xiic_i2c *i2c)
   static irqreturn_t xiic_isr(int irq, void *dev_id)
   {
struct xiic_i2c *i2c = dev_id;
  -
  - spin_lock(i2c-lock);
  + u32 pend, isr, ier;
  + irqreturn_t ret = IRQ_HANDLED;
  + /* Do not processes a devices interrupts if the device has no
  +  * interrupts pending
  +  */
 
  Shouldn't you init 'ret' to IRQ_NONE then?
 

 Indeed I missed it.

 Can you test this change on HW and report back?

I have tested it.


 Thanks,

Wolfram

--
To unsubscribe from this list: send the line unsubscribe linux-i2c in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv2 2/9] i2c: xiic: move the xiic_process to thread context

2015-07-10 Thread Wolfram Sang
On Fri, Jul 10, 2015 at 10:38:11AM +0530, Shubhrajyoti Datta wrote:
 On Thu, Jul 9, 2015 at 11:01 PM, Wolfram Sang w...@the-dreams.de wrote:
   static int xiic_bus_busy(struct xiic_i2c *i2c)
  @@ -602,16 +601,21 @@ static void xiic_start_send(struct xiic_i2c *i2c)
   static irqreturn_t xiic_isr(int irq, void *dev_id)
   {
struct xiic_i2c *i2c = dev_id;
  -
  - spin_lock(i2c-lock);
  + u32 pend, isr, ier;
  + irqreturn_t ret = IRQ_HANDLED;
  + /* Do not processes a devices interrupts if the device has no
  +  * interrupts pending
  +  */
 
  Shouldn't you init 'ret' to IRQ_NONE then?
 
 
 Indeed I missed it.

Can you test this change on HW and report back?

Thanks,

   Wolfram



signature.asc
Description: Digital signature


Re: [PATCHv2 2/9] i2c: xiic: move the xiic_process to thread context

2015-07-09 Thread Wolfram Sang
  static int xiic_bus_busy(struct xiic_i2c *i2c)
 @@ -602,16 +601,21 @@ static void xiic_start_send(struct xiic_i2c *i2c)
  static irqreturn_t xiic_isr(int irq, void *dev_id)
  {
   struct xiic_i2c *i2c = dev_id;
 -
 - spin_lock(i2c-lock);
 + u32 pend, isr, ier;
 + irqreturn_t ret = IRQ_HANDLED;
 + /* Do not processes a devices interrupts if the device has no
 +  * interrupts pending
 +  */

Shouldn't you init 'ret' to IRQ_NONE then?



signature.asc
Description: Digital signature