From: Jun Gao <jun.gao@mediatek.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: <srv_heupstream@mediatek.com>, <devicetree@vger.kernel.org>,
<linux-i2c@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>,
Jun Gao <jun.gao@mediatek.com>
Subject: [PATCH v2 1/3] i2c: mediatek: Register i2c adapter driver earlier
Date: Sat, 7 Jul 2018 17:29:53 +0800 [thread overview]
Message-ID: <1530955795-17714-2-git-send-email-jun.gao@mediatek.com> (raw)
In-Reply-To: <1530955795-17714-1-git-send-email-jun.gao@mediatek.com>
From: Jun Gao <jun.gao@mediatek.com>
As i2c adapter, i2c slave devices will depend on it. In order not to
block the initializations of i2c slave devices, register i2c adapter
driver at appropriate time.
Signed-off-by: Jun Gao <jun.gao@mediatek.com>
---
drivers/i2c/busses/i2c-mt65xx.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
index 1e57f58..806e8b90 100644
--- a/drivers/i2c/busses/i2c-mt65xx.c
+++ b/drivers/i2c/busses/i2c-mt65xx.c
@@ -888,7 +888,17 @@ static int mtk_i2c_resume(struct device *dev)
},
};
-module_platform_driver(mtk_i2c_driver);
+static int __init mtk_i2c_adap_init(void)
+{
+ return platform_driver_register(&mtk_i2c_driver);
+}
+subsys_initcall(mtk_i2c_adap_init);
+
+static void __exit mtk_i2c_adap_exit(void)
+{
+ platform_driver_unregister(&mtk_i2c_driver);
+}
+module_exit(mtk_i2c_adap_exit);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("MediaTek I2C Bus Driver");
--
1.8.1.1
next prev parent reply other threads:[~2018-07-07 9:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-07 9:29 [PATCH v2 0/3] Register i2c adapter driver earlier and use DMA safe buffers Jun Gao
2018-07-07 9:29 ` Jun Gao [this message]
2018-08-08 20:40 ` [PATCH v2 1/3] i2c: mediatek: Register i2c adapter driver earlier Wolfram Sang
2018-07-07 9:29 ` [PATCH v2 2/3] i2c: Add helper to ease DMA handling Jun Gao
2018-07-08 11:58 ` Peter Rosin
2018-07-08 12:46 ` Peter Rosin
2018-08-08 20:57 ` Wolfram Sang
2018-08-09 9:13 ` Yingjoe Chen
2018-08-09 9:23 ` Wolfram Sang
2018-07-07 9:29 ` [PATCH v2 3/3] i2c: mediatek: Use DMA safe buffers for i2c transactions Jun Gao
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=1530955795-17714-2-git-send-email-jun.gao@mediatek.com \
--to=jun.gao@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=srv_heupstream@mediatek.com \
--cc=wsa@the-dreams.de \
/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).