aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r--drivers/i2c/busses/i2c-designware-platdrv.c5
-rw-r--r--drivers/i2c/busses/i2c-imx.c11
-rw-r--r--drivers/i2c/busses/i2c-mxs.c3
-rw-r--r--drivers/i2c/busses/i2c-omap.c3
-rw-r--r--drivers/i2c/busses/i2c-stu300.c11
5 files changed, 19 insertions, 14 deletions
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 4c1b60539a25..0aa01136f8d9 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -270,7 +270,8 @@ static SIMPLE_DEV_PM_OPS(dw_i2c_dev_pm_ops, dw_i2c_suspend, dw_i2c_resume);
270MODULE_ALIAS("platform:i2c_designware"); 270MODULE_ALIAS("platform:i2c_designware");
271 271
272static struct platform_driver dw_i2c_driver = { 272static struct platform_driver dw_i2c_driver = {
273 .remove = dw_i2c_remove, 273 .probe = dw_i2c_probe,
274 .remove = dw_i2c_remove,
274 .driver = { 275 .driver = {
275 .name = "i2c_designware", 276 .name = "i2c_designware",
276 .owner = THIS_MODULE, 277 .owner = THIS_MODULE,
@@ -282,7 +283,7 @@ static struct platform_driver dw_i2c_driver = {
282 283
283static int __init dw_i2c_init_driver(void) 284static int __init dw_i2c_init_driver(void)
284{ 285{
285 return platform_driver_probe(&dw_i2c_driver, dw_i2c_probe); 286 return platform_driver_register(&dw_i2c_driver);
286} 287}
287subsys_initcall(dw_i2c_init_driver); 288subsys_initcall(dw_i2c_init_driver);
288 289
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index ccf46656bdad..1d7efa3169cd 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -365,7 +365,7 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx)
365 clk_disable_unprepare(i2c_imx->clk); 365 clk_disable_unprepare(i2c_imx->clk);
366} 366}
367 367
368static void __init i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx, 368static void i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx,
369 unsigned int rate) 369 unsigned int rate)
370{ 370{
371 struct imx_i2c_clk_pair *i2c_clk_div = i2c_imx->hwdata->clk_div; 371 struct imx_i2c_clk_pair *i2c_clk_div = i2c_imx->hwdata->clk_div;
@@ -589,7 +589,7 @@ static struct i2c_algorithm i2c_imx_algo = {
589 .functionality = i2c_imx_func, 589 .functionality = i2c_imx_func,
590}; 590};
591 591
592static int __init i2c_imx_probe(struct platform_device *pdev) 592static int i2c_imx_probe(struct platform_device *pdev)
593{ 593{
594 const struct of_device_id *of_id = of_match_device(i2c_imx_dt_ids, 594 const struct of_device_id *of_id = of_match_device(i2c_imx_dt_ids,
595 &pdev->dev); 595 &pdev->dev);
@@ -697,7 +697,7 @@ static int __init i2c_imx_probe(struct platform_device *pdev)
697 return 0; /* Return OK */ 697 return 0; /* Return OK */
698} 698}
699 699
700static int __exit i2c_imx_remove(struct platform_device *pdev) 700static int i2c_imx_remove(struct platform_device *pdev)
701{ 701{
702 struct imx_i2c_struct *i2c_imx = platform_get_drvdata(pdev); 702 struct imx_i2c_struct *i2c_imx = platform_get_drvdata(pdev);
703 703
@@ -715,7 +715,8 @@ static int __exit i2c_imx_remove(struct platform_device *pdev)
715} 715}
716 716
717static struct platform_driver i2c_imx_driver = { 717static struct platform_driver i2c_imx_driver = {
718 .remove = __exit_p(i2c_imx_remove), 718 .probe = i2c_imx_probe,
719 .remove = i2c_imx_remove,
719 .driver = { 720 .driver = {
720 .name = DRIVER_NAME, 721 .name = DRIVER_NAME,
721 .owner = THIS_MODULE, 722 .owner = THIS_MODULE,
@@ -726,7 +727,7 @@ static struct platform_driver i2c_imx_driver = {
726 727
727static int __init i2c_adap_imx_init(void) 728static int __init i2c_adap_imx_init(void)
728{ 729{
729 return platform_driver_probe(&i2c_imx_driver, i2c_imx_probe); 730 return platform_driver_register(&i2c_imx_driver);
730} 731}
731subsys_initcall(i2c_adap_imx_init); 732subsys_initcall(i2c_adap_imx_init);
732 733
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index f4a01675fa71..b7c857774708 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -780,12 +780,13 @@ static struct platform_driver mxs_i2c_driver = {
780 .owner = THIS_MODULE, 780 .owner = THIS_MODULE,
781 .of_match_table = mxs_i2c_dt_ids, 781 .of_match_table = mxs_i2c_dt_ids,
782 }, 782 },
783 .probe = mxs_i2c_probe,
783 .remove = mxs_i2c_remove, 784 .remove = mxs_i2c_remove,
784}; 785};
785 786
786static int __init mxs_i2c_init(void) 787static int __init mxs_i2c_init(void)
787{ 788{
788 return platform_driver_probe(&mxs_i2c_driver, mxs_i2c_probe); 789 return platform_driver_register(&mxs_i2c_driver);
789} 790}
790subsys_initcall(mxs_i2c_init); 791subsys_initcall(mxs_i2c_init);
791 792
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 6d8308d5dc4e..9967a6f9c2ff 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -939,6 +939,9 @@ omap_i2c_isr_thread(int this_irq, void *dev_id)
939 /* 939 /*
940 * ProDB0017052: Clear ARDY bit twice 940 * ProDB0017052: Clear ARDY bit twice
941 */ 941 */
942 if (stat & OMAP_I2C_STAT_ARDY)
943 omap_i2c_ack_stat(dev, OMAP_I2C_STAT_ARDY);
944
942 if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK | 945 if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK |
943 OMAP_I2C_STAT_AL)) { 946 OMAP_I2C_STAT_AL)) {
944 omap_i2c_ack_stat(dev, (OMAP_I2C_STAT_RRDY | 947 omap_i2c_ack_stat(dev, (OMAP_I2C_STAT_RRDY |
diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c
index f8f6f2e552db..04a17b9b38bb 100644
--- a/drivers/i2c/busses/i2c-stu300.c
+++ b/drivers/i2c/busses/i2c-stu300.c
@@ -859,8 +859,7 @@ static const struct i2c_algorithm stu300_algo = {
859 .functionality = stu300_func, 859 .functionality = stu300_func,
860}; 860};
861 861
862static int __init 862static int stu300_probe(struct platform_device *pdev)
863stu300_probe(struct platform_device *pdev)
864{ 863{
865 struct stu300_dev *dev; 864 struct stu300_dev *dev;
866 struct i2c_adapter *adap; 865 struct i2c_adapter *adap;
@@ -966,8 +965,7 @@ static SIMPLE_DEV_PM_OPS(stu300_pm, stu300_suspend, stu300_resume);
966#define STU300_I2C_PM NULL 965#define STU300_I2C_PM NULL
967#endif 966#endif
968 967
969static int __exit 968static int stu300_remove(struct platform_device *pdev)
970stu300_remove(struct platform_device *pdev)
971{ 969{
972 struct stu300_dev *dev = platform_get_drvdata(pdev); 970 struct stu300_dev *dev = platform_get_drvdata(pdev);
973 971
@@ -989,13 +987,14 @@ static struct platform_driver stu300_i2c_driver = {
989 .pm = STU300_I2C_PM, 987 .pm = STU300_I2C_PM,
990 .of_match_table = stu300_dt_match, 988 .of_match_table = stu300_dt_match,
991 }, 989 },
992 .remove = __exit_p(stu300_remove), 990 .probe = stu300_probe,
991 .remove = stu300_remove,
993 992
994}; 993};
995 994
996static int __init stu300_init(void) 995static int __init stu300_init(void)
997{ 996{
998 return platform_driver_probe(&stu300_i2c_driver, stu300_probe); 997 return platform_driver_register(&stu300_i2c_driver);
999} 998}
1000 999
1001static void __exit stu300_exit(void) 1000static void __exit stu300_exit(void)