Re: [PATCH RFC] OMAP: I2C: Fix the mismatch of pm_runtime enable and disable

2012-01-11 Thread Grazvydas Ignotas
On Wed, Jan 11, 2012 at 3:21 PM, Shubhrajyoti D shubhrajy...@ti.com wrote:
 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.

I remember seeing Felipe doing the reverse to musb here:
http://marc.info/?l=linux-omapm=132432610700952w=2
so I'm confused here.


 Cc: Kevin Hilman khil...@ti.com
 Cc: Rajendra Nayak rna...@ti.com
 Signed-off-by: Shubhrajyoti D shubhrajy...@ti.com
 ---
  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 12d402c..abc7b5b 100644
 --- a/drivers/i2c/busses/i2c-omap.c
 +++ b/drivers/i2c/busses/i2c-omap.c
 @@ -1070,6 +1070,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);
 @@ -1085,6 +1086,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

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

-- 
Gražvydas
--
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: [PATCH] i2c: omap: fix OOPS in omap_i2c_unidle() during probe

2010-04-16 Thread Grazvydas Ignotas
On Wed, Mar 31, 2010 at 3:27 PM, Jarkko Nikula jhnik...@gmail.com wrote:
 On Wed, 31 Mar 2010 04:27:41 -0600 (MDT)
 Paul Walmsley p...@pwsan.com wrote:

  This patch moves register shift setting before any register accesses are 
  done.
 
  Signed-off-by: Mika Westerberg ext-mika.1.westerb...@nokia.com
  Cc: Cory Maccarrone darkstar6...@gmail.com

 Tested-by: Paul Walmsley p...@pwsan.com

 BTW, Tony had the same fix buried in an another thread:

 http://marc.info/?l=linux-omapm=126826012627677w=2

 You could add my tested by as well to which one goes in but the fix
 should go for 2.6.34 as the mainline doesn't boot otherwise on OMAP.

Uhm why does this patch (or Tony's version) doesn't reach mainline for
so long? It's critical for all OMAPs except the very old ones.

If it helps:
Tested-by: Grazvydas Ignotas nota...@gmail.com


 Tested-by: Jarkko Nikula jhnik...@gmail.com
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
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