From: Leo Song <liangs-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
To: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: Leo Song <liangs-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
Chao Xie <cxie4-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Xiaofan Tian <tianxf-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
"Jett.Zhou" <jtzhou-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
Subject: [PATCH 06/11] i2c: pxa: Keep i2c clock enabled when system suspends/resumes.
Date: Thu, 8 Nov 2012 22:17:59 +0800 [thread overview]
Message-ID: <1352384284-15660-6-git-send-email-liangs@marvell.com> (raw)
In-Reply-To: <1352384284-15660-1-git-send-email-liangs-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
From: Xiaofan Tian <tianxf-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
If a PMIC interrupt occurs after i2c clock disables, since PMIC
interrupt handler uses i2c bus, phone hang or key value missing might
happen. So i2c clock should keep enabled when system suspends/resumes.
Change-Id: I983c5d3fe2dc18149d5d836d986e65e356913b47
Signed-off-by: Jett.Zhou <jtzhou-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index cab0792..ad6e69b 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1295,45 +1295,12 @@ static int __exit i2c_pxa_remove(struct platform_device *dev)
return 0;
}
-#ifdef CONFIG_PM
-static int i2c_pxa_suspend_noirq(struct device *dev)
-{
- struct platform_device *pdev = to_platform_device(dev);
- struct pxa_i2c *i2c = platform_get_drvdata(pdev);
-
- clk_disable(i2c->clk);
-
- return 0;
-}
-
-static int i2c_pxa_resume_noirq(struct device *dev)
-{
- struct platform_device *pdev = to_platform_device(dev);
- struct pxa_i2c *i2c = platform_get_drvdata(pdev);
-
- clk_enable(i2c->clk);
- i2c_pxa_reset(i2c);
-
- return 0;
-}
-
-static const struct dev_pm_ops i2c_pxa_dev_pm_ops = {
- .suspend_noirq = i2c_pxa_suspend_noirq,
- .resume_noirq = i2c_pxa_resume_noirq,
-};
-
-#define I2C_PXA_DEV_PM_OPS (&i2c_pxa_dev_pm_ops)
-#else
-#define I2C_PXA_DEV_PM_OPS NULL
-#endif
-
static struct platform_driver i2c_pxa_driver = {
.probe = i2c_pxa_probe,
.remove = __exit_p(i2c_pxa_remove),
.driver = {
.name = "pxa2xx-i2c",
.owner = THIS_MODULE,
- .pm = I2C_PXA_DEV_PM_OPS,
.of_match_table = i2c_pxa_dt_ids,
},
.id_table = i2c_pxa_id_table,
--
1.7.5.4
next prev parent reply other threads:[~2012-11-08 14:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-08 14:17 [PATCH 01/11] i2c: pxa: support hardware lock Leo Song
[not found] ` <1352384284-15660-1-git-send-email-liangs-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2012-11-08 14:17 ` [PATCH 02/11] i2c: pxa: support pxa910 in id table Leo Song
2012-11-08 14:17 ` [PATCH 03/11] i2c: pxa: add more error handling for i2c controller Leo Song
2012-11-08 14:17 ` [PATCH 04/11] i2c: pxa: fix irq unbalanced warning Leo Song
2012-11-08 14:17 ` [PATCH 05/11] i2c: pxa: add bus reset for platform data; Leo Song
2012-11-08 14:17 ` Leo Song [this message]
2012-11-08 14:18 ` [PATCH 07/11] i2c: pxa: keep i2c irq on in suspend Leo Song
2012-11-08 14:18 ` [PATCH 08/11] i2c: pxa: bugfix the slave addr in the transaction Leo Song
2012-11-08 14:18 ` [PATCH 09/11] i2c: pxa: add qos as constraint for cpu-idle Leo Song
2012-11-08 14:18 ` [PATCH 10/11] i2c: pxa: modify the parameters of i2c_bus_reset() Leo Song
2012-11-08 14:18 ` [PATCH 11/11] i2c: pxa: no need slave addr for i2c master mode reset Leo Song
[not found] ` <1352384284-15660-11-git-send-email-liangs-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2012-11-08 14:25 ` Leo Song
[not found] ` <78895A20B3CF7D49B5589B604D36692B1B59F88BFD-r8ILAu4/owuq90oVIqnETxL4W9x8LtSr@public.gmane.org>
2012-11-16 13:55 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1352384284-15660-6-git-send-email-liangs@marvell.com \
--to=liangs-eyqppykdwxrbdgjk7y7tuq@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=cxie4-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
--cc=jtzhou-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tianxf-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
--cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).