aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-mxs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-26 15:57:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-26 15:57:47 -0400
commit84a442b9a16ee69243ce7fce5d6f6f9c3fbdee68 (patch)
tree332a0c901d8ab2ffb19b8ce14b4b094bf5b08657 /drivers/i2c/busses/i2c-mxs.c
parent39b6cc668c5ecc66f6f9c9293ffab681cb6f7065 (diff)
parentdeb88cc3c69975cbd9875ed9fac259b351f6b64d (diff)
Merge tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull arm-soc device tree conversions (part 2) from Olof Johansson: "These continue the device tree work from part 1, this set is for the tegra, mxs and imx platforms, all of which have dependencies on clock or pinctrl changes submitted earlier." Fix up trivial conflicts due to nearby changes in drivers/{gpio/gpio,i2c/busses/i2c}-mxs.c * tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (73 commits) ARM: dt: tegra: invert status=disable vs status=okay ARM: dt: tegra: consistent basic property ordering ARM: dt: tegra: sort nodes based on bus order ARM: dt: tegra: remove duplicate device_type property ARM: dt: tegra: consistenly use lower-case for hex constants ARM: dt: tegra: format regs properties consistently ARM: dt: tegra: gpio comment cleanup ARM: dt: tegra: remove unnecessary unit addresses ARM: dt: tegra: whitespace cleanup ARM: dt: tegra cardhu: fix typo in SDHCI node name ARM: dt: tegra: cardhu: register core regulator tps62361 ARM: dt: tegra30.dtsi: Add SMMU node ARM: dt: tegra20.dtsi: Add GART node ARM: dt: tegra30.dtsi: Add Memory Controller(MC) nodes ARM: dt: tegra20.dtsi: Add Memory Controller(MC) nodes ARM: dt: tegra: Add device tree support for AHB ARM: dts: enable audio support for imx28-evk ARM: dts: enable i2c device for imx28-evk i2c: mxs: add device tree probe support ARM: dts: enable mmc for imx28-evk ...
Diffstat (limited to 'drivers/i2c/busses/i2c-mxs.c')
-rw-r--r--drivers/i2c/busses/i2c-mxs.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index 58a338846f06..04eb441b6ce1 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -28,6 +28,9 @@
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/pinctrl/consumer.h> 29#include <linux/pinctrl/consumer.h>
30#include <linux/stmp_device.h> 30#include <linux/stmp_device.h>
31#include <linux/of.h>
32#include <linux/of_device.h>
33#include <linux/of_i2c.h>
31 34
32#define DRIVER_NAME "mxs-i2c" 35#define DRIVER_NAME "mxs-i2c"
33 36
@@ -366,6 +369,7 @@ static int __devinit mxs_i2c_probe(struct platform_device *pdev)
366 adap->algo = &mxs_i2c_algo; 369 adap->algo = &mxs_i2c_algo;
367 adap->dev.parent = dev; 370 adap->dev.parent = dev;
368 adap->nr = pdev->id; 371 adap->nr = pdev->id;
372 adap->dev.of_node = pdev->dev.of_node;
369 i2c_set_adapdata(adap, i2c); 373 i2c_set_adapdata(adap, i2c);
370 err = i2c_add_numbered_adapter(adap); 374 err = i2c_add_numbered_adapter(adap);
371 if (err) { 375 if (err) {
@@ -375,6 +379,8 @@ static int __devinit mxs_i2c_probe(struct platform_device *pdev)
375 return err; 379 return err;
376 } 380 }
377 381
382 of_i2c_register_devices(adap);
383
378 return 0; 384 return 0;
379} 385}
380 386
@@ -394,10 +400,17 @@ static int __devexit mxs_i2c_remove(struct platform_device *pdev)
394 return 0; 400 return 0;
395} 401}
396 402
403static const struct of_device_id mxs_i2c_dt_ids[] = {
404 { .compatible = "fsl,imx28-i2c", },
405 { /* sentinel */ }
406};
407MODULE_DEVICE_TABLE(of, mxs_i2c_dt_ids);
408
397static struct platform_driver mxs_i2c_driver = { 409static struct platform_driver mxs_i2c_driver = {
398 .driver = { 410 .driver = {
399 .name = DRIVER_NAME, 411 .name = DRIVER_NAME,
400 .owner = THIS_MODULE, 412 .owner = THIS_MODULE,
413 .of_match_table = mxs_i2c_dt_ids,
401 }, 414 },
402 .remove = __devexit_p(mxs_i2c_remove), 415 .remove = __devexit_p(mxs_i2c_remove),
403}; 416};