Re: [PATCH v3 1/2] i2c: mediatek: Register i2c adapter driver earlier
On Thu, 2018-09-06 at 20:31 +0200, Wolfram Sang wrote: > On Thu, Sep 06, 2018 at 09:15:28PM +0800, Jun Gao wrote: > > From: Jun Gao > > > > In order not to block the initializations of some i2c devices. > > Register i2c adapter driver at appropriate time. > > > > Signed-off-by: Jun Gao > > The reasons this patch was rejected in v2 still hold. OK. Thanks for your opinion. >
Re: [PATCH v3 1/2] i2c: mediatek: Register i2c adapter driver earlier
On Thu, 2018-09-06 at 20:31 +0200, Wolfram Sang wrote: > On Thu, Sep 06, 2018 at 09:15:28PM +0800, Jun Gao wrote: > > From: Jun Gao > > > > In order not to block the initializations of some i2c devices. > > Register i2c adapter driver at appropriate time. > > > > Signed-off-by: Jun Gao > > The reasons this patch was rejected in v2 still hold. OK. Thanks for your opinion. >
Re: [PATCH v3 1/2] i2c: mediatek: Register i2c adapter driver earlier
On Thu, Sep 06, 2018 at 09:15:28PM +0800, Jun Gao wrote: > From: Jun Gao > > In order not to block the initializations of some i2c devices. > Register i2c adapter driver at appropriate time. > > Signed-off-by: Jun Gao The reasons this patch was rejected in v2 still hold. signature.asc Description: PGP signature
Re: [PATCH v3 1/2] i2c: mediatek: Register i2c adapter driver earlier
On Thu, Sep 06, 2018 at 09:15:28PM +0800, Jun Gao wrote: > From: Jun Gao > > In order not to block the initializations of some i2c devices. > Register i2c adapter driver at appropriate time. > > Signed-off-by: Jun Gao The reasons this patch was rejected in v2 still hold. signature.asc Description: PGP signature
[PATCH v3 1/2] i2c: mediatek: Register i2c adapter driver earlier
From: Jun Gao In order not to block the initializations of some i2c devices. Register i2c adapter driver at appropriate time. Signed-off-by: Jun Gao --- 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(_i2c_driver); +} +subsys_initcall(mtk_i2c_adap_init); + +static void __exit mtk_i2c_adap_exit(void) +{ + platform_driver_unregister(_i2c_driver); +} +module_exit(mtk_i2c_adap_exit); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("MediaTek I2C Bus Driver"); -- 1.8.1.1
[PATCH v3 1/2] i2c: mediatek: Register i2c adapter driver earlier
From: Jun Gao In order not to block the initializations of some i2c devices. Register i2c adapter driver at appropriate time. Signed-off-by: Jun Gao --- 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(_i2c_driver); +} +subsys_initcall(mtk_i2c_adap_init); + +static void __exit mtk_i2c_adap_exit(void) +{ + platform_driver_unregister(_i2c_driver); +} +module_exit(mtk_i2c_adap_exit); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("MediaTek I2C Bus Driver"); -- 1.8.1.1