* [PATCH] i2c-s3c2410: move resume state flag to end of resume
@ 2012-02-11 3:22 Huisung Kang
2012-02-12 13:12 ` Mark Brown
2012-02-13 22:53 ` Ben Dooks
0 siblings, 2 replies; 4+ messages in thread
From: Huisung Kang @ 2012-02-11 3:22 UTC (permalink / raw)
To: linux-i2c, linux-samsung-soc; +Cc: ben-linux, kgene.kim
From: Kisoo Yu <ksoo.yu@samsung.com>
need to set flag after finishing its work
Signed-off-by: Kisoo Yu <ksoo.yu@samsung.com>
Signed-off-by: Huisung Kang <hs1218.kang@samsung.com>
---
drivers/i2c/busses/i2c-s3c2410.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 4c17180..7d6d2b7 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1082,10 +1082,10 @@ static int s3c24xx_i2c_resume(struct device *dev)
struct platform_device *pdev = to_platform_device(dev);
struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
- i2c->suspended = 0;
clk_enable(i2c->clk);
s3c24xx_i2c_init(i2c);
clk_disable(i2c->clk);
+ i2c->suspended = 0;
return 0;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c-s3c2410: move resume state flag to end of resume
2012-02-11 3:22 [PATCH] i2c-s3c2410: move resume state flag to end of resume Huisung Kang
@ 2012-02-12 13:12 ` Mark Brown
[not found] ` <20120212131230.GB3395-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-02-13 22:53 ` Ben Dooks
1 sibling, 1 reply; 4+ messages in thread
From: Mark Brown @ 2012-02-12 13:12 UTC (permalink / raw)
To: Huisung Kang; +Cc: linux-i2c, linux-samsung-soc, ben-linux, kgene.kim
[-- Attachment #1: Type: text/plain, Size: 398 bytes --]
On Sat, Feb 11, 2012 at 12:22:21PM +0900, Huisung Kang wrote:
> From: Kisoo Yu <ksoo.yu@samsung.com>
> need to set flag after finishing its work
> - i2c->suspended = 0;
> clk_enable(i2c->clk);
> s3c24xx_i2c_init(i2c);
> clk_disable(i2c->clk);
> + i2c->suspended = 0;
Why is this needed - given that there's no locking involved anywhere
here does this mean that we've got a race somewhere?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] i2c-s3c2410: move resume state flag to end of resume
2012-02-11 3:22 [PATCH] i2c-s3c2410: move resume state flag to end of resume Huisung Kang
2012-02-12 13:12 ` Mark Brown
@ 2012-02-13 22:53 ` Ben Dooks
1 sibling, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2012-02-13 22:53 UTC (permalink / raw)
To: Huisung Kang
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
ben-linux-elnMNo+KYs3YtjvyW6yDsg,
kgene.kim-Sze3O3UU22JBDgjK7y7TUQ
On Sat, Feb 11, 2012 at 12:22:21PM +0900, Huisung Kang wrote:
> From: Kisoo Yu <ksoo.yu-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
>
> need to set flag after finishing its work
>
> Signed-off-by: Kisoo Yu <ksoo.yu-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Signed-off-by: Huisung Kang <hs1218.kang-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> ---
> drivers/i2c/busses/i2c-s3c2410.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
> index 4c17180..7d6d2b7 100644
> --- a/drivers/i2c/busses/i2c-s3c2410.c
> +++ b/drivers/i2c/busses/i2c-s3c2410.c
> @@ -1082,10 +1082,10 @@ static int s3c24xx_i2c_resume(struct device *dev)
> struct platform_device *pdev = to_platform_device(dev);
> struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
>
> - i2c->suspended = 0;
> clk_enable(i2c->clk);
> s3c24xx_i2c_init(i2c);
> clk_disable(i2c->clk);
> + i2c->suspended = 0;
Yes, technically we should not mark ourselves as un-suspended until
the peripheral has been properly restarted. I will have a look at
Mark's comments before this is applied.
--
Ben
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-13 22:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-11 3:22 [PATCH] i2c-s3c2410: move resume state flag to end of resume Huisung Kang
2012-02-12 13:12 ` Mark Brown
[not found] ` <20120212131230.GB3395-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-02-13 22:54 ` Ben Dooks
2012-02-13 22:53 ` Ben Dooks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).